diff options
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/compctl-examples | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Misc/compctl-examples b/Misc/compctl-examples index 3aa9b15f4..464660477 100644 --- a/Misc/compctl-examples +++ b/Misc/compctl-examples @@ -11,15 +11,15 @@ # page. # #------------------------------------------------------------------------------ -hosts=("${(@)${(@s: :)${(@s: :)${(@)${(@f)$(</etc/hosts)}%%\#*}#*[ ]*}}:#}") +hosts=( ${(s: :)${(ps:\t:)${${(f)"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}} ) ports=( "${(@)${(@)${(@f)$(</etc/services)}:#\#*}%%[ ]*}" ) # groups=( $(cut -d: -f1 /etc/group) ) # groups=( $(ypcat group.byname | cut -d: -f1) ) # if you use NIS # It can be done without forking, but it used too much memory in old zsh's: -groups=( "${(@)${(@f)$(</etc/group)}%%:*}" ) -#groups=( "${(@)${(@f)$(ypcat groups)}%%:*}" ) # if you use NIS +groups=( ${${(s: :)$(</etc/group)}%%:*} ) +#groups=( ${${(s: :)$(ypcat groups)}%%:*} ) # if you use NIS # Completion for zsh builtins. compctl -z -P '%' bg |