aboutsummaryrefslogtreecommitdiff
path: root/Completion/Zsh/Command/_read
blob: d94e8b65f559a1a2e60fa9cba8515af53be6bab7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#compdef read

local pflag

# -p flag only relevant if we have a coprocess
(:>&p) 2>/dev/null &&
  pflag='(-q -s -u -z)-p[input is read from the coprocess]'

_arguments -s -A "-*" -S \
  '-r[raw mode]' \
  '(-p -k -s -u -z)-q[read y or n character from terminal]' \
  '(-q)-k+[specify number of characters to read]:number of characters' \
  '(-q -s -u -p)-z[read entry from editor buffer stack]' \
  '(-E)-e[input read is echoed and not assigned]' \
  '(-e)-E[input read is echoed]' \
  '(-q -z -p)-s[suppress terminal echoing]' \
  '-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'