about summary refs log tree commit diff
path: root/Completion/Builtins
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-06-27 05:33:04 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-06-27 05:33:04 +0000
commit346825df86466cf151be61b9429ef2c1734e66ea (patch)
treebd3e1ccd947b47f974c62b4113c5276416de2c9f /Completion/Builtins
parenta2159285e80508bb682d90a71270fbddada8bd05 (diff)
downloadzsh-346825df86466cf151be61b9429ef2c1734e66ea.tar.gz
zsh-346825df86466cf151be61b9429ef2c1734e66ea.tar.xz
zsh-346825df86466cf151be61b9429ef2c1734e66ea.zip
zsh-3.1.5-pws-24 zsh-3.1.5-pws-24
Diffstat (limited to 'Completion/Builtins')
-rw-r--r--Completion/Builtins/_autoload2
-rw-r--r--Completion/Builtins/_bindkey2
-rw-r--r--Completion/Builtins/_echotc2
-rw-r--r--Completion/Builtins/_kill6
-rw-r--r--Completion/Builtins/_limits2
-rw-r--r--Completion/Builtins/_wait15
-rw-r--r--Completion/Builtins/_zmodload4
7 files changed, 22 insertions, 11 deletions
diff --git a/Completion/Builtins/_autoload b/Completion/Builtins/_autoload
index d1c255b73..f10fc34e7 100644
--- a/Completion/Builtins/_autoload
+++ b/Completion/Builtins/_autoload
@@ -1,3 +1,3 @@
 #compdef autoload
 
-compgen -s '${^fpath}/*(N:t)'
+compadd - ${^fpath}/*(N:t)
diff --git a/Completion/Builtins/_bindkey b/Completion/Builtins/_bindkey
index 57b3d8a85..91ecfcc28 100644
--- a/Completion/Builtins/_bindkey
+++ b/Completion/Builtins/_bindkey
@@ -8,7 +8,7 @@
 # Where appropriate, will complete keymaps instead of widgets.
 
 if [[ "$words[2]" = -*[DAN]* || "$words[CURRENT-1]" = -*M ]]; then
-  compgen -s '$(bindkey -l)'
+  compadd - $(bindkey -l)
 else
   compgen -b -M 'r:|-=* r:|=*'
 fi
diff --git a/Completion/Builtins/_echotc b/Completion/Builtins/_echotc
index ce282437d..15dfcef08 100644
--- a/Completion/Builtins/_echotc
+++ b/Completion/Builtins/_echotc
@@ -1,3 +1,3 @@
 #compdef echotc
 
-compgen -k '(al dc dl do le up al bl cd ce cl cr dc dl do ho is le ma nd nl se so up)'
+compadd al dc dl do le up al bl cd ce cl cr dc dl do ho is le ma nd nl se so up
diff --git a/Completion/Builtins/_kill b/Completion/Builtins/_kill
index 4f8c1db6d..26f6bf5cd 100644
--- a/Completion/Builtins/_kill
+++ b/Completion/Builtins/_kill
@@ -3,13 +3,13 @@
 local list
 
 if compset -P 1 -; then
-  compgen -k "($signals[1,-3])"
+  compadd $signals[1,-3]
 else
   local ret=1
 
   compgen -P '%' -j && ret=0
-  list=("$(ps 2>/dev/null)")
-  compgen -y '$list' -s '${${${(f)"$(ps 2>/dev/null)"}[2,-1]## #}%% *}' && 
+  list=("${(@Mr:COLUMNS-1:)${(f)$(ps ${compconfig[ps_listargs]:-$compconfig[ps_args]} 2>/dev/null)}[2,-1]:#[ 	]#${PREFIX}[0-9]#${SUFFIX}[ 	]*}")
+  compadd -y list - ${${${(f)"$(ps $compconfig[ps_args] 2>/dev/null)"}[2,-1]## #}%% *} &&
     ret=0
 
   return ret
diff --git a/Completion/Builtins/_limits b/Completion/Builtins/_limits
index 6835a6244..0b8837d67 100644
--- a/Completion/Builtins/_limits
+++ b/Completion/Builtins/_limits
@@ -1,3 +1,3 @@
 #compdef limit unlimit
 
-compgen -s '${${(f)"$(limit)"}%% *}'
+compadd ${${(f)"$(limit)"}%% *}
diff --git a/Completion/Builtins/_wait b/Completion/Builtins/_wait
index 41d09c9b2..8f9339ebd 100644
--- a/Completion/Builtins/_wait
+++ b/Completion/Builtins/_wait
@@ -1,9 +1,20 @@
 #compdef wait
 
+# This uses two configuration keys:
+#
+#  ps_args
+#    This can be set to options of the ps(1) command that should be
+#    used when invoking it to get the pids to complete.
+#
+#  ps_listargs
+#    This defaults to the value of the `ps_args' key and defines
+#    options for the ps command that are to be used when creating
+#    the list to display during completion.
+
 local list ret=1
 
 compgen -P '%' -j && ret=0
-list=("$(ps 2>/dev/null)")
-compgen -y '$list' -s '${${${(f)"$(ps 2>/dev/null)"}[2,-1]## #}%% *}' && ret=0
+list=("${(@Mr:COLUMNS-1:)${(f)$(ps ${compconfig[ps_listargs]:-$compconfig[ps_args]} 2>/dev/null)}[2,-1]:#[ 	]#${PREFIX}[0-9]#${SUFFIX}[ 	]*}")
+compadd -y list - ${${${(f)"$(ps $compconfig[ps_args] 2>/dev/null)"}[2,-1]## #}%% *} && ret=0
 
 return ret
diff --git a/Completion/Builtins/_zmodload b/Completion/Builtins/_zmodload
index 4b0e91442..d3a39b5de 100644
--- a/Completion/Builtins/_zmodload
+++ b/Completion/Builtins/_zmodload
@@ -5,7 +5,7 @@ local fl="$words[2]"
 if [[ "$fl" = -*(a*u|u*a)* || "$fl" = -*a* && CURRENT -ge 4 ]]; then
   compgen -B
 elif [[ "$fl" = -*u* ]]; then
-  compgen -s '$(zmodload)'
+  compadd - $(zmodload)
 else
-  compgen -s '${^module_path}/*(N:t:r)'
+  compadd - ${^module_path}/*(N:t:r)
 fi