diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-07-27 08:30:38 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-07-27 08:30:38 +0000 |
commit | 43df8cd0726e06cba2b59f077f4e0826d764c237 (patch) | |
tree | a3cf39648683db01dc5631632455b790521c0e7c /Misc/compctl-examples | |
parent | 4ea4ad5f728ec235452bd30111ce819561827ff7 (diff) | |
download | zsh-43df8cd0726e06cba2b59f077f4e0826d764c237.tar.gz zsh-43df8cd0726e06cba2b59f077f4e0826d764c237.tar.xz zsh-43df8cd0726e06cba2b59f077f4e0826d764c237.zip |
zsh-workers:7277
Diffstat (limited to 'Misc/compctl-examples')
-rw-r--r-- | Misc/compctl-examples | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Misc/compctl-examples b/Misc/compctl-examples index 3aa9b15f4..1b9fc0ac8 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 @@ -563,7 +563,7 @@ cvsprefix() { cvsentries() { setopt localoptions nullglob unset if [[ -f ${pref}CVS/Entries ]]; then - reply=( "${pref}${^${(@)${(@)${(f@)$(<${pref}CVS/Entries)}:#D*}#/}%%/*}" ) + reply=( "${pref}${(@)^${(@)${(@)${(f@)$(<${pref}CVS/Entries)}:#D*}#/}%%/*}" ) fi } |