additional tests; documentation updates

This commit is contained in:
Chet Ramey
2022-07-12 10:19:29 -04:00
parent 67e47f224c
commit 87a6e89edc
20 changed files with 2104 additions and 2185 deletions
+4 -4
View File
@@ -1096,16 +1096,16 @@ select @var{name} [in @var{words} @dots{}]; do @var{commands}; done
@end example
The list of words following @code{in} is expanded, generating a list
of items. The set of expanded words is printed on the standard
of items, and the set of expanded words is printed on the standard
error output stream, each preceded by a number. If the
@samp{in @var{words}} is omitted, the positional parameters are printed,
as if @samp{in "$@@"} had been specified.
The @env{PS3} prompt is then displayed and a line is read from the
standard input.
@code{select} then displays the @env{PS3}
prompt and reads a line from the standard input.
If the line consists of a number corresponding to one of the displayed
words, then the value of @var{name} is set to that word.
If the line is empty, the words and prompt are displayed again.
If @code{EOF} is read, the @code{select} command completes.
If @code{EOF} is read, the @code{select} command completes and returns 1.
Any other value read causes @var{name} to be set to null.
The line read is saved in the variable @env{REPLY}.