From 768d5fc7dc33c9c4fe166827b31d785084d5e311 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 9 Mar 2000 11:46:28 +0000 Subject: Initial revision --- Completion/Builtins/_zpty | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Completion/Builtins/_zpty (limited to 'Completion/Builtins') diff --git a/Completion/Builtins/_zpty b/Completion/Builtins/_zpty new file mode 100644 index 000000000..b197b4128 --- /dev/null +++ b/Completion/Builtins/_zpty @@ -0,0 +1,23 @@ +#compdef zpty + +local state line list names expl + +_arguments -C -s \ + '(-d -w -r -L)-e[echo input characters]' \ + '(-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 -r)-L[list defined commands as calls]' \ + '*::args:_normal' + +if [[ $state = name ]] && _wanted zptynames expl 'zpty command names'; then + list=( ${${(f)"$(zpty)"}#*\) } ) + names=( ${list%%:*} ) + if zstyle -T ":completion:${curcontext}" verbose; then + zformat -a list ' --' ${${(f)"$(zpty)"}#*\) } + compadd "$expl[@]" -d list - "$names[@]" + else + compadd "$expl[@]" - "$names[@]" + fi +fi -- cgit 1.4.1