diff options
| author | Chet Ramey <chet.ramey@case.edu> | 2018-09-17 15:10:56 -0400 |
|---|---|---|
| committer | Chet Ramey <chet.ramey@case.edu> | 2018-09-17 15:10:56 -0400 |
| commit | 2f5dfe5a18b4670eb4cea32c1c76295eb70a8865 (patch) | |
| tree | bf19e42dcaf6c5cf8e0ce0a1c15d56e8f8a6d675 /doc/bash.html | |
| parent | 9a51695bed07d37086c352372ac69d0a30039a6b (diff) | |
| download | bash-2f5dfe5a18b4670eb4cea32c1c76295eb70a8865.tar.gz | |
bash-5.0-beta releasebash-5.0-beta
Diffstat (limited to 'doc/bash.html')
| -rw-r--r-- | doc/bash.html | 90 |
1 files changed, 65 insertions, 25 deletions
diff --git a/doc/bash.html b/doc/bash.html index 54b42fec..08e1b4a4 100644 --- a/doc/bash.html +++ b/doc/bash.html @@ -3,7 +3,7 @@ </HEAD> <BODY><TABLE WIDTH=100%> <TR> -<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2018 March 15<TH ALIGN=RIGHT width=33%>BASH(1) +<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2018 August 7<TH ALIGN=RIGHT width=33%>BASH(1) </TR> </TABLE> <BR><A HREF="#index">Index</A> @@ -965,7 +965,7 @@ to be matched as a string. An additional binary operator, <B>=~</B>, is available, with the same precedence as <B>==</B> and <B>!=</B>. When it is used, the string to the right of the operator is considered -an extended regular expression and matched accordingly (as in <I>regex</I>(3)). +a POSIX extended regular expression and matched accordingly (as in <I>regex</I>(3)). The return value is 0 if the string matches the pattern, and 1 otherwise. If the regular expression is syntactically incorrect, the conditional @@ -1738,7 +1738,14 @@ is null, the parameters are joined without intervening separators. <DT><B>@</B> <DD> -Expands to the positional parameters, starting from one. When the +Expands to the positional parameters, starting from one. +In contexts where word splitting is performed, this expands each +positional parameter to a separate word; if not within double +quotes, these words are subject to word splitting. +In contexts where word splitting is not performed, +this expands to a single word +with each positional parameter separated by a space. +When the expansion occurs within double quotes, each parameter expands to a separate word. That is, "<B>$@</B>" is equivalent to "<B>$1</B>" "<B>$2</B>" ... @@ -1922,7 +1929,8 @@ option to the <B>shopt</B> builtin below). -Setting <B>extdebug</B> after the shell has started to execute a script +Setting <B>extdebug</B> after the shell has started to execute a script, +or referencing this variable when <B>extdebug</B> is not set, may result in inconsistent values. <DT><B>BASH_ARGV</B> @@ -1947,7 +1955,8 @@ option to the <B>shopt</B> builtin below). -Setting <B>extdebug</B> after the shell has started to execute a script +Setting <B>extdebug</B> after the shell has started to execute a script, +or referencing this variable when <B>extdebug</B> is not set, may result in inconsistent values. <DT><B>BASH_ARGV0</B> @@ -2634,7 +2643,7 @@ Similar to <FONT SIZE=-1><B>BASH_ENV</B>; </FONT> -used when the shell is invoked in POSIX mode. +used when the shell is invoked in <I>posix mode</I>. <DT><B>EXECIGNORE</B> <DD> @@ -2887,6 +2896,12 @@ startup file, overriding the default of </FONT> below). +<DT><B>INSIDE_EMACS</B> + +<DD> +If this variable appears in the environment when the shell starts, +<B>bash</B> assumes that it is running inside an Emacs shell buffer +and may disable line editing, depending on the value of <B>TERM</B>. <DT><B>LANG</B> <DD> @@ -3043,6 +3058,8 @@ running, <B>bash</B> enables <I>posix mode</I>, as if the command <TT>set -o posix</TT> had been executed. +When the shell enters <I>posix mode</I>, it sets this variable if it was +not already set. <DT><B>PROMPT_COMMAND</B> <DD> @@ -3698,6 +3715,16 @@ and </FONT> and the shell assigns the expanded value. +<P> + +Bash also performs tilde expansion on words satisfying the conditions of +variable assignments (as described above under +<FONT SIZE=-1><B>PARAMETERS</B>) + +</FONT> +when they appear as arguments to simple commands. +Bash does not do this, except for the <I>declaration</I> commands listed +above, when in <I>posix mode</I>. <A NAME="lbBB"> </A> <H4>Parameter Expansion</H4> @@ -3738,16 +3765,16 @@ The <I>parameter</I> is a shell parameter as described above If the first character of <I>parameter</I> is an exclamation point (<B>!</B>), and <I>parameter</I> is not a <I>nameref</I>, -it introduces a level of variable indirection. -<B>Bash</B> uses the value of the variable formed from the rest of -<I>parameter</I> as the name of the variable; this variable is then -expanded and that value is used in the rest of the substitution, rather -than the value of <I>parameter</I> itself. +it introduces a level of indirection. +<B>Bash</B> uses the value formed by expanding the rest of +<I>parameter</I> as the new <I>parameter</I>; this is then +expanded and that value is used in the rest of the expansion, rather +than the expansion of the original <I>parameter</I>. This is known as <I>indirect expansion</I>. The value is subject to tilde expansion, parameter expansion, command substitution, and arithmetic expansion. If <I>parameter</I> is a nameref, this expands to the name of the -variable referenced by <I>parameter</I> instead of performing the +parameter referenced by <I>parameter</I> instead of performing the complete indirect expansion. The exceptions to this are the expansions of ${<B>!</B><I>prefix</I><B>*</B>} and ${<B>!</B><I>name</I>[<I>@</I>]} described below. @@ -6125,7 +6152,7 @@ cannot affect the shell's execution environment. <P> Subshells spawned to execute command substitutions inherit the value of -the <B>-e</B> option from the parent shell. When not in <I>posix</I> mode, +the <B>-e</B> option from the parent shell. When not in <I>posix mode</I>, <B>bash</B> clears the <B>-e</B> option in such subshells. <P> @@ -9745,12 +9772,12 @@ will be displayed. <P> The return value is true unless an invalid option is supplied, or no matches were generated. -<DT><B>complete</B> [<B>-abcdefgjksuv</B>] [<B>-o</B> <I>comp-option</I>] [<B>-DE</B>] [<B>-A</B> <I>action</I>] [<B>-G</B> <I>globpat</I>] [<B>-W</B> <I>wordlist</I>] [<B>-F</B> <I>function</I>] [<B>-C</B> <I>command</I>]<DD> +<DT><B>complete</B> [<B>-abcdefgjksuv</B>] [<B>-o</B> <I>comp-option</I>] [<B>-DEI</B>] [<B>-A</B> <I>action</I>] [<B>-G</B> <I>globpat</I>] [<B>-W</B> <I>wordlist</I>] [<B>-F</B> <I>function</I>] [<B>-C</B> <I>command</I>]<DD> <BR> [<B>-X</B> <I>filterpat</I>] [<B>-P</B> <I>prefix</I>] [<B>-S</B> <I>suffix</I>] <I>name</I> [<I>name ...</I>] -<DT><B>complete</B> <B>-pr</B> [<B>-DE</B>] [<I>name</I> ...]<DD> +<DT><B>complete</B> <B>-pr</B> [<B>-DEI</B>] [<I>name</I> ...]<DD> Specify how arguments to each <I>name</I> should be completed. If the <B>-p</B> option is supplied, or if no options are supplied, @@ -9759,12 +9786,21 @@ them to be reused as input. The <B>-r</B> option removes a completion specification for each <I>name</I>, or, if no <I>name</I>s are supplied, all completion specifications. -The <B>-D</B> option indicates that the remaining options and actions should +The <B>-D</B> option indicates that other supplied options and actions should apply to the ``default'' command completion; that is, completion attempted on a command for which no completion has previously been defined. -The <B>-E</B> option indicates that the remaining options and actions should +The <B>-E</B> option indicates that other supplied options and actions should apply to ``empty'' command completion; that is, completion attempted on a blank line. +The <B>-I</B> option indicates that other supplied options and actions should +apply to completion on the inital non-assignment word on the line, or after +a command delimiter such as <B>;</B> or <B>|</B>, which is usually command +name completion. +If multiple options are supplied, the <B>-D</B> option takes precedence +over <B>-E</B>, and both take precedence over <B>-I</B>. +If any of <B>-D</B>, <B>-E</B>, or <B>-I</B> are supplied, any other +<I>name</I> arguments are ignored; these completions only apply to the case +specified by the option. <P> The process of applying these completion specifications when word completion is attempted is described above under <B>Programmable Completion</B>. @@ -9995,7 +10031,7 @@ a <I>name</I> for which no specification exists, or an error occurs adding a completion specification. </DL> -<DT><B>compopt</B> [<B>-o</B> <I>option</I>] [<B>-DE</B>] [<B>+o</B> <I>option</I>] [<I>name</I>]<DD> +<DT><B>compopt</B> [<B>-o</B> <I>option</I>] [<B>-DEI</B>] [<B>+o</B> <I>option</I>] [<I>name</I>]<DD> Modify completion options for each <I>name</I> according to the <I>option</I>s, or for the currently-executing completion if no <I>name</I>s are supplied. @@ -10003,12 +10039,16 @@ If no <I>option</I>s are given, display the completion options for each <I>name</I> or the current completion. The possible values of <I>option</I> are those valid for the <B>complete</B> builtin described above. -The <B>-D</B> option indicates that the remaining options should +The <B>-D</B> option indicates that other supplied options should apply to the ``default'' command completion; that is, completion attempted on a command for which no completion has previously been defined. -The <B>-E</B> option indicates that the remaining options should +The <B>-E</B> option indicates that other supplied options should apply to ``empty'' command completion; that is, completion attempted on a blank line. +The <B>-I</B> option indicates that other supplied options should +apply to completion on the inital non-assignment word on the line, +or after a command delimiter such as <B>;</B> or <B>|</B>, which is usually +command name completion. <P> The return value is true unless an invalid option is supplied, an attempt is made to modify the options for a <I>name</I> for which no completion @@ -11727,7 +11767,7 @@ Without options, the name and value of each shell variable are displayed in a format that can be reused as input for setting or resetting the currently-set variables. Read-only variables cannot be reset. -In <I>posix</I> mode, only shell variables are listed. +In <I>posix mode</I>, only shell variables are listed. The output is sorted according to the current locale. When options are specified, they set or unset shell attributes. Any arguments remaining after option processing are treated @@ -12444,7 +12484,7 @@ interrupt; previous versions continue with the next command in the list. If set, <B>bash</B>, -when in <I>posix</I> mode, treats a single quote in a double-quoted +when in <I>posix mode</I>, treats a single quote in a double-quoted parameter expansion as a special character. The single quotes must match (an even number) and the characters between the single quotes are considered quoted. This is the behavior of posix mode through version 4.1. @@ -13426,7 +13466,7 @@ and <B>-u</B>, which are unscaled values; -and, when in Posix mode, +and, when in posix mode, <B>-c</B> and @@ -13852,7 +13892,7 @@ There may be only one active coprocess at a time. <HR> <TABLE WIDTH=100%> <TR> -<TH ALIGN=LEFT width=33%>GNU Bash 5.0<TH ALIGN=CENTER width=33%>2018 March 15<TH ALIGN=RIGHT width=33%>BASH(1) +<TH ALIGN=LEFT width=33%>GNU Bash 5.0<TH ALIGN=CENTER width=33%>2018 August 7<TH ALIGN=RIGHT width=33%>BASH(1) </TR> </TABLE> <HR> @@ -13958,6 +13998,6 @@ There may be only one active coprocess at a time. </DL> <HR> This document was created by man2html from bash.1.<BR> -Time: 19 March 2018 09:43:32 EDT +Time: 07 September 2018 16:15:28 EDT </BODY> </HTML> |
