about summary refs log tree commit diff
path: root/Completion/Builtins/_read
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2000-08-09 21:20:37 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2000-08-09 21:20:37 +0000
commit4239b1243a4795fc6e7207151334cce03dafe44e (patch)
tree1e31d80109b18bddd2afde6231f0d082d75346f9 /Completion/Builtins/_read
parentcb89544d32619822541153118b0bc9c936573c64 (diff)
downloadzsh-4239b1243a4795fc6e7207151334cce03dafe44e.tar.gz
zsh-4239b1243a4795fc6e7207151334cce03dafe44e.tar.xz
zsh-4239b1243a4795fc6e7207151334cce03dafe44e.zip
new completion for read builtin (12578)
Diffstat (limited to 'Completion/Builtins/_read')
-rw-r--r--Completion/Builtins/_read18
1 files changed, 18 insertions, 0 deletions
diff --git a/Completion/Builtins/_read b/Completion/Builtins/_read
new file mode 100644
index 000000000..a648701d9
--- /dev/null
+++ b/Completion/Builtins/_read
@@ -0,0 +1,18 @@
+#compdef read
+
+local pflag expl line curcontext="$curcontext"
+
+# -p flag only relevant if we have a coprocess
+(:>&p) 2>/dev/null &&
+  pflag='(-q -u -z)-p[input is read from the coprocess]'
+
+_arguments -C -s \
+  '-r[raw mode]' \
+  '(-p -k -u -z)-q[read y or n character from terminal]' \
+  '(-q)-k[specify number of characters to read]:number of characters' \
+  '(-q -u -p)-z[read entry from editor buffer stack]' \
+  '(-E)-e[input read is echoed and not assigned]' \
+  '(-e)-E[input read is echoed]' \
+  '-A[first name is taken as an array]' \
+  '(-q -z -p)-u+[specify file-descriptor to read from]:file-descriptor:_file_descriptors' \
+  $pflag '1:varprompt:_vars -qS\?' '*:vars:_vars'