mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-22 18:38:00 +00:00
completion:**:users ignored-patterns more robust
Calculates ignored users at runtime by extracting them from passwd database and considering all users with UID < 100 (on Solaris systems) or UID < 500 (everywhere else). By my timings, this doesn't make it any noticably slower.
This commit is contained in:
parent
7722dd4400
commit
0ff0ece5e2
@ -99,14 +99,13 @@ zstyle -e ':completion:*:hosts' hosts 'reply=(
|
|||||||
)'
|
)'
|
||||||
|
|
||||||
# Don't complete uninteresting users...
|
# Don't complete uninteresting users...
|
||||||
zstyle ':completion:*:*:*:users' ignored-patterns \
|
zstyle ':completion:*:*:*:users' ignored-patterns nobody nobody4 noaccess '_*' \
|
||||||
adm amanda apache avahi beaglidx bin cacti canna clamav daemon \
|
$([[ $OSTYPE =~ solaris ]] && max_uid=100 || max_uid=500
|
||||||
dbus distcache dovecot fax ftp games gdm gkrellmd gopher \
|
IFS=:
|
||||||
hacluster haldaemon halt hsqldb ident junkbust ldap lp mail \
|
while read user pass uid remainder; do
|
||||||
mailman mailnull mldonkey mysql nagios \
|
[[ ! $user =~ (^#|root) ]] && ((uid < max_uid)) && echo $user
|
||||||
named netdump news nfsnobody nobody nscd ntp nut nx openvpn \
|
done </etc/passwd
|
||||||
operator pcap postfix postgres privoxy pulse pvm quagga radvd \
|
)
|
||||||
rpc rpcuser rpm shutdown squid sshd sync uucp vcsa xfs '_*'
|
|
||||||
|
|
||||||
# ... unless we really want to.
|
# ... unless we really want to.
|
||||||
zstyle '*' single-ignored show
|
zstyle '*' single-ignored show
|
||||||
|
Loading…
Reference in New Issue
Block a user