about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2004-03-17 14:19:12 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2004-03-17 14:19:12 +0000
commit8fc76ca3700ad4c147883437ec81d41ce0429996 (patch)
tree8d84e8c40dfde5a25da0cce2e6ee0cef67e20b45
parent2dbe1c54369c0d726b72120411e6dcbfb41a8d8d (diff)
downloadzsh-8fc76ca3700ad4c147883437ec81d41ce0429996.tar.gz
zsh-8fc76ca3700ad4c147883437ec81d41ce0429996.tar.xz
zsh-8fc76ca3700ad4c147883437ec81d41ce0429996.zip
19648: complete -t and -n options
-rw-r--r--ChangeLog4
-rw-r--r--Completion/Zsh/Command/_zpty23
2 files changed, 17 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index a9379dabf..bedc3d337 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-03-17  Oliver Kiddle  <opk@zsh.org>
+
+	* 19648: Completion/Zsh/Command/_zpty: complete -t and -n options
+
 2004-03-16  Clint Adams  <clint@zsh.org>
 
 	* 19641: Src/Modules/pcre.c: implement -pcre-match conditional
diff --git a/Completion/Zsh/Command/_zpty b/Completion/Zsh/Command/_zpty
index 4a02952f7..ef4ac4bb1 100644
--- a/Completion/Zsh/Command/_zpty
+++ b/Completion/Zsh/Command/_zpty
@@ -3,28 +3,31 @@
 local state line list names expl curcontext="$curcontext"
 typeset -A opt_args
 
-
 _arguments -C -s -S \
-  '(-r -w -L -d)-e[echo input characters]' \
-  '(-r -w -L -d)-b[io to pseudo-terminal blocking]' \
-  '(-r -w -L -e -b)-d[delete command]:*:name:->name' \
-  '(-r -L -e -b -d)-w[send string to command]:name:->name:*:strings to write' \
-  '(: -r -w -e -b -d)-L[list defined commands as calls]' \
-  '(: -w -L -e -b -d)-r[read string from command]:name:->name:param: _vars:pattern:' \
-  '(-r -w -L -d):zpty command name:' \
-  '(-r -w -L -d):cmd: _command_names -e' \
-  '(-r -w -L -d)*::args:_precommand' && return 0
+  '(-r -w -t -n -L -d)-e[echo input characters]' \
+  '(-r -w -t -n -L -d)-b[io to pseudo-terminal blocking]' \
+  '(-r -w -t -n -L -e -b)-d[delete command]:*:name:->name' \
+  '(-r -L -t -e -b -d)-w[send string to command]:name:->name:*:strings to write' \
+  '(-r -L -t -e -b -d)-n[do not add a newline to the result]' \
+  '(: -r -w -t -n -e -b -d)-L[list defined commands as calls]' \
+  '(: -w -n -L -e -b -d)-r[read string from command]:name:->name:param: _vars:pattern:' \
+  '(: -w -n -L -e -b -d)-t[test if output is available before reading]' \
+  '(-r -w -t -n -L -d):zpty command name:' \
+  '(-r -w -t -n -L -d):cmd: _command_names -e' \
+  '(-r -w -t -n -L -d)*::args:_precommand' && return 0
 
 # One could use sets, but that's more expensive and zpty is simple enough.
 #
 # _arguments -C -s -S \
 #   - read \
 #     '-r[read string from command]' \
+#     '-t[test if output is available first]' \
 #     ':name:->name' \
 #     ':param: _vars' \
 #     ':pattern:' \
 #   - write \
 #     '-w[send string to command]' \
+#     '-n[do not add a newline to the result]' \
 #     ':name:->name' \
 #     '*:strings to write' \
 #   - list \