aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src/read.txt
diff options
context:
space:
mode:
authorGravatar Kevin Ballard <kevin@sb.org>2014-07-13 17:47:44 -0700
committerGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2014-07-14 09:12:00 +0800
commit62d86b3d18feb24f93d615cfadfe1fbad86ef118 (patch)
tree61733bc31b0f5c1155cba8052b9acd3fca0be0e3 /doc_src/read.txt
parent4bbbd2dde653207e68f1369adfa4c19032e6610f (diff)
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.
Diffstat (limited to 'doc_src/read.txt')
-rw-r--r--doc_src/read.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc_src/read.txt b/doc_src/read.txt
index bb13f991..ca7a4d14 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:
- <tt>-c CMD</tt> or <tt>--command=CMD</tt> sets the initial string in the interactive mode command buffer to <tt>CMD</tt>.
-- <tt>-g</tt> or <tt>--global</tt> makes the variables global (default behaviour).
+- <tt>-g</tt> or <tt>--global</tt> makes the variables global.
- <tt>-l</tt> or <tt>--local</tt> makes the variables local.
- <tt>-m NAME</tt> or <tt>--mode-name=NAME</tt> 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.
- <tt>-p PROMPT_CMD</tt> or <tt>--prompt=PROMPT_CMD</tt> uses the output of the shell command \c PROMPT_CMD as the prompt for the interactive mode. The default prompt command is <tt>set_color green; echo read; set_color normal; echo "> "</tt>.
@@ -25,6 +25,9 @@ based on the <tt>IFS</tt> shell variable, and then assigns one
token to each variable specified in <tt>VARIABLES</tt>. 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