aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src/index.hdr.in
diff options
context:
space:
mode:
authorGravatar Mark Griffiths <mark@thebespokepixel.com>2014-08-26 20:05:46 +0100
committerGravatar Mark Griffiths <mark@thebespokepixel.com>2014-08-26 20:05:46 +0100
commitd6c5a1e0c48ea7d95693fcbaace1800e5d3b16a1 (patch)
treec544a52ade8996e8991dbb9f4483c88ce307974c /doc_src/index.hdr.in
parente90b1651e42b82f807f4d7e1fe2fe14d642d2617 (diff)
parent9bcd4a6811373b8ef1e42aaf52ac248a0fce7701 (diff)
Merge branch 'master' into documentation-update
Conflicts (FIXED): doc_src/command.txt doc_src/index.hdr.in doc_src/read.txt doc_src/type.txt
Diffstat (limited to 'doc_src/index.hdr.in')
-rw-r--r--doc_src/index.hdr.in40
1 files changed, 27 insertions, 13 deletions
diff --git a/doc_src/index.hdr.in b/doc_src/index.hdr.in
index 0f411920..55a6ced4 100644
--- a/doc_src/index.hdr.in
+++ b/doc_src/index.hdr.in
@@ -416,7 +416,7 @@ Note that if no matches are found for a specific wildcard, it will expand into z
\subsection expand-command-substitution Command substitution
-The output of a series of commands can be used as the parameters to another command. If a parameter contains a set of parenthesis, the text enclosed by the parenthesis will be interpreted as a list of commands. On expansion, this list is executed, and substituted by the output. If the output is more than one line long, each line will be expanded to a new parameter.
+The output of a series of commands can be used as the parameters to another command. If a parameter contains a set of parenthesis, the text enclosed by the parenthesis will be interpreted as a list of commands. On expansion, this list is executed, and substituted by the output. If the output is more than one line long, each line will be expanded to a new parameter. Setting `IFS` to the empty string will disable line splitting.
The exit status of the last run command substitution is available in the <a href='#variables-status'>status</a> variable.
@@ -432,6 +432,9 @@ for i in *.jpg; convert $i (basename $i .jpg).png; end
# PNG format using the 'convert' program.
\endfish
+The command `begin; set -l IFS; set data (cat data.txt); end`
+will set the `data` variable to the contents of 'data.txt' without
+splitting it into an array.
\subsection expand-brace Brace expansion
@@ -718,40 +721,51 @@ certain environment variables.
- `CDPATH`, an array of directories in which to search for the new directory for the `cd` builtin. By default, the fish configuration defines `CDPATH` to be a universal variable with the values `.` and `~`.
-- A large number of variable starting with the prefixes `fish_color` and `fish_pager_color`. See <a href='#variables-color'>Variables for changing highlighting colors</a> for more information.
+- A large number of variable starting with the prefixes `fish_color` and `fish_pager_color.` See <a href='#variables-color'>Variables for changing highlighting colors</a> for more information.
- `fish_greeting`, the greeting message printed on startup.
- `LANG`, `LC_ALL`, `LC_COLLATE`, `LC_CTYPE`, `LC_MESSAGES`, `LC_MONETARY`, `LC_NUMERIC` and `LC_TIME` set the language option for the shell and subprograms. See the section <a href='#variables-locale'>Locale variables</a> for more information.
-- `fish_user_paths`, an array of directories that are prepended to PATH. This can be a universal variable.
+- `fish_user_paths`, an array of directories that are prepended to `PATH`. This can be a universal variable.
- `PATH`, an array of directories in which to search for commands
- `umask`, the current file creation mask. The preferred way to change the umask variable is through the <a href="commands.html#umask">umask function</a>. An attempt to set umask to an invalid value will always fail.
-`fish` also sends additional information to the user through the values of certain environment variables. The user cannot change the values of most of these variables.
+`fish` also sends additional information to the user through the
+values of certain environment variables. The user cannot change the
+values of most of these variables.
- `_`, the name of the currently running command.
-- `argv`, an array of arguments to the shell or function. `argv` is only defined when inside a function call, or if fish was invoked with a list of arguments, like 'fish myscript.fish foo bar'. This variable can be changed by the user.
+- `argv`, an array of arguments to the shell or function. `argv` is only defined when inside a function call, or if fish was invoked with a list of arguments, like `fish myscript.fish foo bar`. This variable can be changed by the user.
- `history`, an array containing the last commands that were entered.
-- `HOME`, the user's home directory. This variable can only be changed by the root user.
+- `HOME`, the user's home directory. This variable can be changed by the user.
+
+- `IFS`, the internal field separator that is used for word splitting with the <a href="commands.html#read">read builtin</a>. Setting this to the empty string will also disable line splitting in <a href="#expand-command-substitution">command substitution</a>. This variable can be changed by the user.
- `PWD`, the current working directory.
- `status`, the <a href="#variables-status">exit status</a> of the last foreground job to exit. If the job was terminated through a signal, the exit status will be 128 plus the signal number.
-- `USER`, the current username. This variable can only be changed by the root user.
+- `USER`, the current username. This variable can be changed by the user.
- `CMD_DURATION`, the runtime of the last command in milliseconds.
-The names of these variables are mostly derived from the csh family of shells and differ from the ones used by Bourne style shells such as bash.
-
-Variables whose name are in uppercase are exported to the commands started by fish, while those in lowercase are not exported. This rule is not enforced by fish, but it is good coding practice to use casing to distinguish between exported and unexported variables. `fish` also uses several variables internally. Such variables are prefixed with the string `__FISH` or `__fish`. These should never be used by the user. Changing their value may break fish.
+The names of these variables are mostly derived from the csh family of
+shells and differ from the ones used by Bourne style shells such as
+bash.
+Variables whose name are in uppercase are exported to the commands
+started by fish, while those in lowercase are not exported. This rule is not
+enforced by fish, but it is good coding practice to use casing to
+distinguish between exported and unexported variables. `fish` also
+uses several variables internally. Such variables are prefixed with
+the string `__FISH` or `__fish.` These should never be used by the
+user. Changing their value may break fish.
\subsection variables-status The status variable
@@ -1091,9 +1105,9 @@ If you install fish in your home directory, fish will not work correctly for any
If you have a question not answered by this documentation, there are several avenues for help:
--# The official mailing list at <a href='fish-users@lists.sf.net'>fish-users@lists.sf.net</a>
--# The Internet Relay Chat channel, \#fish on `irc.oftc.net`
--# The <a href="http://github.com/fish-shell/fish-shell/">project GitHub page</a>
+-# The official mailing list at <a href='https://lists.sf.net/lists/listinfo/fish-users'>fish-users@lists.sf.net</a>
+-# The Internet Relay Chat channel, `#fish` on `irc.oftc.net`
+-# The <a href="https://github.com/fish-shell/fish-shell/">project GitHub page</a>
If you have an improvement for fish, you can submit it via the mailing list or the GitHub page.