1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-10-03 09:21:19 +02:00
zsh/Completion/Builtins/_read
2000-08-09 21:20:37 +00:00

19 lines
686 B
Plaintext

#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'