From 62d86b3d18feb24f93d615cfadfe1fbad86ef118 Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Sun, 13 Jul 2014 17:47:44 -0700 Subject: [PATCH] Fix documentation on variable scopes for `read` The `read` docs incorrectly asserted that -g was the default for variables. In actuality it behaves the same way that `set` does. --- doc_src/read.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc_src/read.txt b/doc_src/read.txt index bb13f991b..ca7a4d145 100644 --- a/doc_src/read.txt +++ b/doc_src/read.txt @@ -11,7 +11,7 @@ input and stores the result in one or more shell variables. The following options are available: - -c CMD or --command=CMD sets the initial string in the interactive mode command buffer to CMD. -- -g or --global makes the variables global (default behaviour). +- -g or --global makes the variables global. - -l or --local makes the variables local. - -m NAME or --mode-name=NAME specifies that the name NAME should be used to save/load the history file. If NAME is fish, the regular fish history will be available. - -p PROMPT_CMD or --prompt=PROMPT_CMD uses the output of the shell command \c PROMPT_CMD as the prompt for the interactive mode. The default prompt command is set_color green; echo read; set_color normal; echo "> ". @@ -25,6 +25,9 @@ based on the IFS shell variable, and then assigns one token to each variable specified in VARIABLES. If there are more tokens than variables, the complete remainder is assigned to the last variable. +See the documentation for \c set for more details on the scoping rules for +variables. + \subsection read-example Example The following code stores the value 'hello' in the shell variable