summary refs log tree commit diff
path: root/Misc/compctl-examples
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-07-03 17:06:04 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-07-03 17:06:04 +0000
commit876fa2c44e0a17b2d10a2547ac1d13687cfed520 (patch)
treef92ce7475c97f82a05e20e9ba8be9b83436c9b6b /Misc/compctl-examples
parent6fa964914d8be709b1145399108ef1535a0b3f39 (diff)
downloadzsh-876fa2c44e0a17b2d10a2547ac1d13687cfed520.tar.gz
zsh-876fa2c44e0a17b2d10a2547ac1d13687cfed520.tar.xz
zsh-876fa2c44e0a17b2d10a2547ac1d13687cfed520.zip
unposted: force latest version of files from vendor to main branch
Diffstat (limited to 'Misc/compctl-examples')
-rw-r--r--Misc/compctl-examples20
1 files changed, 10 insertions, 10 deletions
diff --git a/Misc/compctl-examples b/Misc/compctl-examples
index e84a37fbb..1b9fc0ac8 100644
--- a/Misc/compctl-examples
+++ b/Misc/compctl-examples
@@ -11,15 +11,15 @@
 # page.
 #
 #------------------------------------------------------------------------------
-hosts=("${${(s: :)${(s:	:)${${(f)$(</etc/hosts)}%%\#*}#*[ 	]*}}:#}")
-ports=( "${${${(f)$(</etc/services)}:#\#*}%%[ 	]*}" )
+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
@@ -251,7 +251,7 @@ compctl -k ftphosts ftp
 # Note that 'r[-exec,;]' must come first
 if [[ -r /proc/filesystems ]]; then
     # Linux
-    filesystems='"${${(f)$(</proc/filesystems)}#*	}"'
+    filesystems='"${(@)${(@f)$(</proc/filesystems)}#*	}"'
 else
     filesystems='ufs 4.2 4.3 nfs tmp mfs S51K S52K'
 fi
@@ -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
 }
 
@@ -574,7 +574,7 @@ cvstargets() {
 }
 
 cvsrevisions() {
-    reply=( "${${${(M)${(f)$(cvs -q status -vl .)}:#	*}##[ 	]##}%%[ 	]*}" )
+    reply=( "${(@)${(@)${(@M)${(@f)$(cvs -q status -vl .)}:#	*}##[ 	]##}%%[ 	]*}" )
 }
 
 cvsrepositories() {
@@ -582,7 +582,7 @@ cvsrepositories() {
     [[ -f CVS/Root ]] && root=$(<CVS/Root)
     reply=(
 	$root/^CVSROOT(:t)
-	"${${(M)${(f)$(<$root/CVSROOT/modules)}:#[^#]*}%%[ 	]*}"
+	"${(@)${(@M)${(@f)$(<$root/CVSROOT/modules)}:#[^#]*}%%[ 	]*}"
     )
 }
 
@@ -622,7 +622,7 @@ compctl -s '$(rpm -qa)' \
 	'c[-1,--rcfile]' -f - \
 	'p[1] s[-b]' -k '(p l c i b a)' - \
 	'c[-1,--queryformat] N[-1,{]' \
-		-s '"${${(f)$(rpm --querytags)}#RPMTAG_}"' -S '}' - \
+		-s '"${(@)${(@f)$(rpm --querytags)}#RPMTAG_}"' -S '}' - \
 	'W[1,-q*] C[-1,-([^-]*|)f*]' -f - \
 	'W[1,-i*], W[1,-q*] C[-1,-([^-]*|)p*]' \
 		-/g '*.rpm' + -f -- rpm
@@ -635,7 +635,7 @@ compctl -K talkmatch talk ytalk ytalk3
 function talkmatch {
     local u
     reply=($(users))
-    for u in "${${(f)$(rwho 2>/dev/null)}%%:*}"; do
+    for u in "${(@)${(@f)$(rwho 2>/dev/null)}%%:*}"; do
 	reply=($reply ${u%% *}@${u##* })
     done
 }