diff options
Diffstat (limited to 'Doc/Zsh')
-rw-r--r-- | Doc/Zsh/builtins.yo | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo index 6bd0084df..7512e9acf 100644 --- a/Doc/Zsh/builtins.yo +++ b/Doc/Zsh/builtins.yo @@ -824,8 +824,8 @@ contain symbolic links. alias(r)(fc -e -) findex(read) vindex(IFS, use of) -ifzman(xitem(tt(read) [ tt(-rszpqAclneEt) ] [ tt(-k) [ var(num) ] ])) -item(ifnzman(tt(read) [ tt(-rszpqAclneEt) ] [ tt(-k) [ var(num) ] ]) [ tt(-u)var(n) ] [ var(name)[tt(?)var(prompt)] ] [ var(name) ... ])( +ifzman(xitem(tt(read) [ tt(-rszpqAclneE) ] [ tt(-t) [ var(num) ] ] [ tt(-k) [ var(num) ] ])) +item(ifnzman(tt(read) [ tt(-rszpqAclneE) ] [ tt(-t) [ var(num) ] ] [ tt(-k) [ var(num) ] ]) [ tt(-u)var(n) ] [ var(name)[tt(?)var(prompt)] ] [ var(name) ... ])( vindex(REPLY, use of) vindex(reply, use of) Read one line and break it into fields using the characters @@ -899,21 +899,28 @@ Input is read from file descriptor var(n). item(tt(-p))( Input is read from the coprocess. ) -item(tt(-t))( -Test if input is available before attempting to read; if none is, return -status 1 and do not set any variables. This is not available when reading -from the editor buffer with tt(-z), when called from within completion -with tt(-c) or tt(-l), with tt(-q) which clears the input queue before -reading, or within zle where other mechanisms should be used to test for -input. +item(tt(-t) [ var(num) ])( +Test if input is available before attempting to read. If var(num) +is present, it must begin with a digit and will be evaluated +to give a number of seconds, which may be a floating point number; +in this case the read times out if input is not available within this +time. If var(num) is not present, it is taken to be zero, so that +tt(read) returns immediately if no input is available. +If no input is available, return status 1 and do not set any variables. +ifzman( ) +This option is not available when reading from the editor buffer with +tt(-z), when called from within completion with tt(-c) or tt(-l), with +tt(-q) which clears the input queue before reading, or within zle where +other mechanisms should be used to test for input. ifzman( ) Note that read does not attempt to alter the input processing mode. The default mode is canonical input, in which an entire line is read at a time, so usually `tt(read -t)' will not read anything until an entire line has been typed. However, when reading from the terminal with tt(-k) -this is automatically handled; note that only availability of the first -character is tested, so that e.g. `tt(read -t -k 2)' can still block on the -second character. +input is processed one key at a time; in this case, only availability of +the first character is tested, so that e.g. `tt(read -t -k 2)' can still +block on the second character. Use two instances of `tt(read -t -k)' if +this is not what is wanted. ) enditem() If the first argument contains a `tt(?)', the remainder of this |