summary refs log tree commit diff
path: root/Completion/Builtins/_zpty
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Builtins/_zpty')
-rw-r--r--Completion/Builtins/_zpty10
1 files changed, 5 insertions, 5 deletions
diff --git a/Completion/Builtins/_zpty b/Completion/Builtins/_zpty
index b197b4128..d8c77ff2e 100644
--- a/Completion/Builtins/_zpty
+++ b/Completion/Builtins/_zpty
@@ -7,17 +7,17 @@ _arguments -C -s \
   '(-d -w -r -L)-b[io to pseudo-terminal blocking]' \
   '(-e -b -w -r -L)-d[delete command]:*:name:->name' \
   '(-e -b -d -r -L)-w[send string to command]:name:->name:*:strings to write' \
-  '(-e -b -d -w -L)-r[read string from command]:name:->name:param:_parameters:*:nothing:_nothing' \
+  '(-e -b -d -w -L *)-r[read string from command]:name:->name:param:_parameters' \
   '(-e -b -d -w -r)-L[list defined commands as calls]' \
-  '*::args:_normal'
+  '(-r)*::args:_normal'
 
-if [[ $state = name ]] && _wanted zptynames expl 'zpty command names'; then
+if [[ $state = name ]] && _wanted names; then
   list=( ${${(f)"$(zpty)"}#*\) } )
   names=( ${list%%:*} )
   if zstyle -T ":completion:${curcontext}" verbose; then
     zformat -a list ' --' ${${(f)"$(zpty)"}#*\) }
-    compadd "$expl[@]" -d list - "$names[@]"
+    _all_labels names expl 'zpty command names' compadd -d list - "$names[@]"
   else
-    compadd "$expl[@]" - "$names[@]"
+    _all_labels names expl 'zpty command names' compadd - "$names[@]"
   fi
 fi