The value of a variable is evaluated as an arithmetic expression when
it is referenced, or when a variable which has been given the _\bi_\bn_\bt_\be_\bg_\be_\br
attribute using d\bde\bec\bcl\bla\bar\bre\be -\b-i\bi is assigned a value. A null value evaluates
- to 0. A shell variable need not have its _\bi_\bn_\bt_\be_\bg_\be_\br attribute turned on
- to be used in an expression.
+ to 0. A shell variable need not have its _\bi_\bn_\bt_\be_\bg_\be_\br attribute enabled to
+ be used in an expression.
Integer constants follow the C language definition, without suffixes or
character constants. Constants with a leading 0 are interpreted as oc-
their r\bre\bea\bad\bdl\bli\bin\bne\be equivalents. These override the default r\bre\bea\bad\bdl\bli\bin\bne\be
bindings described here. Type "stty -a" at a b\bba\bas\bsh\bh prompt to see
your current terminal settings, including the special control
- characters (usually c\bcc\bch\bha\bar\brs\bs).
+ characters (usually c\bcc\bch\bha\bar\brs\bs). This binding takes place on each
+ call to r\bre\bea\bad\bdl\bli\bin\bne\be, so changes made by "stty" can take effect.
b\bbl\bli\bin\bnk\bk-\b-m\bma\bat\btc\bch\bhi\bin\bng\bg-\b-p\bpa\bar\bre\ben\bn (\b(O\bOf\bff\bf)\b)
If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be attempts to briefly move the cursor to an
opening parenthesis when a closing parenthesis is inserted.
c\bco\bol\blo\bor\bre\bed\bd-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-p\bpr\bre\bef\bfi\bix\bx (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, when listing completions, r\bre\bea\bad\bdl\bli\bin\bne\be displays the
+ If set to O\bOn\bn, when listing completions, r\bre\bea\bad\bdl\bli\bin\bne\be displays the
common prefix of the set of possible completions using a differ-
- ent color. The color definitions are taken from the value of
+ ent color. The color definitions are taken from the value of
the L\bLS\bS_\b_C\bCO\bOL\bLO\bOR\bRS\bS environment variable. If there is a color defini-
tion in $\b$L\bLS\bS_\b_C\bCO\bOL\bLO\bOR\bRS\bS for the custom suffix ".readline-colored-com-
- pletion-prefix", r\bre\bea\bad\bdl\bli\bin\bne\be uses this color for the common prefix
+ pletion-prefix", r\bre\bea\bad\bdl\bli\bin\bne\be uses this color for the common prefix
instead of its default.
c\bco\bol\blo\bor\bre\bed\bd-\b-s\bst\bta\bat\bts\bs (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be displays possible completions using dif-
- ferent colors to indicate their file type. The color defini-
- tions are taken from the value of the L\bLS\bS_\b_C\bCO\bOL\bLO\bOR\bRS\bS environment
+ If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be displays possible completions using dif-
+ ferent colors to indicate their file type. The color defini-
+ tions are taken from the value of the L\bLS\bS_\b_C\bCO\bOL\bLO\bOR\bRS\bS environment
variable.
c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn (\b("#\b#")\b)
- The string that the r\bre\bea\bad\bdl\bli\bin\bne\be i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmm\bme\ben\bnt\bt command inserts.
- This command is bound to M\bM-\b-#\b# in emacs mode and to #\b# in vi com-
+ The string that the r\bre\bea\bad\bdl\bli\bin\bne\be i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmm\bme\ben\bnt\bt command inserts.
+ This command is bound to M\bM-\b-#\b# in emacs mode and to #\b# in vi com-
mand mode.
c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-d\bdi\bis\bsp\bpl\bla\bay\by-\b-w\bwi\bid\bdt\bth\bh (\b(-\b-1\b1)\b)
- The number of screen columns used to display possible matches
- when performing completion. The value is ignored if it is less
- than 0 or greater than the terminal screen width. A value of 0
- causes matches to be displayed one per line. The default value
+ The number of screen columns used to display possible matches
+ when performing completion. The value is ignored if it is less
+ than 0 or greater than the terminal screen width. A value of 0
+ causes matches to be displayed one per line. The default value
is -1.
c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-i\big\bgn\bno\bor\bre\be-\b-c\bca\bas\bse\be (\b(O\bOf\bff\bf)\b)
If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be performs filename matching and completion
in a case-insensitive fashion.
c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-m\bma\bap\bp-\b-c\bca\bas\bse\be (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, and c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-i\big\bgn\bno\bor\bre\be-\b-c\bca\bas\bse\be is enabled, r\bre\bea\bad\bdl\bli\bin\bne\be
- treats hyphens (_\b-) and underscores (_\b_) as equivalent when per-
+ If set to O\bOn\bn, and c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-i\big\bgn\bno\bor\bre\be-\b-c\bca\bas\bse\be is enabled, r\bre\bea\bad\bdl\bli\bin\bne\be
+ treats hyphens (_\b-) and underscores (_\b_) as equivalent when per-
forming case-insensitive filename matching and completion.
c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-p\bpr\bre\bef\bfi\bix\bx-\b-d\bdi\bis\bsp\bpl\bla\bay\by-\b-l\ble\ben\bng\bgt\bth\bh (\b(0\b0)\b)
- The maximum length in characters of the common prefix of a list
- of possible completions that is displayed without modification.
- When set to a value greater than zero, r\bre\bea\bad\bdl\bli\bin\bne\be replaces common
+ The maximum length in characters of the common prefix of a list
+ of possible completions that is displayed without modification.
+ When set to a value greater than zero, r\bre\bea\bad\bdl\bli\bin\bne\be replaces common
prefixes longer than this value with an ellipsis when displaying
possible completions. If a completion begins with a period, and
- e\bea\bad\bdl\bli\bin\bne\be is completing filenames, it uses three underscores in-
+ e\bea\bad\bdl\bli\bin\bne\be is completing filenames, it uses three underscores in-
stead of an ellipsis.
c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-q\bqu\bue\ber\bry\by-\b-i\bit\bte\bem\bms\bs (\b(1\b10\b00\b0)\b)
- This determines when the user is queried about viewing the num-
- ber of possible completions generated by the p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\be-\b-
- t\bti\bio\bon\bns\bs command. It may be set to any integer value greater than
- or equal to zero. If the number of possible completions is
- greater than or equal to the value of this variable, r\bre\bea\bad\bdl\bli\bin\bne\be
- asks whether or not the user wishes to view them; otherwise
- r\bre\bea\bad\bdl\bli\bin\bne\be simply lists them on the terminal. A zero value means
+ This determines when the user is queried about viewing the num-
+ ber of possible completions generated by the p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\be-\b-
+ t\bti\bio\bon\bns\bs command. It may be set to any integer value greater than
+ or equal to zero. If the number of possible completions is
+ greater than or equal to the value of this variable, r\bre\bea\bad\bdl\bli\bin\bne\be
+ asks whether or not the user wishes to view them; otherwise
+ r\bre\bea\bad\bdl\bli\bin\bne\be simply lists them on the terminal. A zero value means
r\bre\bea\bad\bdl\bli\bin\bne\be should never ask; negative values are treated as zero.
c\bco\bon\bnv\bve\ber\brt\bt-\b-m\bme\bet\bta\ba (\b(O\bOn\bn)\b)
- If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be converts characters it reads that have
- the eighth bit set to an ASCII key sequence by clearing the
+ If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be converts characters it reads that have
+ the eighth bit set to an ASCII key sequence by clearing the
eighth bit and prefixing it with an escape character (converting
- the character to have the meta prefix). The default is _\bO_\bn, but
- r\bre\bea\bad\bdl\bli\bin\bne\be sets it to _\bO_\bf_\bf if the locale contains characters whose
+ the character to have the meta prefix). The default is _\bO_\bn, but
+ r\bre\bea\bad\bdl\bli\bin\bne\be sets it to _\bO_\bf_\bf if the locale contains characters whose
encodings may include bytes with the eighth bit set. This vari-
- able is dependent on the L\bLC\bC_\b_C\bCT\bTY\bYP\bPE\bE locale category, and may
- change if the locale changes. This variable also affects key
+ able is dependent on the L\bLC\bC_\b_C\bCT\bTY\bYP\bPE\bE locale category, and may
+ change if the locale changes. This variable also affects key
bindings; see the description of f\bfo\bor\brc\bce\be-\b-m\bme\bet\bta\ba-\b-p\bpr\bre\bef\bfi\bix\bx below.
d\bdi\bis\bsa\bab\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be inhibits word completion. Completion
+ If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be inhibits word completion. Completion
characters are inserted into the line as if they had been mapped
to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt.
e\bec\bch\bho\bo-\b-c\bco\bon\bnt\btr\bro\bol\bl-\b-c\bch\bha\bar\bra\bac\bct\bte\ber\brs\bs (\b(O\bOn\bn)\b)
- When set to O\bOn\bn, on operating systems that indicate they support
+ When set to O\bOn\bn, on operating systems that indicate they support
it, r\bre\bea\bad\bdl\bli\bin\bne\be echoes a character corresponding to a signal gener-
ated from the keyboard.
e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be (\b(e\bem\bma\bac\bcs\bs)\b)
- Controls whether r\bre\bea\bad\bdl\bli\bin\bne\be uses a set of key bindings similar to
+ Controls whether r\bre\bea\bad\bdl\bli\bin\bne\be uses a set of key bindings similar to
_\bE_\bm_\ba_\bc_\bs or _\bv_\bi. e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be can be set to either e\bem\bma\bac\bcs\bs or v\bvi\bi.
e\bem\bma\bac\bcs\bs-\b-m\bmo\bod\bde\be-\b-s\bst\btr\bri\bin\bng\bg (\b(@\b@)\b)
- If the _\bs_\bh_\bo_\bw_\b-_\bm_\bo_\bd_\be_\b-_\bi_\bn_\b-_\bp_\br_\bo_\bm_\bp_\bt variable is enabled, this string is
+ If the _\bs_\bh_\bo_\bw_\b-_\bm_\bo_\bd_\be_\b-_\bi_\bn_\b-_\bp_\br_\bo_\bm_\bp_\bt variable is enabled, this string is
displayed immediately before the last line of the primary prompt
when emacs editing mode is active. The value is expanded like a
- key binding, so the standard set of meta- and control- prefixes
- and backslash escape sequences is available. The \1 and \2 es-
- capes begin and end sequences of non-printing characters, which
- can be used to embed a terminal control sequence into the mode
+ key binding, so the standard set of meta- and control- prefixes
+ and backslash escape sequences is available. The \1 and \2 es-
+ capes begin and end sequences of non-printing characters, which
+ can be used to embed a terminal control sequence into the mode
string.
e\ben\bna\bab\bbl\ble\be-\b-a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn (\b(O\bOn\bn)\b)
- When this variable is set to _\bO_\bn, r\bre\bea\bad\bdl\bli\bin\bne\be allows certain com-
+ When this variable is set to _\bO_\bn, r\bre\bea\bad\bdl\bli\bin\bne\be allows certain com-
mands to designate the region as _\ba_\bc_\bt_\bi_\bv_\be. When the region is ac-
tive, r\bre\bea\bad\bdl\bli\bin\bne\be highlights the text in the region using the value
of the a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn-\b-s\bst\bta\bar\brt\bt-\b-c\bco\bol\blo\bor\br variable, which defaults to the
- string that enables the terminal's standout mode. The active
+ string that enables the terminal's standout mode. The active
region shows the text inserted by bracketed-paste and any match-
ing text found by incremental and non-incremental history
searches.
e\ben\bna\bab\bbl\ble\be-\b-b\bbr\bra\bac\bck\bke\bet\bte\bed\bd-\b-p\bpa\bas\bst\bte\be (\b(O\bOn\bn)\b)
- When set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be configures the terminal to insert each
- paste into the editing buffer as a single string of characters,
- instead of treating each character as if it had been read from
- the keyboard. This is called _\bb_\br_\ba_\bc_\bk_\be_\bt_\be_\bd_\b-_\bp_\ba_\bs_\bt_\be _\bm_\bo_\bd_\be; it prevents
- r\bre\bea\bad\bdl\bli\bin\bne\be from executing any editing commands bound to key se-
+ When set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be configures the terminal to insert each
+ paste into the editing buffer as a single string of characters,
+ instead of treating each character as if it had been read from
+ the keyboard. This is called _\bb_\br_\ba_\bc_\bk_\be_\bt_\be_\bd_\b-_\bp_\ba_\bs_\bt_\be _\bm_\bo_\bd_\be; it prevents
+ r\bre\bea\bad\bdl\bli\bin\bne\be from executing any editing commands bound to key se-
quences appearing in the pasted text.
e\ben\bna\bab\bbl\ble\be-\b-k\bke\bey\byp\bpa\bad\bd (\b(O\bOf\bff\bf)\b)
When set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be tries to enable the application keypad
- when it is called. Some systems need this to enable the arrow
+ when it is called. Some systems need this to enable the arrow
keys.
e\ben\bna\bab\bbl\ble\be-\b-m\bme\bet\bta\ba-\b-k\bke\bey\by (\b(O\bOn\bn)\b)
- When set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be tries to enable any meta modifier key
+ When set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be tries to enable any meta modifier key
the terminal claims to support. On many terminals, the Meta key
- is used to send eight-bit characters; this variable checks for
- the terminal capability that indicates the terminal can enable
- and disable a mode that sets the eighth bit of a character
- (0200) if the Meta key is held down when the character is typed
+ is used to send eight-bit characters; this variable checks for
+ the terminal capability that indicates the terminal can enable
+ and disable a mode that sets the eighth bit of a character
+ (0200) if the Meta key is held down when the character is typed
(a meta character).
e\bex\bxp\bpa\ban\bnd\bd-\b-t\bti\bil\bld\bde\be (\b(O\bOf\bff\bf)\b)
If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be performs tilde expansion when it attempts
word completion.
f\bfo\bor\brc\bce\be-\b-m\bme\bet\bta\ba-\b-p\bpr\bre\bef\bfi\bix\bx (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be modifies its behavior when binding key
- sequences containing \M- or Meta- (see K\bKe\bey\by B\bBi\bin\bnd\bdi\bin\bng\bgs\bs above) by
+ If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be modifies its behavior when binding key
+ sequences containing \M- or Meta- (see K\bKe\bey\by B\bBi\bin\bnd\bdi\bin\bng\bgs\bs above) by
converting a key sequence of the form \M-_\bC or Meta-_\bC to the two-
- character sequence E\bES\bSC\bC _\bC (adding the meta prefix). If
+ character sequence E\bES\bSC\bC _\bC (adding the meta prefix). If
f\bfo\bor\brc\bce\be-\b-m\bme\bet\bta\ba-\b-p\bpr\bre\bef\bfi\bix\bx is set to O\bOf\bff\bf (the default), r\bre\bea\bad\bdl\bli\bin\bne\be uses the
- value of the c\bco\bon\bnv\bve\ber\brt\bt-\b-m\bme\bet\bta\ba variable to determine whether to per-
- form this conversion: if c\bco\bon\bnv\bve\ber\brt\bt-\b-m\bme\bet\bta\ba is O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be performs
- the conversion described above; if it is O\bOf\bff\bf, r\bre\bea\bad\bdl\bli\bin\bne\be converts
+ value of the c\bco\bon\bnv\bve\ber\brt\bt-\b-m\bme\bet\bta\ba variable to determine whether to per-
+ form this conversion: if c\bco\bon\bnv\bve\ber\brt\bt-\b-m\bme\bet\bta\ba is O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be performs
+ the conversion described above; if it is O\bOf\bff\bf, r\bre\bea\bad\bdl\bli\bin\bne\be converts
_\bC to a meta character by setting the eighth bit (0200).
h\bhi\bis\bst\bto\bor\bry\by-\b-p\bpr\bre\bes\bse\ber\brv\bve\be-\b-p\bpo\boi\bin\bnt\bt (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, the history code attempts to place point at the
- same location on each history line retrieved with p\bpr\bre\bev\bvi\bio\bou\bus\bs-\b-h\bhi\bis\bs-\b-
+ If set to O\bOn\bn, the history code attempts to place point at the
+ same location on each history line retrieved with p\bpr\bre\bev\bvi\bio\bou\bus\bs-\b-h\bhi\bis\bs-\b-
t\bto\bor\bry\by or n\bne\bex\bxt\bt-\b-h\bhi\bis\bst\bto\bor\bry\by.
h\bhi\bis\bst\bto\bor\bry\by-\b-s\bsi\biz\bze\be (\b(u\bun\bns\bse\bet\bt)\b)
- Set the maximum number of history entries saved in the history
- list. If set to zero, any existing history entries are deleted
+ Set the maximum number of history entries saved in the history
+ list. If set to zero, any existing history entries are deleted
and no new entries are saved. If set to a value less than zero,
- the number of history entries is not limited. By default, b\bba\bas\bsh\bh
- sets the maximum number of history entries to the value of the
- H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE shell variable. Setting _\bh_\bi_\bs_\bt_\bo_\br_\by_\b-_\bs_\bi_\bz_\be to a non-numeric
+ the number of history entries is not limited. By default, b\bba\bas\bsh\bh
+ sets the maximum number of history entries to the value of the
+ H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE shell variable. Setting _\bh_\bi_\bs_\bt_\bo_\br_\by_\b-_\bs_\bi_\bz_\be to a non-numeric
value will set the maximum number of history entries to 500.
h\bho\bor\bri\biz\bzo\bon\bnt\bta\bal\bl-\b-s\bsc\bcr\bro\bol\bll\bl-\b-m\bmo\bod\bde\be (\b(O\bOf\bff\bf)\b)
Setting this variable to O\bOn\bn makes r\bre\bea\bad\bdl\bli\bin\bne\be use a single line for
- display, scrolling the input horizontally on a single screen
- line when it becomes longer than the screen width rather than
- wrapping to a new line. This setting is automatically enabled
+ display, scrolling the input horizontally on a single screen
+ line when it becomes longer than the screen width rather than
+ wrapping to a new line. This setting is automatically enabled
for terminals of height 1.
i\bin\bnp\bpu\but\bt-\b-m\bme\bet\bta\ba (\b(O\bOf\bff\bf)\b)
If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be enables eight-bit input (that is, it does
not clear the eighth bit in the characters it reads), regardless
of what the terminal claims it can support. The default is _\bO_\bf_\bf,
- but r\bre\bea\bad\bdl\bli\bin\bne\be sets it to _\bO_\bn if the locale contains characters
+ but r\bre\bea\bad\bdl\bli\bin\bne\be sets it to _\bO_\bn if the locale contains characters
whose encodings may include bytes with the eighth bit set. This
- variable is dependent on the L\bLC\bC_\b_C\bCT\bTY\bYP\bPE\bE locale category, and its
+ variable is dependent on the L\bLC\bC_\b_C\bCT\bTY\bYP\bPE\bE locale category, and its
value may change if the locale changes. The name m\bme\bet\bta\ba-\b-f\bfl\bla\bag\bg is a
synonym for i\bin\bnp\bpu\but\bt-\b-m\bme\bet\bta\ba.
i\bis\bse\bea\bar\brc\bch\bh-\b-t\bte\ber\brm\bmi\bin\bna\bat\bto\bor\brs\bs (\b("C\bC-\b-[\b[C\bC-\b-j\bj")\b)
- The string of characters that should terminate an incremental
- search without subsequently executing the character as a com-
- mand. If this variable has not been given a value, the charac-
+ The string of characters that should terminate an incremental
+ search without subsequently executing the character as a com-
+ mand. If this variable has not been given a value, the charac-
ters _\bE_\bS_\bC and C\bC-\b-j\bj terminate an incremental search.
k\bke\bey\bym\bma\bap\bp (\b(e\bem\bma\bac\bcs\bs)\b)
- Set the current r\bre\bea\bad\bdl\bli\bin\bne\be keymap. The set of valid keymap names
- is _\be_\bm_\ba_\bc_\bs_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bm_\be_\bt_\ba_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx_\b, _\bv_\bi_\b, _\bv_\bi_\b-_\bc_\bo_\bm_\b-
- _\bm_\ba_\bn_\bd, and _\bv_\bi_\b-_\bi_\bn_\bs_\be_\br_\bt. _\bv_\bi is equivalent to _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd; _\be_\bm_\ba_\bc_\bs is
- equivalent to _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd. The default value is _\be_\bm_\ba_\bc_\bs; the
+ Set the current r\bre\bea\bad\bdl\bli\bin\bne\be keymap. The set of valid keymap names
+ is _\be_\bm_\ba_\bc_\bs_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bm_\be_\bt_\ba_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx_\b, _\bv_\bi_\b, _\bv_\bi_\b-_\bc_\bo_\bm_\b-
+ _\bm_\ba_\bn_\bd, and _\bv_\bi_\b-_\bi_\bn_\bs_\be_\br_\bt. _\bv_\bi is equivalent to _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd; _\be_\bm_\ba_\bc_\bs is
+ equivalent to _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd. The default value is _\be_\bm_\ba_\bc_\bs; the
value of e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be also affects the default keymap.
k\bke\bey\bys\bse\beq\bq-\b-t\bti\bim\bme\beo\bou\but\bt (\b(5\b50\b00\b0)\b)
- Specifies the duration r\bre\bea\bad\bdl\bli\bin\bne\be will wait for a character when
- reading an ambiguous key sequence (one that can form a complete
+ Specifies the duration r\bre\bea\bad\bdl\bli\bin\bne\be will wait for a character when
+ reading an ambiguous key sequence (one that can form a complete
key sequence using the input read so far, or can take additional
- input to complete a longer key sequence). If r\bre\bea\bad\bdl\bli\bin\bne\be does not
- receive any input within the timeout, it uses the shorter but
- complete key sequence. The value is specified in milliseconds,
- so a value of 1000 means that r\bre\bea\bad\bdl\bli\bin\bne\be will wait one second for
- additional input. If this variable is set to a value less than
- or equal to zero, or to a non-numeric value, r\bre\bea\bad\bdl\bli\bin\bne\be waits un-
- til another key is pressed to decide which key sequence to com-
+ input to complete a longer key sequence). If r\bre\bea\bad\bdl\bli\bin\bne\be does not
+ receive any input within the timeout, it uses the shorter but
+ complete key sequence. The value is specified in milliseconds,
+ so a value of 1000 means that r\bre\bea\bad\bdl\bli\bin\bne\be will wait one second for
+ additional input. If this variable is set to a value less than
+ or equal to zero, or to a non-numeric value, r\bre\bea\bad\bdl\bli\bin\bne\be waits un-
+ til another key is pressed to decide which key sequence to com-
plete.
m\bma\bar\brk\bk-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs (\b(O\bOn\bn)\b)
If set to O\bOn\bn, completed directory names have a slash appended.
m\bma\bar\brk\bk-\b-m\bmo\bod\bdi\bif\bfi\bie\bed\bd-\b-l\bli\bin\bne\bes\bs (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be displays history lines that have been
+ If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be displays history lines that have been
modified with a preceding asterisk (*\b*).
m\bma\bar\brk\bk-\b-s\bsy\bym\bml\bli\bin\bnk\bke\bed\bd-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs (\b(O\bOf\bff\bf)\b)
If set to O\bOn\bn, completed names which are symbolic links to direc-
- tories have a slash appended, subject to the value of m\bma\bar\brk\bk-\b-d\bdi\bi-\b-
+ tories have a slash appended, subject to the value of m\bma\bar\brk\bk-\b-d\bdi\bi-\b-
r\bre\bec\bct\bto\bor\bri\bie\bes\bs.
m\bma\bat\btc\bch\bh-\b-h\bhi\bid\bdd\bde\ben\bn-\b-f\bfi\bil\ble\bes\bs (\b(O\bOn\bn)\b)
- This variable, when set to O\bOn\bn, forces r\bre\bea\bad\bdl\bli\bin\bne\be to match files
- whose names begin with a "." (hidden files) when performing
- filename completion. If set to O\bOf\bff\bf, the user must include the
+ This variable, when set to O\bOn\bn, forces r\bre\bea\bad\bdl\bli\bin\bne\be to match files
+ whose names begin with a "." (hidden files) when performing
+ filename completion. If set to O\bOf\bff\bf, the user must include the
leading "." in the filename to be completed.
m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-d\bdi\bis\bsp\bpl\bla\bay\by-\b-p\bpr\bre\bef\bfi\bix\bx (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, menu completion displays the common prefix of the
+ If set to O\bOn\bn, menu completion displays the common prefix of the
list of possible completions (which may be empty) before cycling
through the list.
o\bou\but\btp\bpu\but\bt-\b-m\bme\bet\bta\ba (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be displays characters with the eighth bit
- set directly rather than as a meta-prefixed escape sequence.
- The default is _\bO_\bf_\bf, but r\bre\bea\bad\bdl\bli\bin\bne\be sets it to _\bO_\bn if the locale
- contains characters whose encodings may include bytes with the
- eighth bit set. This variable is dependent on the L\bLC\bC_\b_C\bCT\bTY\bYP\bPE\bE lo-
+ If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be displays characters with the eighth bit
+ set directly rather than as a meta-prefixed escape sequence.
+ The default is _\bO_\bf_\bf, but r\bre\bea\bad\bdl\bli\bin\bne\be sets it to _\bO_\bn if the locale
+ contains characters whose encodings may include bytes with the
+ eighth bit set. This variable is dependent on the L\bLC\bC_\b_C\bCT\bTY\bYP\bPE\bE lo-
cale category, and its value may change if the locale changes.
p\bpa\bag\bge\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(O\bOn\bn)\b)
If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be uses an internal pager resembling _\bm_\bo_\br_\be(1)
p\bpr\bre\bef\bfe\ber\br-\b-v\bvi\bis\bsi\bib\bbl\ble\be-\b-b\bbe\bel\bll\bl
See b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be.
p\bpr\bri\bin\bnt\bt-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs-\b-h\bho\bor\bri\biz\bzo\bon\bnt\bta\bal\bll\bly\by (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be displays completions with matches sorted
+ If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be displays completions with matches sorted
horizontally in alphabetical order, rather than down the screen.
r\bre\bev\bve\ber\brt\bt-\b-a\bal\bll\bl-\b-a\bat\bt-\b-n\bne\bew\bwl\bli\bin\bne\be (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be will undo all changes to history lines
- before returning when executing a\bac\bcc\bce\bep\bpt\bt-\b-l\bli\bin\bne\be. By default, his-
- tory lines may be modified and retain individual undo lists
+ If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be will undo all changes to history lines
+ before returning when executing a\bac\bcc\bce\bep\bpt\bt-\b-l\bli\bin\bne\be. By default, his-
+ tory lines may be modified and retain individual undo lists
across calls to r\bre\bea\bad\bdl\bli\bin\bne\be.
s\bse\bea\bar\brc\bch\bh-\b-i\big\bgn\bno\bor\bre\be-\b-c\bca\bas\bse\be (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be performs incremental and non-incremental
+ If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be performs incremental and non-incremental
history list searches in a case-insensitive fashion.
s\bsh\bho\bow\bw-\b-a\bal\bll\bl-\b-i\bif\bf-\b-a\bam\bmb\bbi\big\bgu\buo\bou\bus\bs (\b(O\bOf\bff\bf)\b)
- This alters the default behavior of the completion functions.
+ This alters the default behavior of the completion functions.
If set to O\bOn\bn, words which have more than one possible completion
- cause the matches to be listed immediately instead of ringing
+ cause the matches to be listed immediately instead of ringing
the bell.
s\bsh\bho\bow\bw-\b-a\bal\bll\bl-\b-i\bif\bf-\b-u\bun\bnm\bmo\bod\bdi\bif\bfi\bie\bed\bd (\b(O\bOf\bff\bf)\b)
- This alters the default behavior of the completion functions in
+ This alters the default behavior of the completion functions in
a fashion similar to s\bsh\bho\bow\bw-\b-a\bal\bll\bl-\b-i\bif\bf-\b-a\bam\bmb\bbi\big\bgu\buo\bou\bus\bs. If set to O\bOn\bn, words
- which have more than one possible completion without any possi-
- ble partial completion (the possible completions don't share a
- common prefix) cause the matches to be listed immediately in-
+ which have more than one possible completion without any possi-
+ ble partial completion (the possible completions don't share a
+ common prefix) cause the matches to be listed immediately in-
stead of ringing the bell.
s\bsh\bho\bow\bw-\b-m\bmo\bod\bde\be-\b-i\bin\bn-\b-p\bpr\bro\bom\bmp\bpt\bt (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, add a string to the beginning of the prompt indi-
- cating the editing mode: emacs, vi command, or vi insertion.
+ If set to O\bOn\bn, add a string to the beginning of the prompt indi-
+ cating the editing mode: emacs, vi command, or vi insertion.
The mode strings are user-settable (e.g., _\be_\bm_\ba_\bc_\bs_\b-_\bm_\bo_\bd_\be_\b-_\bs_\bt_\br_\bi_\bn_\bg).
s\bsk\bki\bip\bp-\b-c\bco\bom\bmp\bpl\ble\bet\bte\bed\bd-\b-t\bte\bex\bxt\bt (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, this alters the default completion behavior when
- inserting a single match into the line. It's only active when
- performing completion in the middle of a word. If enabled,
- r\bre\bea\bad\bdl\bli\bin\bne\be does not insert characters from the completion that
- match characters after point in the word being completed, so
+ If set to O\bOn\bn, this alters the default completion behavior when
+ inserting a single match into the line. It's only active when
+ performing completion in the middle of a word. If enabled,
+ r\bre\bea\bad\bdl\bli\bin\bne\be does not insert characters from the completion that
+ match characters after point in the word being completed, so
portions of the word following the cursor are not duplicated.
v\bvi\bi-\b-c\bcm\bmd\bd-\b-m\bmo\bod\bde\be-\b-s\bst\btr\bri\bin\bng\bg (\b((\b(c\bcm\bmd\bd)\b))\b)
- If the _\bs_\bh_\bo_\bw_\b-_\bm_\bo_\bd_\be_\b-_\bi_\bn_\b-_\bp_\br_\bo_\bm_\bp_\bt variable is enabled, this string is
+ If the _\bs_\bh_\bo_\bw_\b-_\bm_\bo_\bd_\be_\b-_\bi_\bn_\b-_\bp_\br_\bo_\bm_\bp_\bt variable is enabled, this string is
displayed immediately before the last line of the primary prompt
- when vi editing mode is active and in command mode. The value
+ when vi editing mode is active and in command mode. The value
is expanded like a key binding, so the standard set of meta- and
- control- prefixes and backslash escape sequences is available.
- The \1 and \2 escapes begin and end sequences of non-printing
- characters, which can be used to embed a terminal control se-
+ control- prefixes and backslash escape sequences is available.
+ The \1 and \2 escapes begin and end sequences of non-printing
+ characters, which can be used to embed a terminal control se-
quence into the mode string.
v\bvi\bi-\b-i\bin\bns\bs-\b-m\bmo\bod\bde\be-\b-s\bst\btr\bri\bin\bng\bg (\b((\b(i\bin\bns\bs)\b))\b)
- If the _\bs_\bh_\bo_\bw_\b-_\bm_\bo_\bd_\be_\b-_\bi_\bn_\b-_\bp_\br_\bo_\bm_\bp_\bt variable is enabled, this string is
+ If the _\bs_\bh_\bo_\bw_\b-_\bm_\bo_\bd_\be_\b-_\bi_\bn_\b-_\bp_\br_\bo_\bm_\bp_\bt variable is enabled, this string is
displayed immediately before the last line of the primary prompt
when vi editing mode is active and in insertion mode. The value
is expanded like a key binding, so the standard set of meta- and
- control- prefixes and backslash escape sequences is available.
- The \1 and \2 escapes begin and end sequences of non-printing
- characters, which can be used to embed a terminal control se-
+ control- prefixes and backslash escape sequences is available.
+ The \1 and \2 escapes begin and end sequences of non-printing
+ characters, which can be used to embed a terminal control se-
quence into the mode string.
v\bvi\bis\bsi\bib\bbl\ble\be-\b-s\bst\bta\bat\bts\bs (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, a character denoting a file's type as reported by
- _\bs_\bt_\ba_\bt(2) is appended to the filename when listing possible com-
+ If set to O\bOn\bn, a character denoting a file's type as reported by
+ _\bs_\bt_\ba_\bt(2) is appended to the filename when listing possible com-
pletions.
R\bRe\bea\bad\bdl\bli\bin\bne\be C\bCo\bon\bnd\bdi\bit\bti\bio\bon\bna\bal\bl C\bCo\bon\bns\bst\btr\bru\buc\bct\bts\bs
- R\bRe\bea\bad\bdl\bli\bin\bne\be implements a facility similar in spirit to the conditional
- compilation features of the C preprocessor which allows key bindings
- and variable settings to be performed as the result of tests. There
+ R\bRe\bea\bad\bdl\bli\bin\bne\be implements a facility similar in spirit to the conditional
+ compilation features of the C preprocessor which allows key bindings
+ and variable settings to be performed as the result of tests. There
are four parser directives available.
- $\b$i\bif\bf The $\b$i\bif\bf construct allows bindings to be made based on the edit-
- ing mode, the terminal being used, or the application using
- r\bre\bea\bad\bdl\bli\bin\bne\be. The text of the test, after any comparison operator,
+ $\b$i\bif\bf The $\b$i\bif\bf construct allows bindings to be made based on the edit-
+ ing mode, the terminal being used, or the application using
+ r\bre\bea\bad\bdl\bli\bin\bne\be. The text of the test, after any comparison operator,
extends to the end of the line; unless otherwise noted, no char-
acters are required to isolate it.
- m\bmo\bod\bde\be The m\bmo\bod\bde\be=\b= form of the $\b$i\bif\bf directive is used to test
- whether r\bre\bea\bad\bdl\bli\bin\bne\be is in emacs or vi mode. This may be
- used in conjunction with the s\bse\bet\bt k\bke\bey\bym\bma\bap\bp command, for in-
- stance, to set bindings in the _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd and
- _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx keymaps only if r\bre\bea\bad\bdl\bli\bin\bne\be is starting out in
+ m\bmo\bod\bde\be The m\bmo\bod\bde\be=\b= form of the $\b$i\bif\bf directive is used to test
+ whether r\bre\bea\bad\bdl\bli\bin\bne\be is in emacs or vi mode. This may be
+ used in conjunction with the s\bse\bet\bt k\bke\bey\bym\bma\bap\bp command, for in-
+ stance, to set bindings in the _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd and
+ _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx keymaps only if r\bre\bea\bad\bdl\bli\bin\bne\be is starting out in
emacs mode.
- t\bte\ber\brm\bm The t\bte\ber\brm\bm=\b= form may be used to include terminal-specific
+ t\bte\ber\brm\bm The t\bte\ber\brm\bm=\b= form may be used to include terminal-specific
key bindings, perhaps to bind the key sequences output by
the terminal's function keys. The word on the right side
of the =\b= is tested against both the full name of the ter-
- minal and the portion of the terminal name before the
- first -\b-. This allows _\bx_\bt_\be_\br_\bm to match both _\bx_\bt_\be_\br_\bm and
+ minal and the portion of the terminal name before the
+ first -\b-. This allows _\bx_\bt_\be_\br_\bm to match both _\bx_\bt_\be_\br_\bm and
_\bx_\bt_\be_\br_\bm_\b-_\b2_\b5_\b6_\bc_\bo_\bl_\bo_\br, for instance.
v\bve\ber\brs\bsi\bio\bon\bn
- The v\bve\ber\brs\bsi\bio\bon\bn test may be used to perform comparisons
- against specific r\bre\bea\bad\bdl\bli\bin\bne\be versions. The v\bve\ber\brs\bsi\bio\bon\bn expands
- to the current r\bre\bea\bad\bdl\bli\bin\bne\be version. The set of comparison
- operators includes =\b=, (and =\b==\b=), !\b!=\b=, <\b<=\b=, >\b>=\b=, <\b<, and >\b>.
- The version number supplied on the right side of the op-
- erator consists of a major version number, an optional
+ The v\bve\ber\brs\bsi\bio\bon\bn test may be used to perform comparisons
+ against specific r\bre\bea\bad\bdl\bli\bin\bne\be versions. The v\bve\ber\brs\bsi\bio\bon\bn expands
+ to the current r\bre\bea\bad\bdl\bli\bin\bne\be version. The set of comparison
+ operators includes =\b=, (and =\b==\b=), !\b!=\b=, <\b<=\b=, >\b>=\b=, <\b<, and >\b>.
+ The version number supplied on the right side of the op-
+ erator consists of a major version number, an optional
decimal point, and an optional minor version (e.g., 7\b7.\b.1\b1).
- If the minor version is omitted, it defaults to 0\b0. The
- operator may be separated from the string v\bve\ber\brs\bsi\bio\bon\bn and
+ If the minor version is omitted, it defaults to 0\b0. The
+ operator may be separated from the string v\bve\ber\brs\bsi\bio\bon\bn and
from the version number argument by whitespace.
_\ba_\bp_\bp_\bl_\bi_\bc_\ba_\bt_\bi_\bo_\bn
The _\ba_\bp_\bp_\bl_\bi_\bc_\ba_\bt_\bi_\bo_\bn construct is used to include application-
- specific settings. Each program using the r\bre\bea\bad\bdl\bli\bin\bne\be li-
- brary sets the _\ba_\bp_\bp_\bl_\bi_\bc_\ba_\bt_\bi_\bo_\bn _\bn_\ba_\bm_\be, and an initialization
+ specific settings. Each program using the r\bre\bea\bad\bdl\bli\bin\bne\be li-
+ brary sets the _\ba_\bp_\bp_\bl_\bi_\bc_\ba_\bt_\bi_\bo_\bn _\bn_\ba_\bm_\be, and an initialization
file can test for a particular value. This could be used
- to bind key sequences to functions useful for a specific
- program. For instance, the following command adds a key
- sequence that quotes the current or previous word in
+ to bind key sequences to functions useful for a specific
+ program. For instance, the following command adds a key
+ sequence that quotes the current or previous word in
b\bba\bas\bsh\bh:
$\b$i\bif\bf Bash
_\bv_\ba_\br_\bi_\ba_\bb_\bl_\be
The _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be construct provides simple equality tests for
- r\bre\bea\bad\bdl\bli\bin\bne\be variables and values. The permitted comparison
- operators are _\b=, _\b=_\b=, and _\b!_\b=. The variable name must be
+ r\bre\bea\bad\bdl\bli\bin\bne\be variables and values. The permitted comparison
+ operators are _\b=, _\b=_\b=, and _\b!_\b=. The variable name must be
separated from the comparison operator by whitespace; the
- operator may be separated from the value on the right
- hand side by whitespace. String and boolean variables
- may be tested. Boolean variables must be tested against
+ operator may be separated from the value on the right
+ hand side by whitespace. String and boolean variables
+ may be tested. Boolean variables must be tested against
the values _\bo_\bn and _\bo_\bf_\bf.
$\b$e\bel\bls\bse\be Commands in this branch of the $\b$i\bif\bf directive are executed if the
command.
$\b$i\bin\bnc\bcl\blu\bud\bde\be
- This directive takes a single filename as an argument and reads
+ This directive takes a single filename as an argument and reads
commands and key bindings from that file. For example, the fol-
lowing directive would read _\b/_\be_\bt_\bc_\b/_\bi_\bn_\bp_\bu_\bt_\br_\bc:
$\b$i\bin\bnc\bcl\blu\bud\bde\be _\b/_\be_\bt_\bc_\b/_\bi_\bn_\bp_\bu_\bt_\br_\bc
S\bSe\bea\bar\brc\bch\bhi\bin\bng\bg
- R\bRe\bea\bad\bdl\bli\bin\bne\be provides commands for searching through the command history
+ R\bRe\bea\bad\bdl\bli\bin\bne\be provides commands for searching through the command history
(see H\bHI\bIS\bST\bTO\bOR\bRY\bY below) for lines containing a specified string. There are
two search modes: _\bi_\bn_\bc_\br_\be_\bm_\be_\bn_\bt_\ba_\bl and _\bn_\bo_\bn_\b-_\bi_\bn_\bc_\br_\be_\bm_\be_\bn_\bt_\ba_\bl.
- Incremental searches begin before the user has finished typing the
- search string. As each character of the search string is typed, r\bre\bea\bad\bd-\b-
+ Incremental searches begin before the user has finished typing the
+ search string. As each character of the search string is typed, r\bre\bea\bad\bd-\b-
l\bli\bin\bne\be displays the next entry from the history matching the string typed
- so far. An incremental search requires only as many characters as
- needed to find the desired history entry. When using emacs editing
- mode, type C\bC-\b-r\br to search backward in the history for a particular
- string. Typing C\bC-\b-s\bs searches forward through the history. The charac-
- ters present in the value of the i\bis\bse\bea\bar\brc\bch\bh-\b-t\bte\ber\brm\bmi\bin\bna\bat\bto\bor\brs\bs variable are used
- to terminate an incremental search. If that variable has not been as-
- signed a value, _\bE_\bS_\bC and C\bC-\b-j\bj terminate an incremental search. C\bC-\b-g\bg
- aborts an incremental search and restores the original line. When the
- search is terminated, the history entry containing the search string
+ so far. An incremental search requires only as many characters as
+ needed to find the desired history entry. When using emacs editing
+ mode, type C\bC-\b-r\br to search backward in the history for a particular
+ string. Typing C\bC-\b-s\bs searches forward through the history. The charac-
+ ters present in the value of the i\bis\bse\bea\bar\brc\bch\bh-\b-t\bte\ber\brm\bmi\bin\bna\bat\bto\bor\brs\bs variable are used
+ to terminate an incremental search. If that variable has not been as-
+ signed a value, _\bE_\bS_\bC and C\bC-\b-j\bj terminate an incremental search. C\bC-\b-g\bg
+ aborts an incremental search and restores the original line. When the
+ search is terminated, the history entry containing the search string
becomes the current line.
- To find other matching entries in the history list, type C\bC-\b-r\br or C\bC-\b-s\bs as
- appropriate. This searches backward or forward in the history for the
- next entry matching the search string typed so far. Any other key se-
- quence bound to a r\bre\bea\bad\bdl\bli\bin\bne\be command terminates the search and executes
- that command. For instance, a newline terminates the search and ac-
+ To find other matching entries in the history list, type C\bC-\b-r\br or C\bC-\b-s\bs as
+ appropriate. This searches backward or forward in the history for the
+ next entry matching the search string typed so far. Any other key se-
+ quence bound to a r\bre\bea\bad\bdl\bli\bin\bne\be command terminates the search and executes
+ that command. For instance, a newline terminates the search and ac-
cepts the line, thereby executing the command from the history list. A
- movement command will terminate the search, make the last line found
+ movement command will terminate the search, make the last line found
the current line, and begin editing.
R\bRe\bea\bad\bdl\bli\bin\bne\be remembers the last incremental search string. If two C\bC-\b-r\brs are
- typed without any intervening characters defining a new search string,
+ typed without any intervening characters defining a new search string,
r\bre\bea\bad\bdl\bli\bin\bne\be uses any remembered search string.
- Non-incremental searches read the entire search string before starting
+ Non-incremental searches read the entire search string before starting
to search for matching history entries. The search string may be typed
by the user or be part of the contents of the current line.
R\bRe\bea\bad\bdl\bli\bin\bne\be C\bCo\bom\bmm\bma\ban\bnd\bd N\bNa\bam\bme\bes\bs
- The following is a list of the names of the commands and the default
+ The following is a list of the names of the commands and the default
key sequences to which they are bound. Command names without an accom-
panying key sequence are unbound by default.
In the following descriptions, _\bp_\bo_\bi_\bn_\bt refers to the current cursor posi-
- tion, and _\bm_\ba_\br_\bk refers to a cursor position saved by the s\bse\bet\bt-\b-m\bma\bar\brk\bk com-
- mand. The text between the point and mark is referred to as the _\br_\be_\b-
+ tion, and _\bm_\ba_\br_\bk refers to a cursor position saved by the s\bse\bet\bt-\b-m\bma\bar\brk\bk com-
+ mand. The text between the point and mark is referred to as the _\br_\be_\b-
_\bg_\bi_\bo_\bn. R\bRe\bea\bad\bdl\bli\bin\bne\be has the concept of an _\ba_\bc_\bt_\bi_\bv_\be _\br_\be_\bg_\bi_\bo_\bn: when the region is
active, r\bre\bea\bad\bdl\bli\bin\bne\be redisplay highlights the region using the value of the
- a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn-\b-s\bst\bta\bar\brt\bt-\b-c\bco\bol\blo\bor\br variable. The e\ben\bna\bab\bbl\ble\be-\b-a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn r\bre\bea\bad\bdl\bli\bin\bne\be
+ a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn-\b-s\bst\bta\bar\brt\bt-\b-c\bco\bol\blo\bor\br variable. The e\ben\bna\bab\bbl\ble\be-\b-a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn r\bre\bea\bad\bdl\bli\bin\bne\be
variable turns this on and off. Several commands set the region to ac-
tive; those are noted below.
C\bCo\bom\bmm\bma\ban\bnd\bds\bs f\bfo\bor\br M\bMo\bov\bvi\bin\bng\bg
b\bbe\beg\bgi\bin\bnn\bni\bin\bng\bg-\b-o\bof\bf-\b-l\bli\bin\bne\be (\b(C\bC-\b-a\ba)\b)
- Move to the start of the current line. This may also be bound
+ Move to the start of the current line. This may also be bound
to the Home key on some keyboards.
e\ben\bnd\bd-\b-o\bof\bf-\b-l\bli\bin\bne\be (\b(C\bC-\b-e\be)\b)
- Move to the end of the line. This may also be bound to the End
+ Move to the end of the line. This may also be bound to the End
key on some keyboards.
f\bfo\bor\brw\bwa\bar\brd\bd-\b-c\bch\bha\bar\br (\b(C\bC-\b-f\bf)\b)
- Move forward a character. This may also be bound to the right
+ Move forward a character. This may also be bound to the right
arrow key on some keyboards.
b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-c\bch\bha\bar\br (\b(C\bC-\b-b\bb)\b)
Move back a character. This may also be bound to the left arrow
Move forward to the end of the next word. Words are composed of
alphanumeric characters (letters and digits).
b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-b\bb)\b)
- Move back to the start of the current or previous word. Words
+ Move back to the start of the current or previous word. Words
are composed of alphanumeric characters (letters and digits).
s\bsh\bhe\bel\bll\bl-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-C\bC-\b-f\bf)\b)
- Move forward to the end of the next word. Words are delimited
+ Move forward to the end of the next word. Words are delimited
by non-quoted shell metacharacters.
s\bsh\bhe\bel\bll\bl-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-C\bC-\b-b\bb)\b)
- Move back to the start of the current or previous word. Words
+ Move back to the start of the current or previous word. Words
are delimited by non-quoted shell metacharacters.
p\bpr\bre\bev\bvi\bio\bou\bus\bs-\b-s\bsc\bcr\bre\bee\ben\bn-\b-l\bli\bin\bne\be
- Attempt to move point to the same physical screen column on the
- previous physical screen line. This will not have the desired
- effect if the current r\bre\bea\bad\bdl\bli\bin\bne\be line does not take up more than
- one physical line or if point is not greater than the length of
+ Attempt to move point to the same physical screen column on the
+ previous physical screen line. This will not have the desired
+ effect if the current r\bre\bea\bad\bdl\bli\bin\bne\be line does not take up more than
+ one physical line or if point is not greater than the length of
the prompt plus the screen width.
n\bne\bex\bxt\bt-\b-s\bsc\bcr\bre\bee\ben\bn-\b-l\bli\bin\bne\be
- Attempt to move point to the same physical screen column on the
- next physical screen line. This will not have the desired ef-
+ Attempt to move point to the same physical screen column on the
+ next physical screen line. This will not have the desired ef-
fect if the current r\bre\bea\bad\bdl\bli\bin\bne\be line does not take up more than one
- physical line or if the length of the current r\bre\bea\bad\bdl\bli\bin\bne\be line is
+ physical line or if the length of the current r\bre\bea\bad\bdl\bli\bin\bne\be line is
not greater than the length of the prompt plus the screen width.
c\bcl\ble\bea\bar\br-\b-d\bdi\bis\bsp\bpl\bla\bay\by (\b(M\bM-\b-C\bC-\b-l\bl)\b)
- Clear the screen and, if possible, the terminal's scrollback
- buffer, then redraw the current line, leaving the current line
+ Clear the screen and, if possible, the terminal's scrollback
+ buffer, then redraw the current line, leaving the current line
at the top of the screen.
c\bcl\ble\bea\bar\br-\b-s\bsc\bcr\bre\bee\ben\bn (\b(C\bC-\b-l\bl)\b)
Clear the screen, then redraw the current line, leaving the cur-
- rent line at the top of the screen. With a numeric argument,
+ rent line at the top of the screen. With a numeric argument,
refresh the current line without clearing the screen.
r\bre\bed\bdr\bra\baw\bw-\b-c\bcu\bur\brr\bre\ben\bnt\bt-\b-l\bli\bin\bne\be
Refresh the current line.
C\bCo\bom\bmm\bma\ban\bnd\bds\bs f\bfo\bor\br M\bMa\ban\bni\bip\bpu\bul\bla\bat\bti\bin\bng\bg t\bth\bhe\be H\bHi\bis\bst\bto\bor\bry\by
a\bac\bcc\bce\bep\bpt\bt-\b-l\bli\bin\bne\be (\b(N\bNe\bew\bwl\bli\bin\bne\be,\b, R\bRe\bet\btu\bur\brn\bn)\b)
Accept the line regardless of where the cursor is. If this line
- is non-empty, add it to the history list according to the state
- of the H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL and H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE variables. If the line is a
- modified history line, restore the history line to its original
+ is non-empty, add it to the history list according to the state
+ of the H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL and H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE variables. If the line is a
+ modified history line, restore the history line to its original
state.
p\bpr\bre\bev\bvi\bio\bou\bus\bs-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-p\bp)\b)
Fetch the previous command from the history list, moving back in
- the list. This may also be bound to the up arrow key on some
+ the list. This may also be bound to the up arrow key on some
keyboards.
n\bne\bex\bxt\bt-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-n\bn)\b)
- Fetch the next command from the history list, moving forward in
- the list. This may also be bound to the down arrow key on some
+ Fetch the next command from the history list, moving forward in
+ the list. This may also be bound to the down arrow key on some
keyboards.
b\bbe\beg\bgi\bin\bnn\bni\bin\bng\bg-\b-o\bof\bf-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-<\b<)\b)
Move to the first line in the history.
e\ben\bnd\bd-\b-o\bof\bf-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b->\b>)\b)
- Move to the end of the input history, i.e., the line currently
+ Move to the end of the input history, i.e., the line currently
being entered.
o\bop\bpe\ber\bra\bat\bte\be-\b-a\ban\bnd\bd-\b-g\bge\bet\bt-\b-n\bne\bex\bxt\bt (\b(C\bC-\b-o\bo)\b)
- Accept the current line for execution as if a newline had been
- entered, and fetch the next line relative to the current line
- from the history for editing. A numeric argument, if supplied,
+ Accept the current line for execution as if a newline had been
+ entered, and fetch the next line relative to the current line
+ from the history for editing. A numeric argument, if supplied,
specifies the history entry to use instead of the current line.
f\bfe\bet\btc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by
- With a numeric argument, fetch that entry from the history list
+ With a numeric argument, fetch that entry from the history list
and make it the current line. Without an argument, move back to
the first entry in the history list.
r\bre\bev\bve\ber\brs\bse\be-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-r\br)\b)
- Search backward starting at the current line and moving "up"
- through the history as necessary. This is an incremental
- search. This command sets the region to the matched text and
- activates the region.
- f\bfo\bor\brw\bwa\bar\brd\bd-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-s\bs)\b)
- Search forward starting at the current line and moving "down"
+ Search backward starting at the current line and moving "up"
through the history as necessary. This is an incremental
search. This command sets the region to the matched text and
activates the region.
+ f\bfo\bor\brw\bwa\bar\brd\bd-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-s\bs)\b)
+ Search forward starting at the current line and moving "down"
+ through the history as necessary. This is an incremental
+ search. This command sets the region to the matched text and
+ activates the region.
n\bno\bon\bn-\b-i\bin\bnc\bcr\bre\bem\bme\ben\bnt\bta\bal\bl-\b-r\bre\bev\bve\ber\brs\bse\be-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-p\bp)\b)
Search backward through the history starting at the current line
- using a non-incremental search for a string supplied by the
+ using a non-incremental search for a string supplied by the
user. The search string may match anywhere in a history line.
n\bno\bon\bn-\b-i\bin\bnc\bcr\bre\bem\bme\ben\bnt\bta\bal\bl-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-n\bn)\b)
- Search forward through the history using a non-incremental
+ Search forward through the history using a non-incremental
search for a string supplied by the user. The search string may
match anywhere in a history line.
h\bhi\bis\bst\bto\bor\bry\by-\b-s\bse\bea\bar\brc\bch\bh-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd
non-incremental search. This may be bound to the Page Up key on
some keyboards.
h\bhi\bis\bst\bto\bor\bry\by-\b-s\bse\bea\bar\brc\bch\bh-\b-f\bfo\bor\brw\bwa\bar\brd\bd
- Search forward through the history for the string of characters
+ Search forward through the history for the string of characters
between the start of the current line and the point. The search
string must match at the beginning of a history line. This is a
- non-incremental search. This may be bound to the Page Down key
+ non-incremental search. This may be bound to the Page Down key
on some keyboards.
h\bhi\bis\bst\bto\bor\bry\by-\b-s\bsu\bub\bbs\bst\btr\bri\bin\bng\bg-\b-s\bse\bea\bar\brc\bch\bh-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd
Search backward through the history for the string of characters
between the start of the current line and the point. The search
- string may match anywhere in a history line. This is a non-in-
+ string may match anywhere in a history line. This is a non-in-
cremental search.
h\bhi\bis\bst\bto\bor\bry\by-\b-s\bsu\bub\bbs\bst\btr\bri\bin\bng\bg-\b-s\bse\bea\bar\brc\bch\bh-\b-f\bfo\bor\brw\bwa\bar\brd\bd
- Search forward through the history for the string of characters
+ Search forward through the history for the string of characters
between the start of the current line and the point. The search
- string may match anywhere in a history line. This is a non-in-
+ string may match anywhere in a history line. This is a non-in-
cremental search.
y\bya\ban\bnk\bk-\b-n\bnt\bth\bh-\b-a\bar\brg\bg (\b(M\bM-\b-C\bC-\b-y\by)\b)
- Insert the first argument to the previous command (usually the
+ Insert the first argument to the previous command (usually the
second word on the previous line) at point. With an argument _\bn,
- insert the _\bnth word from the previous command (the words in the
- previous command begin with word 0). A negative argument in-
- serts the _\bnth word from the end of the previous command. Once
- the argument _\bn is computed, this uses the history expansion fa-
- cilities to extract the _\bnth word, as if the "!_\bn" history expan-
+ insert the _\bnth word from the previous command (the words in the
+ previous command begin with word 0). A negative argument in-
+ serts the _\bnth word from the end of the previous command. Once
+ the argument _\bn is computed, this uses the history expansion fa-
+ cilities to extract the _\bnth word, as if the "!_\bn" history expan-
sion had been specified.
y\bya\ban\bnk\bk-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bg (\b(M\bM-\b-.\b.,\b, M\bM-\b-_\b_)\b)
- Insert the last argument to the previous command (the last word
+ Insert the last argument to the previous command (the last word
of the previous history entry). With a numeric argument, behave
- exactly like y\bya\ban\bnk\bk-\b-n\bnt\bth\bh-\b-a\bar\brg\bg. Successive calls to y\bya\ban\bnk\bk-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bg
- move back through the history list, inserting the last word (or
- the word specified by the argument to the first call) of each
+ exactly like y\bya\ban\bnk\bk-\b-n\bnt\bth\bh-\b-a\bar\brg\bg. Successive calls to y\bya\ban\bnk\bk-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bg
+ move back through the history list, inserting the last word (or
+ the word specified by the argument to the first call) of each
line in turn. Any numeric argument supplied to these successive
- calls determines the direction to move through the history. A
- negative argument switches the direction through the history
- (back or forward). This uses the history expansion facilities
- to extract the last word, as if the "!$" history expansion had
+ calls determines the direction to move through the history. A
+ negative argument switches the direction through the history
+ (back or forward). This uses the history expansion facilities
+ to extract the last word, as if the "!$" history expansion had
been specified.
s\bsh\bhe\bel\bll\bl-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-l\bli\bin\bne\be (\b(M\bM-\b-C\bC-\b-e\be)\b)
- Expand the line by performing shell word expansions. This per-
+ Expand the line by performing shell word expansions. This per-
forms alias and history expansion, $\b$'_\bs_\bt_\br_\bi_\bn_\bg' and $\b$"_\bs_\bt_\br_\bi_\bn_\bg" quot-
- ing, tilde expansion, parameter and variable expansion, arith-
- metic expansion, command and process substitution, word split-
- ting, and quote removal. An explicit argument suppresses com-
- mand and process substitution. See H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN below for
+ ing, tilde expansion, parameter and variable expansion, arith-
+ metic expansion, command and process substitution, word split-
+ ting, and quote removal. An explicit argument suppresses com-
+ mand and process substitution. See H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN below for
a description of history expansion.
h\bhi\bis\bst\bto\bor\bry\by-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-l\bli\bin\bne\be (\b(M\bM-\b-^\b^)\b)
- Perform history expansion on the current line. See H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bX-\b-
+ Perform history expansion on the current line. See H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bX-\b-
P\bPA\bAN\bNS\bSI\bIO\bON\bN below for a description of history expansion.
m\bma\bag\bgi\bic\bc-\b-s\bsp\bpa\bac\bce\be
- Perform history expansion on the current line and insert a
+ Perform history expansion on the current line and insert a
space. See H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN below for a description of history
expansion.
a\bal\bli\bia\bas\bs-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-l\bli\bin\bne\be
- Perform alias expansion on the current line. See A\bAL\bLI\bIA\bAS\bSE\bES\bS above
+ Perform alias expansion on the current line. See A\bAL\bLI\bIA\bAS\bSE\bES\bS above
for a description of alias expansion.
h\bhi\bis\bst\bto\bor\bry\by-\b-a\ban\bnd\bd-\b-a\bal\bli\bia\bas\bs-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-l\bli\bin\bne\be
Perform history and alias expansion on the current line.
i\bin\bns\bse\ber\brt\bt-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt (\b(M\bM-\b-.\b.,\b, M\bM-\b-_\b_)\b)
A synonym for y\bya\ban\bnk\bk-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bg.
e\bed\bdi\bit\bt-\b-a\ban\bnd\bd-\b-e\bex\bxe\bec\bcu\but\bte\be-\b-c\bco\bom\bmm\bma\ban\bnd\bd (\b(C\bC-\b-x\bx C\bC-\b-e\be)\b)
- Invoke an editor on the current command line, and execute the
+ Invoke an editor on the current command line, and execute the
result as shell commands. B\bBa\bas\bsh\bh attempts to invoke $\b$V\bVI\bIS\bSU\bUA\bAL\bL, $\b$E\bED\bD-\b-
I\bIT\bTO\bOR\bR, and _\be_\bm_\ba_\bc_\bs as the editor, in that order.
C\bCo\bom\bmm\bma\ban\bnd\bds\bs f\bfo\bor\br C\bCh\bha\ban\bng\bgi\bin\bng\bg T\bTe\bex\bxt\bt
_\be_\bn_\bd_\b-_\bo_\bf_\b-_\bf_\bi_\bl_\be (\b(u\bus\bsu\bua\bal\bll\bly\by C\bC-\b-d\bd)\b)
- The character indicating end-of-file as set, for example, by
+ The character indicating end-of-file as set, for example, by
_\bs_\bt_\bt_\by(1). If this character is read when there are no characters
on the line, and point is at the beginning of the line, r\bre\bea\bad\bdl\bli\bin\bne\be
interprets it as the end of input and returns E\bEO\bOF\bF.
above for the effects. This may also be bound to the Delete key
on some keyboards.
b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br (\b(R\bRu\bub\bbo\bou\but\bt)\b)
- Delete the character behind the cursor. When given a numeric
+ Delete the character behind the cursor. When given a numeric
argument, save the deleted text on the kill ring.
f\bfo\bor\brw\bwa\bar\brd\bd-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br
- Delete the character under the cursor, unless the cursor is at
+ Delete the character under the cursor, unless the cursor is at
the end of the line, in which case the character behind the cur-
sor is deleted.
q\bqu\buo\bot\bte\bed\bd-\b-i\bin\bns\bse\ber\brt\bt (\b(C\bC-\b-q\bq,\b, C\bC-\b-v\bv)\b)
- Add the next character typed to the line verbatim. This is how
+ Add the next character typed to the line verbatim. This is how
to insert characters like C\bC-\b-q\bq, for example.
t\bta\bab\bb-\b-i\bin\bns\bse\ber\brt\bt (\b(C\bC-\b-v\bv T\bTA\bAB\bB)\b)
Insert a tab character.
s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt (\b(a\ba,\b, b\bb,\b, A\bA,\b, 1\b1,\b, !\b!,\b, ...)\b)
Insert the character typed.
b\bbr\bra\bac\bck\bke\bet\bte\bed\bd-\b-p\bpa\bas\bst\bte\be-\b-b\bbe\beg\bgi\bin\bn
- This function is intended to be bound to the "bracketed paste"
- escape sequence sent by some terminals, and such a binding is
- assigned by default. It allows r\bre\bea\bad\bdl\bli\bin\bne\be to insert the pasted
- text as a single unit without treating each character as if it
- had been read from the keyboard. The pasted characters are in-
- serted as if each one was bound to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt instead of exe-
+ This function is intended to be bound to the "bracketed paste"
+ escape sequence sent by some terminals, and such a binding is
+ assigned by default. It allows r\bre\bea\bad\bdl\bli\bin\bne\be to insert the pasted
+ text as a single unit without treating each character as if it
+ had been read from the keyboard. The pasted characters are in-
+ serted as if each one was bound to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt instead of exe-
cuting any editing commands.
- Bracketed paste sets the region to the inserted text and acti-
+ Bracketed paste sets the region to the inserted text and acti-
vates the region.
t\btr\bra\ban\bns\bsp\bpo\bos\bse\be-\b-c\bch\bha\bar\brs\bs (\b(C\bC-\b-t\bt)\b)
- Drag the character before point forward over the character at
- point, moving point forward as well. If point is at the end of
- the line, then this transposes the two characters before point.
+ Drag the character before point forward over the character at
+ point, moving point forward as well. If point is at the end of
+ the line, then this transposes the two characters before point.
Negative arguments have no effect.
t\btr\bra\ban\bns\bsp\bpo\bos\bse\be-\b-w\bwo\bor\brd\bds\bs (\b(M\bM-\b-t\bt)\b)
- Drag the word before point past the word after point, moving
- point past that word as well. If point is at the end of the
+ Drag the word before point past the word after point, moving
+ point past that word as well. If point is at the end of the
line, this transposes the last two words on the line.
s\bsh\bhe\bel\bll\bl-\b-t\btr\bra\ban\bns\bsp\bpo\bos\bse\be-\b-w\bwo\bor\brd\bds\bs (\b(M\bM-\b-C\bC-\b-t\bt)\b)
- Drag the word before point past the word after point, moving
- point past that word as well. If the insertion point is at the
+ Drag the word before point past the word after point, moving
+ point past that word as well. If the insertion point is at the
end of the line, this transposes the last two words on the line.
- Word boundaries are the same as s\bsh\bhe\bel\bll\bl-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd and
+ Word boundaries are the same as s\bsh\bhe\bel\bll\bl-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd and
s\bsh\bhe\bel\bll\bl-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
u\bup\bpc\bca\bas\bse\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-u\bu)\b)
- Uppercase the current (or following) word. With a negative ar-
+ Uppercase the current (or following) word. With a negative ar-
gument, uppercase the previous word, but do not move point.
d\bdo\bow\bwn\bnc\bca\bas\bse\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-l\bl)\b)
- Lowercase the current (or following) word. With a negative ar-
+ Lowercase the current (or following) word. With a negative ar-
gument, lowercase the previous word, but do not move point.
c\bca\bap\bpi\bit\bta\bal\bli\biz\bze\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-c\bc)\b)
Capitalize the current (or following) word. With a negative ar-
gument, capitalize the previous word, but do not move point.
o\bov\bve\ber\brw\bwr\bri\bit\bte\be-\b-m\bmo\bod\bde\be
- Toggle overwrite mode. With an explicit positive numeric argu-
+ Toggle overwrite mode. With an explicit positive numeric argu-
ment, switches to overwrite mode. With an explicit non-positive
numeric argument, switches to insert mode. This command affects
- only e\bem\bma\bac\bcs\bs mode; v\bvi\bi mode does overwrite differently. Each call
+ only e\bem\bma\bac\bcs\bs mode; v\bvi\bi mode does overwrite differently. Each call
to _\br_\be_\ba_\bd_\bl_\bi_\bn_\be_\b(_\b) starts in insert mode.
- In overwrite mode, characters bound to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt replace the
- text at point rather than pushing the text to the right. Char-
- acters bound to b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br replace the character be-
- fore point with a space. By default, this command is unbound,
+ In overwrite mode, characters bound to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt replace the
+ text at point rather than pushing the text to the right. Char-
+ acters bound to b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br replace the character be-
+ fore point with a space. By default, this command is unbound,
but may be bound to the Insert key on some keyboards.
K\bKi\bil\bll\bli\bin\bng\bg a\ban\bnd\bd Y\bYa\ban\bnk\bki\bin\bng\bg
k\bki\bil\bll\bl-\b-l\bli\bin\bne\be (\b(C\bC-\b-k\bk)\b)
Kill the text from point to the end of the current line. With a
- negative numeric argument, kill backward from the cursor to the
+ negative numeric argument, kill backward from the cursor to the
beginning of the line.
b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-l\bli\bin\bne\be (\b(C\bC-\b-x\bx R\bRu\bub\bbo\bou\but\bt)\b)
Kill backward to the beginning of the current line. With a neg-
- ative numeric argument, kill forward from the cursor to the end
+ ative numeric argument, kill forward from the cursor to the end
of the line.
u\bun\bni\bix\bx-\b-l\bli\bin\bne\be-\b-d\bdi\bis\bsc\bca\bar\brd\bd (\b(C\bC-\b-u\bu)\b)
- Kill backward from point to the beginning of the line, saving
+ Kill backward from point to the beginning of the line, saving
the killed text on the kill-ring.
k\bki\bil\bll\bl-\b-w\bwh\bho\bol\ble\be-\b-l\bli\bin\bne\be
- Kill all characters on the current line, no matter where point
+ Kill all characters on the current line, no matter where point
is.
k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-d\bd)\b)
- Kill from point to the end of the current word, or if between
- words, to the end of the next word. Word boundaries are the
+ Kill from point to the end of the current word, or if between
+ words, to the end of the next word. Word boundaries are the
same as those used by f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-R\bRu\bub\bbo\bou\but\bt)\b)
- Kill the word behind point. Word boundaries are the same as
+ Kill the word behind point. Word boundaries are the same as
those used by b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
s\bsh\bhe\bel\bll\bl-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-C\bC-\b-d\bd)\b)
- Kill from point to the end of the current word, or if between
- words, to the end of the next word. Word boundaries are the
+ Kill from point to the end of the current word, or if between
+ words, to the end of the next word. Word boundaries are the
same as those used by s\bsh\bhe\bel\bll\bl-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
s\bsh\bhe\bel\bll\bl-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd
- Kill the word behind point. Word boundaries are the same as
+ Kill the word behind point. Word boundaries are the same as
those used by s\bsh\bhe\bel\bll\bl-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
u\bun\bni\bix\bx-\b-w\bwo\bor\brd\bd-\b-r\bru\bub\bbo\bou\but\bt (\b(C\bC-\b-w\bw)\b)
- Kill the word behind point, using white space as a word bound-
+ Kill the word behind point, using white space as a word bound-
ary, saving the killed text on the kill-ring.
u\bun\bni\bix\bx-\b-f\bfi\bil\ble\ben\bna\bam\bme\be-\b-r\bru\bub\bbo\bou\but\bt
- Kill the word behind point, using white space and the slash
- character as the word boundaries, saving the killed text on the
+ Kill the word behind point, using white space and the slash
+ character as the word boundaries, saving the killed text on the
kill-ring.
d\bde\bel\ble\bet\bte\be-\b-h\bho\bor\bri\biz\bzo\bon\bnt\bta\bal\bl-\b-s\bsp\bpa\bac\bce\be (\b(M\bM-\b-\\b\)\b)
Delete all spaces and tabs around point.
k\bki\bil\bll\bl-\b-r\bre\beg\bgi\bio\bon\bn
Kill the text in the current region.
c\bco\bop\bpy\by-\b-r\bre\beg\bgi\bio\bon\bn-\b-a\bas\bs-\b-k\bki\bil\bll\bl
- Copy the text in the region to the kill buffer, so it can be
+ Copy the text in the region to the kill buffer, so it can be
yanked immediately.
c\bco\bop\bpy\by-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd
- Copy the word before point to the kill buffer. The word bound-
+ Copy the word before point to the kill buffer. The word bound-
aries are the same as b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
c\bco\bop\bpy\by-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd
- Copy the word following point to the kill buffer. The word
+ Copy the word following point to the kill buffer. The word
boundaries are the same as f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
y\bya\ban\bnk\bk (\b(C\bC-\b-y\by)\b)
Yank the top of the kill ring into the buffer at point.
y\bya\ban\bnk\bk-\b-p\bpo\bop\bp (\b(M\bM-\b-y\by)\b)
- Rotate the kill ring, and yank the new top. Only works follow-
+ Rotate the kill ring, and yank the new top. Only works follow-
ing y\bya\ban\bnk\bk or y\bya\ban\bnk\bk-\b-p\bpo\bop\bp.
N\bNu\bum\bme\ber\bri\bic\bc A\bAr\brg\bgu\bum\bme\ben\bnt\bts\bs
d\bdi\big\bgi\bit\bt-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt (\b(M\bM-\b-0\b0,\b, M\bM-\b-1\b1,\b, ...,\b, M\bM-\b--\b-)\b)
- Add this digit to the argument already accumulating, or start a
+ Add this digit to the argument already accumulating, or start a
new argument. M-- starts a negative argument.
u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt
- This is another way to specify an argument. If this command is
- followed by one or more digits, optionally with a leading minus
- sign, those digits define the argument. If the command is fol-
+ This is another way to specify an argument. If this command is
+ followed by one or more digits, optionally with a leading minus
+ sign, those digits define the argument. If the command is fol-
lowed by digits, executing u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt again ends the nu-
meric argument, but is otherwise ignored. As a special case, if
this command is immediately followed by a character that is nei-
- ther a digit nor minus sign, the argument count for the next
- command is multiplied by four. The argument count is initially
- one, so executing this function the first time makes the argu-
+ ther a digit nor minus sign, the argument count for the next
+ command is multiplied by four. The argument count is initially
+ one, so executing this function the first time makes the argu-
ment count four, a second time makes the argument count sixteen,
and so on.
C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg
c\bco\bom\bmp\bpl\ble\bet\bte\be (\b(T\bTA\bAB\bB)\b)
- Attempt to perform completion on the text before point. B\bBa\bas\bsh\bh
- attempts completion by first checking for any programmable com-
- pletions for the command word (see P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn be-
+ Attempt to perform completion on the text before point. B\bBa\bas\bsh\bh
+ attempts completion by first checking for any programmable com-
+ pletions for the command word (see P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn be-
low), otherwise treating the text as a variable (if the text be-
gins with $\b$), username (if the text begins with ~\b~), hostname (if
- the text begins with @\b@), or command (including aliases, func-
- tions, and builtins) in turn. If none of these produces a
+ the text begins with @\b@), or command (including aliases, func-
+ tions, and builtins) in turn. If none of these produces a
match, it falls back to filename completion.
p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(M\bM-\b-?\b?)\b)
- List the possible completions of the text before point. When
+ List the possible completions of the text before point. When
displaying completions, r\bre\bea\bad\bdl\bli\bin\bne\be sets the number of columns used
- for display to the value of c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-d\bdi\bis\bsp\bpl\bla\bay\by-\b-w\bwi\bid\bdt\bth\bh, the value
- of the shell variable C\bCO\bOL\bLU\bUM\bMN\bNS\bS, or the screen width, in that or-
+ for display to the value of c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-d\bdi\bis\bsp\bpl\bla\bay\by-\b-w\bwi\bid\bdt\bth\bh, the value
+ of the shell variable C\bCO\bOL\bLU\bUM\bMN\bNS\bS, or the screen width, in that or-
der.
i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(M\bM-\b-*\b*)\b)
- Insert all completions of the text before point that would have
+ Insert all completions of the text before point that would have
been generated by p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs, separated by a space.
m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be
- Similar to c\bco\bom\bmp\bpl\ble\bet\bte\be, but replaces the word to be completed with
- a single match from the list of possible completions. Repeat-
- edly executing m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be steps through the list of possible
- completions, inserting each match in turn. At the end of the
- list of completions, m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be rings the bell (subject to
- the setting of b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be) and restores the original text. An
- argument of _\bn moves _\bn positions forward in the list of matches;
- a negative argument moves backward through the list. This com-
+ Similar to c\bco\bom\bmp\bpl\ble\bet\bte\be, but replaces the word to be completed with
+ a single match from the list of possible completions. Repeat-
+ edly executing m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be steps through the list of possible
+ completions, inserting each match in turn. At the end of the
+ list of completions, m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be rings the bell (subject to
+ the setting of b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be) and restores the original text. An
+ argument of _\bn moves _\bn positions forward in the list of matches;
+ a negative argument moves backward through the list. This com-
mand is intended to be bound to T\bTA\bAB\bB, but is unbound by default.
m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd
- Identical to m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be, but moves backward through the list
- of possible completions, as if m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be had been given a
+ Identical to m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be, but moves backward through the list
+ of possible completions, as if m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be had been given a
negative argument. This command is unbound by default.
e\bex\bxp\bpo\bor\brt\bt-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs
- Perform completion on the word before point as described above
- and write the list of possible completions to r\bre\bea\bad\bdl\bli\bin\bne\be's output
- stream using the following format, writing information on sepa-
+ Perform completion on the word before point as described above
+ and write the list of possible completions to r\bre\bea\bad\bdl\bli\bin\bne\be's output
+ stream using the following format, writing information on sepa-
rate lines:
+\bo the number of matches _\bN;
+\bo the word being completed;
- +\bo _\bS:_\bE, where _\bS and _\bE are the start and end offsets of the
+ +\bo _\bS:_\bE, where _\bS and _\bE are the start and end offsets of the
word in the r\bre\bea\bad\bdl\bli\bin\bne\be line buffer; then
+\bo each match, one per line
- If there are no matches, the first line will be "0", and this
- command does not print any output after the _\bS:_\bE. If there is
- only a single match, this prints a single line containing it.
- If there is more than one match, this prints the common prefix
- of the matches, which may be empty, on the first line after the
+ If there are no matches, the first line will be "0", and this
+ command does not print any output after the _\bS:_\bE. If there is
+ only a single match, this prints a single line containing it.
+ If there is more than one match, this prints the common prefix
+ of the matches, which may be empty, on the first line after the
_\bS:_\bE, then the matches on subsequent lines. In this case, _\bN will
include the first line with the common prefix.
The user or application should be able to accommodate the possi-
bility of a blank line. The intent is that the user or applica-
- tion reads _\bN lines after the line containing _\bS:_\bE to obtain the
+ tion reads _\bN lines after the line containing _\bS:_\bE to obtain the
match list. This command is unbound by default.
d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br-\b-o\bor\br-\b-l\bli\bis\bst\bt
- Deletes the character under the cursor if not at the beginning
- or end of the line (like d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br). At the end of the line,
+ Deletes the character under the cursor if not at the beginning
+ or end of the line (like d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br). At the end of the line,
it behaves identically to p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs. This command is
unbound by default.
it as a filename.
c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-u\bus\bse\ber\brn\bna\bam\bme\be (\b(M\bM-\b-~\b~)\b)
- Attempt completion on the text before point, treating it as a
+ Attempt completion on the text before point, treating it as a
username.
p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-u\bus\bse\ber\brn\bna\bam\bme\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(C\bC-\b-x\bx ~\b~)\b)
it as a username.
c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-v\bva\bar\bri\bia\bab\bbl\ble\be (\b(M\bM-\b-$\b$)\b)
- Attempt completion on the text before point, treating it as a
+ Attempt completion on the text before point, treating it as a
shell variable.
p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-v\bva\bar\bri\bia\bab\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(C\bC-\b-x\bx $\b$)\b)
it as a shell variable.
c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-h\bho\bos\bst\btn\bna\bam\bme\be (\b(M\bM-\b-@\b@)\b)
- Attempt completion on the text before point, treating it as a
+ Attempt completion on the text before point, treating it as a
hostname.
p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-h\bho\bos\bst\btn\bna\bam\bme\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(C\bC-\b-x\bx @\b@)\b)
it as a hostname.
c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-c\bco\bom\bmm\bma\ban\bnd\bd (\b(M\bM-\b-!\b!)\b)
- Attempt completion on the text before point, treating it as a
- command name. Command completion attempts to match the text
- against aliases, reserved words, shell functions, shell
+ Attempt completion on the text before point, treating it as a
+ command name. Command completion attempts to match the text
+ against aliases, reserved words, shell functions, shell
builtins, and finally executable filenames, in that order.
p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmm\bma\ban\bnd\bd-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(C\bC-\b-x\bx !\b!)\b)
it as a command name.
d\bdy\byn\bna\bam\bmi\bic\bc-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-T\bTA\bAB\bB)\b)
- Attempt completion on the text before point, comparing the text
+ Attempt completion on the text before point, comparing the text
against history list entries for possible completion matches.
d\bda\bab\bbb\bbr\bre\bev\bv-\b-e\bex\bxp\bpa\ban\bnd\bd
- Attempt menu completion on the text before point, comparing the
+ Attempt menu completion on the text before point, comparing the
text against lines from the history list for possible completion
matches.
c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-i\bin\bnt\bto\bo-\b-b\bbr\bra\bac\bce\bes\bs (\b(M\bM-\b-{\b{)\b)
Perform filename completion and insert the list of possible com-
- pletions enclosed within braces so the list is available to the
+ pletions enclosed within braces so the list is available to the
shell (see B\bBr\bra\bac\bce\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn above).
K\bKe\bey\byb\bbo\boa\bar\brd\bd M\bMa\bac\bcr\bro\bos\bs
s\bst\bta\bar\brt\bt-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b(C\bC-\b-x\bx (\b()\b)
- Begin saving the characters typed into the current keyboard
+ Begin saving the characters typed into the current keyboard
macro.
e\ben\bnd\bd-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b(C\bC-\b-x\bx )\b))\b)
Stop saving the characters typed into the current keyboard macro
and store the definition.
c\bca\bal\bll\bl-\b-l\bla\bas\bst\bt-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b(C\bC-\b-x\bx e\be)\b)
- Re-execute the last keyboard macro defined, by making the char-
+ Re-execute the last keyboard macro defined, by making the char-
acters in the macro appear as if typed at the keyboard.
p\bpr\bri\bin\bnt\bt-\b-l\bla\bas\bst\bt-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b()\b)
- Print the last keyboard macro defined in a format suitable for
+ Print the last keyboard macro defined in a format suitable for
the _\bi_\bn_\bp_\bu_\bt_\br_\bc file.
M\bMi\bis\bsc\bce\bel\bll\bla\ban\bne\beo\bou\bus\bs
r\bre\be-\b-r\bre\bea\bad\bd-\b-i\bin\bni\bit\bt-\b-f\bfi\bil\ble\be (\b(C\bC-\b-x\bx C\bC-\b-r\br)\b)
- Read in the contents of the _\bi_\bn_\bp_\bu_\bt_\br_\bc file, and incorporate any
+ Read in the contents of the _\bi_\bn_\bp_\bu_\bt_\br_\bc file, and incorporate any
bindings or variable assignments found there.
a\bab\bbo\bor\brt\bt (\b(C\bC-\b-g\bg)\b)
- Abort the current editing command and ring the terminal's bell
+ Abort the current editing command and ring the terminal's bell
(subject to the setting of b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be).
d\bdo\bo-\b-l\blo\bow\bwe\ber\brc\bca\bas\bse\be-\b-v\bve\ber\brs\bsi\bio\bon\bn (\b(M\bM-\b-A\bA,\b, M\bM-\b-B\bB,\b, M\bM-\b-_\bx,\b, ...)\b)
- If the metafied character _\bx is uppercase, run the command that
+ If the metafied character _\bx is uppercase, run the command that
is bound to the corresponding metafied lowercase character. The
behavior is undefined if _\bx is already lowercase.
p\bpr\bre\bef\bfi\bix\bx-\b-m\bme\bet\bta\ba (\b(E\bES\bSC\bC)\b)
u\bun\bnd\bdo\bo (\b(C\bC-\b-_\b_,\b, C\bC-\b-x\bx C\bC-\b-u\bu)\b)
Incremental undo, separately remembered for each line.
r\bre\bev\bve\ber\brt\bt-\b-l\bli\bin\bne\be (\b(M\bM-\b-r\br)\b)
- Undo all changes made to this line. This is like executing the
- u\bun\bnd\bdo\bo command enough times to return the line to its initial
+ Undo all changes made to this line. This is like executing the
+ u\bun\bnd\bdo\bo command enough times to return the line to its initial
state.
t\bti\bil\bld\bde\be-\b-e\bex\bxp\bpa\ban\bnd\bd (\b(M\bM-\b-&\b&)\b)
Perform tilde expansion on the current word.
s\bse\bet\bt-\b-m\bma\bar\brk\bk (\b(C\bC-\b-@\b@,\b, M\bM-\b-<\b<s\bsp\bpa\bac\bce\be>\b>)\b)
- Set the mark to the point. If a numeric argument is supplied,
+ Set the mark to the point. If a numeric argument is supplied,
set the mark to that position.
e\bex\bxc\bch\bha\ban\bng\bge\be-\b-p\bpo\boi\bin\bnt\bt-\b-a\ban\bnd\bd-\b-m\bma\bar\brk\bk (\b(C\bC-\b-x\bx C\bC-\b-x\bx)\b)
- Swap the point with the mark. Set the current cursor position
+ Swap the point with the mark. Set the current cursor position
to the saved position, then set the mark to the old cursor posi-
tion.
c\bch\bha\bar\bra\bac\bct\bte\ber\br-\b-s\bse\bea\bar\brc\bch\bh (\b(C\bC-\b-]\b])\b)
- Read a character and move point to the next occurrence of that
- character. A negative argument searches for previous occur-
+ Read a character and move point to the next occurrence of that
+ character. A negative argument searches for previous occur-
rences.
c\bch\bha\bar\bra\bac\bct\bte\ber\br-\b-s\bse\bea\bar\brc\bch\bh-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd (\b(M\bM-\b-C\bC-\b-]\b])\b)
- Read a character and move point to the previous occurrence of
+ Read a character and move point to the previous occurrence of
that character. A negative argument searches for subsequent oc-
currences.
s\bsk\bki\bip\bp-\b-c\bcs\bsi\bi-\b-s\bse\beq\bqu\bue\ben\bnc\bce\be
- Read enough characters to consume a multi-key sequence such as
- those defined for keys like Home and End. CSI sequences begin
+ Read enough characters to consume a multi-key sequence such as
+ those defined for keys like Home and End. CSI sequences begin
with a Control Sequence Indicator (CSI), usually _\bE_\bS_\bC _\b[. If this
sequence is bound to "\e[", keys producing CSI sequences have no
effect unless explicitly bound to a r\bre\bea\bad\bdl\bli\bin\bne\be command, instead of
inserting stray characters into the editing buffer. This is un-
bound by default, but usually bound to _\bE_\bS_\bC _\b[.
i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmm\bme\ben\bnt\bt (\b(M\bM-\b-#\b#)\b)
- Without a numeric argument, insert the value of the r\bre\bea\bad\bdl\bli\bin\bne\be
+ Without a numeric argument, insert the value of the r\bre\bea\bad\bdl\bli\bin\bne\be
c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn variable at the beginning of the current line. If
- a numeric argument is supplied, this command acts as a toggle:
- if the characters at the beginning of the line do not match the
- value of c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn, insert the value; otherwise delete the
- characters in c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn from the beginning of the line. In
- either case, the line is accepted as if a newline had been
- typed. The default value of c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn causes this command
+ a numeric argument is supplied, this command acts as a toggle:
+ if the characters at the beginning of the line do not match the
+ value of c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn, insert the value; otherwise delete the
+ characters in c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn from the beginning of the line. In
+ either case, the line is accepted as if a newline had been
+ typed. The default value of c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn causes this command
to make the current line a shell comment. If a numeric argument
causes the comment character to be removed, the line will be ex-
ecuted by the shell.
s\bsp\bpe\bel\bll\bl-\b-c\bco\bor\brr\bre\bec\bct\bt-\b-w\bwo\bor\brd\bd (\b(C\bC-\b-x\bx s\bs)\b)
- Perform spelling correction on the current word, treating it as
- a directory or filename, in the same way as the c\bcd\bds\bsp\bpe\bel\bll\bl shell
- option. Word boundaries are the same as those used by
+ Perform spelling correction on the current word, treating it as
+ a directory or filename, in the same way as the c\bcd\bds\bsp\bpe\bel\bll\bl shell
+ option. Word boundaries are the same as those used by
s\bsh\bhe\bel\bll\bl-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
g\bgl\blo\bob\bb-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-g\bg)\b)
Treat the word before point as a pattern for pathname expansion,
- with an asterisk implicitly appended, then use the pattern to
+ with an asterisk implicitly appended, then use the pattern to
generate a list of matching file names for possible completions.
g\bgl\blo\bob\bb-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-w\bwo\bor\brd\bd (\b(C\bC-\b-x\bx *\b*)\b)
Treat the word before point as a pattern for pathname expansion,
- and insert the list of matching file names, replacing the word.
- If a numeric argument is supplied, append a *\b* before pathname
+ and insert the list of matching file names, replacing the word.
+ If a numeric argument is supplied, append a *\b* before pathname
expansion.
g\bgl\blo\bob\bb-\b-l\bli\bis\bst\bt-\b-e\bex\bxp\bpa\ban\bns\bsi\bio\bon\bns\bs (\b(C\bC-\b-x\bx g\bg)\b)
Display the list of expansions that would have been generated by
- g\bgl\blo\bob\bb-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-w\bwo\bor\brd\bd and redisplay the line. If a numeric argument
+ g\bgl\blo\bob\bb-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-w\bwo\bor\brd\bd and redisplay the line. If a numeric argument
is supplied, append a *\b* before pathname expansion.
d\bdu\bum\bmp\bp-\b-f\bfu\bun\bnc\bct\bti\bio\bon\bns\bs
- Print all of the functions and their key bindings to the r\bre\bea\bad\bd-\b-
+ Print all of the functions and their key bindings to the r\bre\bea\bad\bd-\b-
l\bli\bin\bne\be output stream. If a numeric argument is supplied, the out-
- put is formatted in such a way that it can be made part of an
+ put is formatted in such a way that it can be made part of an
_\bi_\bn_\bp_\bu_\bt_\br_\bc file.
d\bdu\bum\bmp\bp-\b-v\bva\bar\bri\bia\bab\bbl\ble\bes\bs
Print all of the settable r\bre\bea\bad\bdl\bli\bin\bne\be variables and their values to
- the r\bre\bea\bad\bdl\bli\bin\bne\be output stream. If a numeric argument is supplied,
- the output is formatted in such a way that it can be made part
+ the r\bre\bea\bad\bdl\bli\bin\bne\be output stream. If a numeric argument is supplied,
+ the output is formatted in such a way that it can be made part
of an _\bi_\bn_\bp_\bu_\bt_\br_\bc file.
d\bdu\bum\bmp\bp-\b-m\bma\bac\bcr\bro\bos\bs
- Print all of the r\bre\bea\bad\bdl\bli\bin\bne\be key sequences bound to macros and the
+ Print all of the r\bre\bea\bad\bdl\bli\bin\bne\be key sequences bound to macros and the
strings they output to the r\bre\bea\bad\bdl\bli\bin\bne\be output stream. If a numeric
argument is supplied, the output is formatted in such a way that
it can be made part of an _\bi_\bn_\bp_\bu_\bt_\br_\bc file.
e\bex\bxe\bec\bcu\but\bte\be-\b-n\bna\bam\bme\bed\bd-\b-c\bco\bom\bmm\bma\ban\bnd\bd (\b(M\bM-\b-x\bx)\b)
Read a bindable r\bre\bea\bad\bdl\bli\bin\bne\be command name from the input and execute
- the function to which it's bound, as if the key sequence to
- which it was bound appeared in the input. If this function is
+ the function to which it's bound, as if the key sequence to
+ which it was bound appeared in the input. If this function is
supplied with a numeric argument, it passes that argument to the
function it executes.
d\bdi\bis\bsp\bpl\bla\bay\by-\b-s\bsh\bhe\bel\bll\bl-\b-v\bve\ber\brs\bsi\bio\bon\bn (\b(C\bC-\b-x\bx C\bC-\b-v\bv)\b)
Display version information about the current instance of b\bba\bas\bsh\bh.
P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn
- When a user attempts word completion for a command or an argument to a
- command for which a completion specification (a _\bc_\bo_\bm_\bp_\bs_\bp_\be_\bc) has been de-
- fined using the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below),
+ When a user attempts word completion for a command or an argument to a
+ command for which a completion specification (a _\bc_\bo_\bm_\bp_\bs_\bp_\be_\bc) has been de-
+ fined using the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below),
r\bre\bea\bad\bdl\bli\bin\bne\be invokes the programmable completion facilities.
- First, b\bba\bas\bsh\bh identifies the command name. If a compspec has been de-
- fined for that command, the compspec is used to generate the list of
- possible completions for the word. If the command word is the empty
- string (completion attempted at the beginning of an empty line), b\bba\bas\bsh\bh
- uses any compspec defined with the -\b-E\bE option to c\bco\bom\bmp\bpl\ble\bet\bte\be. The -\b-I\bI op-
- tion to c\bco\bom\bmp\bpl\ble\bet\bte\be indicates that the command word is the first non-as-
+ First, b\bba\bas\bsh\bh identifies the command name. If a compspec has been de-
+ fined for that command, the compspec is used to generate the list of
+ possible completions for the word. If the command word is the empty
+ string (completion attempted at the beginning of an empty line), b\bba\bas\bsh\bh
+ uses any compspec defined with the -\b-E\bE option to c\bco\bom\bmp\bpl\ble\bet\bte\be. The -\b-I\bI op-
+ tion to c\bco\bom\bmp\bpl\ble\bet\bte\be indicates that the command word is the first non-as-
signment word on the line, or after a command delimiter such as ;\b; or |\b|.
This usually indicates command name completion.
- If the command word is a full pathname, b\bba\bas\bsh\bh searches for a compspec
- for the full pathname first. If there is no compspec for the full
- pathname, b\bba\bas\bsh\bh attempts to find a compspec for the portion following
- the final slash. If those searches do not result in a compspec, or if
- there is no compspec for the command word, b\bba\bas\bsh\bh uses any compspec de-
- fined with the -\b-D\bD option to c\bco\bom\bmp\bpl\ble\bet\bte\be as the default. If there is no
- default compspec, b\bba\bas\bsh\bh performs alias expansion on the command word as
- a final resort, and attempts to find a compspec for the command word
+ If the command word is a full pathname, b\bba\bas\bsh\bh searches for a compspec
+ for the full pathname first. If there is no compspec for the full
+ pathname, b\bba\bas\bsh\bh attempts to find a compspec for the portion following
+ the final slash. If those searches do not result in a compspec, or if
+ there is no compspec for the command word, b\bba\bas\bsh\bh uses any compspec de-
+ fined with the -\b-D\bD option to c\bco\bom\bmp\bpl\ble\bet\bte\be as the default. If there is no
+ default compspec, b\bba\bas\bsh\bh performs alias expansion on the command word as
+ a final resort, and attempts to find a compspec for the command word
resulting from any successful expansion.
If a compspec is not found, b\bba\bas\bsh\bh performs its default completion as de-
- scribed above under C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg. Otherwise, once a compspec has been
+ scribed above under C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg. Otherwise, once a compspec has been
found, b\bba\bas\bsh\bh uses it to generate the list of matching words.
- First, b\bba\bas\bsh\bh performs the _\ba_\bc_\bt_\bi_\bo_\bn_\bs specified by the compspec. This only
- returns matches which are prefixes of the word being completed. When
- the -\b-f\bf or -\b-d\bd option is used for filename or directory name completion,
+ First, b\bba\bas\bsh\bh performs the _\ba_\bc_\bt_\bi_\bo_\bn_\bs specified by the compspec. This only
+ returns matches which are prefixes of the word being completed. When
+ the -\b-f\bf or -\b-d\bd option is used for filename or directory name completion,
b\bba\bas\bsh\bh uses the shell variable F\bFI\bIG\bGN\bNO\bOR\bRE\bE to filter the matches.
Next, programmable completion generates matches specified by a pathname
- expansion pattern supplied as an argument to the -\b-G\bG option. The words
+ expansion pattern supplied as an argument to the -\b-G\bG option. The words
generated by the pattern need not match the word being completed. B\bBa\bas\bsh\bh
- uses the F\bFI\bIG\bGN\bNO\bOR\bRE\bE variable to filter the matches, but does not use the
+ uses the F\bFI\bIG\bGN\bNO\bOR\bRE\bE variable to filter the matches, but does not use the
G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE shell variable.
- Next, completion considers the string specified as the argument to the
- -\b-W\bW option. The string is first split using the characters in the I\bIF\bFS\bS
- special variable as delimiters. This honors shell quoting within the
- string, in order to provide a mechanism for the words to contain shell
- metacharacters or characters in the value of I\bIF\bFS\bS. Each word is then
+ Next, completion considers the string specified as the argument to the
+ -\b-W\bW option. The string is first split using the characters in the I\bIF\bFS\bS
+ special variable as delimiters. This honors shell quoting within the
+ string, in order to provide a mechanism for the words to contain shell
+ metacharacters or characters in the value of I\bIF\bFS\bS. Each word is then
expanded using brace expansion, tilde expansion, parameter and variable
expansion, command substitution, and arithmetic expansion, as described
above under E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN. The results are split using the rules described
- above under W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg. The results of the expansion are prefix-
+ above under W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg. The results of the expansion are prefix-
matched against the word being completed, and the matching words become
possible completions.
- After these matches have been generated, b\bba\bas\bsh\bh executes any shell func-
+ After these matches have been generated, b\bba\bas\bsh\bh executes any shell func-
tion or command specified with the -\b-F\bF and -\b-C\bC options. When the command
- or function is invoked, b\bba\bas\bsh\bh assigns values to the C\bCO\bOM\bMP\bP_\b_L\bLI\bIN\bNE\bE,
- C\bCO\bOM\bMP\bP_\b_P\bPO\bOI\bIN\bNT\bT, C\bCO\bOM\bMP\bP_\b_K\bKE\bEY\bY, and C\bCO\bOM\bMP\bP_\b_T\bTY\bYP\bPE\bE variables as described above under
- S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs. If a shell function is being invoked, b\bba\bas\bsh\bh also sets
- the C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDS\bS and C\bCO\bOM\bMP\bP_\b_C\bCW\bWO\bOR\bRD\bD variables. When the function or command
- is invoked, the first argument ($\b$1\b1) is the name of the command whose
+ or function is invoked, b\bba\bas\bsh\bh assigns values to the C\bCO\bOM\bMP\bP_\b_L\bLI\bIN\bNE\bE,
+ C\bCO\bOM\bMP\bP_\b_P\bPO\bOI\bIN\bNT\bT, C\bCO\bOM\bMP\bP_\b_K\bKE\bEY\bY, and C\bCO\bOM\bMP\bP_\b_T\bTY\bYP\bPE\bE variables as described above under
+ S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs. If a shell function is being invoked, b\bba\bas\bsh\bh also sets
+ the C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDS\bS and C\bCO\bOM\bMP\bP_\b_C\bCW\bWO\bOR\bRD\bD variables. When the function or command
+ is invoked, the first argument ($\b$1\b1) is the name of the command whose
arguments are being completed, the second argument ($\b$2\b2) is the word be-
- ing completed, and the third argument ($\b$3\b3) is the word preceding the
- word being completed on the current command line. There is no filter-
- ing of the generated completions against the word being completed; the
- function or command has complete freedom in generating the matches and
+ ing completed, and the third argument ($\b$3\b3) is the word preceding the
+ word being completed on the current command line. There is no filter-
+ ing of the generated completions against the word being completed; the
+ function or command has complete freedom in generating the matches and
they do not need to match a prefix of the word.
- Any function specified with -\b-F\bF is invoked first. The function may use
+ Any function specified with -\b-F\bF is invoked first. The function may use
any of the shell facilities, including the c\bco\bom\bmp\bpg\bge\ben\bn and c\bco\bom\bmp\bpo\bop\bpt\bt builtins
- described below, to generate the matches. It must put the possible
+ described below, to generate the matches. It must put the possible
completions in the C\bCO\bOM\bMP\bPR\bRE\bEP\bPL\bLY\bY array variable, one per array element.
- Next, any command specified with the -\b-C\bC option is invoked in an envi-
- ronment equivalent to command substitution. It should print a list of
- completions, one per line, to the standard output. Backslash will es-
- cape a newline, if necessary. These are added to the set of possible
+ Next, any command specified with the -\b-C\bC option is invoked in an envi-
+ ronment equivalent to command substitution. It should print a list of
+ completions, one per line, to the standard output. Backslash will es-
+ cape a newline, if necessary. These are added to the set of possible
completions.
After generating all of the possible completions, b\bba\bas\bsh\bh applies any fil-
- ter specified with the -\b-X\bX option to the completions in the list. The
- filter is a pattern as used for pathname expansion; a &\b& in the pattern
+ ter specified with the -\b-X\bX option to the completions in the list. The
+ filter is a pattern as used for pathname expansion; a &\b& in the pattern
is replaced with the text of the word being completed. A literal &\b& may
be escaped with a backslash; the backslash is removed before attempting
- a match. Any completion that matches the pattern is removed from the
- list. A leading !\b! negates the pattern; in this case b\bba\bas\bsh\bh removes any
- completion that does not match the pattern. If the n\bno\boc\bca\bas\bse\bem\bma\bat\btc\bch\bh shell
- option is enabled, b\bba\bas\bsh\bh performs the match without regard to the case
+ a match. Any completion that matches the pattern is removed from the
+ list. A leading !\b! negates the pattern; in this case b\bba\bas\bsh\bh removes any
+ completion that does not match the pattern. If the n\bno\boc\bca\bas\bse\bem\bma\bat\btc\bch\bh shell
+ option is enabled, b\bba\bas\bsh\bh performs the match without regard to the case
of alphabetic characters.
- Finally, programmable completion adds any prefix and suffix specified
- with the -\b-P\bP and -\b-S\bS options, respectively, to each completion, and re-
+ Finally, programmable completion adds any prefix and suffix specified
+ with the -\b-P\bP and -\b-S\bS options, respectively, to each completion, and re-
turns the result to r\bre\bea\bad\bdl\bli\bin\bne\be as the list of possible completions.
- If the previously-applied actions do not generate any matches, and the
- -\b-o\bo d\bdi\bir\brn\bna\bam\bme\bes\bs option was supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec was de-
+ If the previously-applied actions do not generate any matches, and the
+ -\b-o\bo d\bdi\bir\brn\bna\bam\bme\bes\bs option was supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec was de-
fined, b\bba\bas\bsh\bh attempts directory name completion.
- If the -\b-o\bo p\bpl\blu\bus\bsd\bdi\bir\brs\bs option was supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec
- was defined, b\bba\bas\bsh\bh attempts directory name completion and adds any
+ If the -\b-o\bo p\bpl\blu\bus\bsd\bdi\bir\brs\bs option was supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec
+ was defined, b\bba\bas\bsh\bh attempts directory name completion and adds any
matches to the set of possible completions.
- By default, if a compspec is found, whatever it generates is returned
- to the completion code as the full set of possible completions. The
- default b\bba\bas\bsh\bh completions and the r\bre\bea\bad\bdl\bli\bin\bne\be default of filename comple-
- tion are disabled. If the -\b-o\bo b\bba\bas\bsh\bhd\bde\bef\bfa\bau\bul\blt\bt option was supplied to c\bco\bom\bm-\b-
- p\bpl\ble\bet\bte\be when the compspec was defined, and the compspec generates no
- matches, b\bba\bas\bsh\bh attempts its default completions. If the compspec and,
+ By default, if a compspec is found, whatever it generates is returned
+ to the completion code as the full set of possible completions. The
+ default b\bba\bas\bsh\bh completions and the r\bre\bea\bad\bdl\bli\bin\bne\be default of filename comple-
+ tion are disabled. If the -\b-o\bo b\bba\bas\bsh\bhd\bde\bef\bfa\bau\bul\blt\bt option was supplied to c\bco\bom\bm-\b-
+ p\bpl\ble\bet\bte\be when the compspec was defined, and the compspec generates no
+ matches, b\bba\bas\bsh\bh attempts its default completions. If the compspec and,
if attempted, the default b\bba\bas\bsh\bh completions generate no matches, and the
- -\b-o\bo d\bde\bef\bfa\bau\bul\blt\bt option was supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec was de-
+ -\b-o\bo d\bde\bef\bfa\bau\bul\blt\bt option was supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec was de-
fined, programmable completion performs r\bre\bea\bad\bdl\bli\bin\bne\be's default completion.
- The options supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be and c\bco\bom\bmp\bpo\bop\bpt\bt can control how r\bre\bea\bad\bdl\bli\bin\bne\be
- treats the completions. For instance, the _\b-_\bo _\bf_\bu_\bl_\bl_\bq_\bu_\bo_\bt_\be option tells
- r\bre\bea\bad\bdl\bli\bin\bne\be to quote the matches as if they were filenames. See the de-
+ The options supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be and c\bco\bom\bmp\bpo\bop\bpt\bt can control how r\bre\bea\bad\bdl\bli\bin\bne\be
+ treats the completions. For instance, the _\b-_\bo _\bf_\bu_\bl_\bl_\bq_\bu_\bo_\bt_\be option tells
+ r\bre\bea\bad\bdl\bli\bin\bne\be to quote the matches as if they were filenames. See the de-
scription of c\bco\bom\bmp\bpl\ble\bet\bte\be below for details.
- When a compspec indicates that it wants directory name completion, the
- programmable completion functions force r\bre\bea\bad\bdl\bli\bin\bne\be to append a slash to
+ When a compspec indicates that it wants directory name completion, the
+ programmable completion functions force r\bre\bea\bad\bdl\bli\bin\bne\be to append a slash to
completed names which are symbolic links to directories, subject to the
value of the m\bma\bar\brk\bk-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs r\bre\bea\bad\bdl\bli\bin\bne\be variable, regardless of the set-
ting of the m\bma\bar\brk\bk-\b-s\bsy\bym\bml\bli\bin\bnk\bke\bed\bd-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs r\bre\bea\bad\bdl\bli\bin\bne\be variable.
- There is some support for dynamically modifying completions. This is
- most useful when used in combination with a default completion speci-
- fied with c\bco\bom\bmp\bpl\ble\bet\bte\be -\b-D\bD. It's possible for shell functions executed as
- completion functions to indicate that completion should be retried by
- returning an exit status of 124. If a shell function returns 124, and
+ There is some support for dynamically modifying completions. This is
+ most useful when used in combination with a default completion speci-
+ fied with c\bco\bom\bmp\bpl\ble\bet\bte\be -\b-D\bD. It's possible for shell functions executed as
+ completion functions to indicate that completion should be retried by
+ returning an exit status of 124. If a shell function returns 124, and
changes the compspec associated with the command on which completion is
- being attempted (supplied as the first argument when the function is
+ being attempted (supplied as the first argument when the function is
executed), programmable completion restarts from the beginning, with an
- attempt to find a new compspec for that command. This can be used to
- build a set of completions dynamically as completion is attempted,
+ attempt to find a new compspec for that command. This can be used to
+ build a set of completions dynamically as completion is attempted,
rather than loading them all at once.
- For instance, assuming that there is a library of compspecs, each kept
- in a file corresponding to the name of the command, the following de-
+ For instance, assuming that there is a library of compspecs, each kept
+ in a file corresponding to the name of the command, the following de-
fault completion function would load completions dynamically:
_completion_loader()
{
-o bashdefault -o default
H\bHI\bIS\bST\bTO\bOR\bRY\bY
- When the -\b-o\bo h\bhi\bis\bst\bto\bor\bry\by option to the s\bse\bet\bt builtin is enabled, the shell
+ When the -\b-o\bo h\bhi\bis\bst\bto\bor\bry\by option to the s\bse\bet\bt builtin is enabled, the shell
provides access to the _\bc_\bo_\bm_\bm_\ba_\bn_\bd _\bh_\bi_\bs_\bt_\bo_\br_\by, the list of commands previously
- typed. The value of the H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE variable is used as the number of
- commands to save in a history list: the shell saves the text of the
+ typed. The value of the H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE variable is used as the number of
+ commands to save in a history list: the shell saves the text of the
last H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE commands (default 500). The shell stores each command in
- the history list prior to parameter and variable expansion (see E\bEX\bXP\bPA\bAN\bN-\b-
- S\bSI\bIO\bON\bN above) but after history expansion is performed, subject to the
+ the history list prior to parameter and variable expansion (see E\bEX\bXP\bPA\bAN\bN-\b-
+ S\bSI\bIO\bON\bN above) but after history expansion is performed, subject to the
values of the shell variables H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE and H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL.
- On startup, b\bba\bas\bsh\bh initializes the history list by reading history en-
- tries from the file named by the H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE variable (default
- _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bh_\bi_\bs_\bt_\bo_\br_\by). That file is referred to as the _\bh_\bi_\bs_\bt_\bo_\br_\by _\bf_\bi_\bl_\be. The
- history file is truncated, if necessary, to contain no more than the
- number of history entries specified by the value of the H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bES\bSI\bIZ\bZE\bE
- variable. If H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bES\bSI\bIZ\bZE\bE is unset, or set to null, a non-numeric
+ On startup, b\bba\bas\bsh\bh initializes the history list by reading history en-
+ tries from the file named by the H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE variable (default
+ _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bh_\bi_\bs_\bt_\bo_\br_\by). That file is referred to as the _\bh_\bi_\bs_\bt_\bo_\br_\by _\bf_\bi_\bl_\be. The
+ history file is truncated, if necessary, to contain no more than the
+ number of history entries specified by the value of the H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bES\bSI\bIZ\bZE\bE
+ variable. If H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bES\bSI\bIZ\bZE\bE is unset, or set to null, a non-numeric
value, or a numeric value less than zero, the history file is not trun-
cated.
When the history file is read, lines beginning with the history comment
character followed immediately by a digit are interpreted as timestamps
- for the following history line. These timestamps are optionally dis-
- played depending on the value of the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable. When
- present, history timestamps delimit history entries, making multi-line
+ for the following history line. These timestamps are optionally dis-
+ played depending on the value of the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable. When
+ present, history timestamps delimit history entries, making multi-line
entries possible.
When a shell with history enabled exits, b\bba\bas\bsh\bh copies the last $\b$H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE
- entries from the history list to $\b$H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE. If the h\bhi\bis\bst\bta\bap\bpp\bpe\ben\bnd\bd shell
- option is enabled (see the description of s\bsh\bho\bop\bpt\bt under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN
- C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below), b\bba\bas\bsh\bh appends the entries to the history file, other-
- wise it overwrites the history file. If H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is unset or null, or
- if the history file is unwritable, the history is not saved. After
- saving the history, b\bba\bas\bsh\bh truncates the history file to contain no more
+ entries from the history list to $\b$H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE. If the h\bhi\bis\bst\bta\bap\bpp\bpe\ben\bnd\bd shell
+ option is enabled (see the description of s\bsh\bho\bop\bpt\bt under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN
+ C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below), b\bba\bas\bsh\bh appends the entries to the history file, other-
+ wise it overwrites the history file. If H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is unset or null, or
+ if the history file is unwritable, the history is not saved. After
+ saving the history, b\bba\bas\bsh\bh truncates the history file to contain no more
than H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bES\bSI\bIZ\bZE\bE lines as described above.
- If the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable is set, the shell writes the timestamp
- information associated with each history entry to the history file,
- marked with the history comment character, so timestamps are preserved
+ If the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable is set, the shell writes the timestamp
+ information associated with each history entry to the history file,
+ marked with the history comment character, so timestamps are preserved
across shell sessions. This uses the history comment character to dis-
- tinguish timestamps from other history lines. As above, when using
+ tinguish timestamps from other history lines. As above, when using
H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT, the timestamps delimit multi-line history entries.
- The f\bfc\bc builtin command (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below) will list or
+ The f\bfc\bc builtin command (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below) will list or
edit and re-execute a portion of the history list. The h\bhi\bis\bst\bto\bor\bry\by builtin
can display or modify the history list and manipulate the history file.
- When using command-line editing, search commands are available in each
+ When using command-line editing, search commands are available in each
editing mode that provide access to the history list.
- The shell allows control over which commands are saved on the history
+ The shell allows control over which commands are saved on the history
list. The H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL and H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE variables are used to save only a
- subset of the commands entered. If the c\bcm\bmd\bdh\bhi\bis\bst\bt shell option is en-
- abled, the shell attempts to save each line of a multi-line command in
- the same history entry, adding semicolons where necessary to preserve
- syntactic correctness. The l\bli\bit\bth\bhi\bis\bst\bt shell option modifies c\bcm\bmd\bdh\bhi\bis\bst\bt by
- saving the command with embedded newlines instead of semicolons. See
+ subset of the commands entered. If the c\bcm\bmd\bdh\bhi\bis\bst\bt shell option is en-
+ abled, the shell attempts to save each line of a multi-line command in
+ the same history entry, adding semicolons where necessary to preserve
+ syntactic correctness. The l\bli\bit\bth\bhi\bis\bst\bt shell option modifies c\bcm\bmd\bdh\bhi\bis\bst\bt by
+ saving the command with embedded newlines instead of semicolons. See
the description of the s\bsh\bho\bop\bpt\bt builtin below under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
for information on setting and unsetting shell options.
H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN
- The shell supports a history expansion feature that is similar to the
- history expansion in c\bcs\bsh\bh. This section describes what syntax features
+ The shell supports a history expansion feature that is similar to the
+ history expansion in c\bcs\bsh\bh. This section describes what syntax features
are available.
History expansion is enabled by default for interactive shells, and can
- be disabled using the +\b+H\bH option to the s\bse\bet\bt builtin command (see S\bSH\bHE\bEL\bLL\bL
+ be disabled using the +\b+H\bH option to the s\bse\bet\bt builtin command (see S\bSH\bHE\bEL\bLL\bL
B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below). Non-interactive shells do not perform history
expansion by default, but it can be enabled with "set -H".
History expansions introduce words from the history list into the input
- stream, making it easy to repeat commands, insert the arguments to a
+ stream, making it easy to repeat commands, insert the arguments to a
previous command into the current input line, or fix errors in previous
commands quickly.
- History expansion is performed immediately after a complete line is
- read, before the shell breaks it into words, and is performed on each
- line individually. The shell attempts to inform the history expansion
+ History expansion is performed immediately after a complete line is
+ read, before the shell breaks it into words, and is performed on each
+ line individually. The shell attempts to inform the history expansion
functions about quoting still in effect from previous lines.
- It takes place in two parts. The first is to determine which history
- list entry to use during substitution. The second is to select por-
+ It takes place in two parts. The first is to determine which history
+ list entry to use during substitution. The second is to select por-
tions of that entry to include into the current one.
- The entry selected from the history is the _\be_\bv_\be_\bn_\bt, and the portions of
+ The entry selected from the history is the _\be_\bv_\be_\bn_\bt, and the portions of
that entry that are acted upon are _\bw_\bo_\br_\bd_\bs. Various _\bm_\bo_\bd_\bi_\bf_\bi_\be_\br_\bs are avail-
- able to manipulate the selected words. The entry is split into words
- in the same fashion as when reading input, so that several _\bm_\be_\bt_\ba_\bc_\bh_\ba_\br_\ba_\bc_\b-
- _\bt_\be_\br-separated words surrounded by quotes are considered one word. The
- _\be_\bv_\be_\bn_\bt _\bd_\be_\bs_\bi_\bg_\bn_\ba_\bt_\bo_\br selects the event, the optional _\bw_\bo_\br_\bd _\bd_\be_\bs_\bi_\bg_\bn_\ba_\bt_\bo_\br se-
- lects words from the event, and various optional _\bm_\bo_\bd_\bi_\bf_\bi_\be_\br_\bs are avail-
+ able to manipulate the selected words. The entry is split into words
+ in the same fashion as when reading input, so that several _\bm_\be_\bt_\ba_\bc_\bh_\ba_\br_\ba_\bc_\b-
+ _\bt_\be_\br-separated words surrounded by quotes are considered one word. The
+ _\be_\bv_\be_\bn_\bt _\bd_\be_\bs_\bi_\bg_\bn_\ba_\bt_\bo_\br selects the event, the optional _\bw_\bo_\br_\bd _\bd_\be_\bs_\bi_\bg_\bn_\ba_\bt_\bo_\br se-
+ lects words from the event, and various optional _\bm_\bo_\bd_\bi_\bf_\bi_\be_\br_\bs are avail-
able to manipulate the selected words.
- History expansions are introduced by the appearance of the history ex-
- pansion character, which is !\b! by default. History expansions may ap-
+ History expansions are introduced by the appearance of the history ex-
+ pansion character, which is !\b! by default. History expansions may ap-
pear anywhere in the input, but do not nest.
- Only backslash (\\b\) and single quotes can quote the history expansion
- character, but the history expansion character is also treated as
+ Only backslash (\\b\) and single quotes can quote the history expansion
+ character, but the history expansion character is also treated as
quoted if it immediately precedes the closing double quote in a double-
quoted string.
- Several characters inhibit history expansion if found immediately fol-
- lowing the history expansion character, even if it is unquoted: space,
- tab, newline, carriage return, =\b=, and the other shell metacharacters
+ Several characters inhibit history expansion if found immediately fol-
+ lowing the history expansion character, even if it is unquoted: space,
+ tab, newline, carriage return, =\b=, and the other shell metacharacters
defined above.
There is a special abbreviation for substitution, active when the _\bq_\bu_\bi_\bc_\bk
- _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\bt_\bi_\bo_\bn character (described above under h\bhi\bis\bst\btc\bch\bha\bar\brs\bs) is the first
+ _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\bt_\bi_\bo_\bn character (described above under h\bhi\bis\bst\btc\bch\bha\bar\brs\bs) is the first
character on the line. It selects the previous history list entry, us-
- ing an event designator equivalent to !\b!!\b!, and substitutes one string
- for another in that entry. It is described below under E\bEv\bve\ben\bnt\bt D\bDe\bes\bsi\big\bgn\bna\ba-\b-
- t\bto\bor\brs\bs. This is the only history expansion that does not begin with the
+ ing an event designator equivalent to !\b!!\b!, and substitutes one string
+ for another in that entry. It is described below under E\bEv\bve\ben\bnt\bt D\bDe\bes\bsi\big\bgn\bna\ba-\b-
+ t\bto\bor\brs\bs. This is the only history expansion that does not begin with the
history expansion character.
- Several shell options settable with the s\bsh\bho\bop\bpt\bt builtin will modify his-
- tory expansion behavior (see the description of the s\bsh\bho\bop\bpt\bt builtin be-
+ Several shell options settable with the s\bsh\bho\bop\bpt\bt builtin will modify his-
+ tory expansion behavior (see the description of the s\bsh\bho\bop\bpt\bt builtin be-
low).and If the h\bhi\bis\bst\btv\bve\ber\bri\bif\bfy\by shell option is enabled, and r\bre\bea\bad\bdl\bli\bin\bne\be is be-
ing used, history substitutions are not immediately passed to the shell
parser. Instead, the expanded line is reloaded into the r\bre\bea\bad\bdl\bli\bin\bne\be edit-
- ing buffer for further modification. If r\bre\bea\bad\bdl\bli\bin\bne\be is being used, and
- the h\bhi\bis\bst\btr\bre\bee\bed\bdi\bit\bt shell option is enabled, a failed history substitution
+ ing buffer for further modification. If r\bre\bea\bad\bdl\bli\bin\bne\be is being used, and
+ the h\bhi\bis\bst\btr\bre\bee\bed\bdi\bit\bt shell option is enabled, a failed history substitution
is reloaded into the r\bre\bea\bad\bdl\bli\bin\bne\be editing buffer for correction.
- The -\b-p\bp option to the h\bhi\bis\bst\bto\bor\bry\by builtin command shows what a history ex-
- pansion will do before using it. The -\b-s\bs option to the h\bhi\bis\bst\bto\bor\bry\by builtin
- will add commands to the end of the history list without actually exe-
+ The -\b-p\bp option to the h\bhi\bis\bst\bto\bor\bry\by builtin command shows what a history ex-
+ pansion will do before using it. The -\b-s\bs option to the h\bhi\bis\bst\bto\bor\bry\by builtin
+ will add commands to the end of the history list without actually exe-
cuting them, so that they are available for subsequent recall.
- The shell allows control of the various characters used by the history
+ The shell allows control of the various characters used by the history
expansion mechanism (see the description of h\bhi\bis\bst\btc\bch\bha\bar\brs\bs above under S\bSh\bhe\bel\bll\bl
- V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs). The shell uses the history comment character to mark his-
+ V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs). The shell uses the history comment character to mark his-
tory timestamps when writing the history file.
E\bEv\bve\ben\bnt\bt D\bDe\bes\bsi\big\bgn\bna\bat\bto\bor\brs\bs
- An event designator is a reference to an entry in the history list.
+ An event designator is a reference to an entry in the history list.
The event designator consists of the portion of the word beginning with
- the history expansion character and ending with the word designator if
- present, or the end of the word. Unless the reference is absolute,
+ the history expansion character and ending with the word designator if
+ present, or the end of the word. Unless the reference is absolute,
events are relative to the current position in the history list.
- !\b! Start a history substitution, except when followed by a b\bbl\bla\ban\bnk\bk,
- newline, carriage return, =, or, when the e\bex\bxt\btg\bgl\blo\bob\bb shell option
+ !\b! Start a history substitution, except when followed by a b\bbl\bla\ban\bnk\bk,
+ newline, carriage return, =, or, when the e\bex\bxt\btg\bgl\blo\bob\bb shell option
is enabled using the s\bsh\bho\bop\bpt\bt builtin, (.
!\b!_\bn Refer to history list entry _\bn.
!\b!-\b-_\bn Refer to the current entry minus _\bn.
!\b!!\b! Refer to the previous entry. This is a synonym for "!-1".
!\b!_\bs_\bt_\br_\bi_\bn_\bg
- Refer to the most recent command preceding the current position
+ Refer to the most recent command preceding the current position
in the history list starting with _\bs_\bt_\br_\bi_\bn_\bg.
!\b!?\b?_\bs_\bt_\br_\bi_\bn_\bg[\b[?\b?]\b]
- Refer to the most recent command preceding the current position
- in the history list containing _\bs_\bt_\br_\bi_\bn_\bg. The trailing ?\b? may be
- omitted if _\bs_\bt_\br_\bi_\bn_\bg is followed immediately by a newline. If
- _\bs_\bt_\br_\bi_\bn_\bg is missing, this uses the string from the most recent
+ Refer to the most recent command preceding the current position
+ in the history list containing _\bs_\bt_\br_\bi_\bn_\bg. The trailing ?\b? may be
+ omitted if _\bs_\bt_\br_\bi_\bn_\bg is followed immediately by a newline. If
+ _\bs_\bt_\br_\bi_\bn_\bg is missing, this uses the string from the most recent
search; it is an error if there is no previous search string.
^\b^_\bs_\bt_\br_\bi_\bn_\bg_\b1^\b^_\bs_\bt_\br_\bi_\bn_\bg_\b2^\b^
- Quick substitution. Repeat the previous command, replacing
- _\bs_\bt_\br_\bi_\bn_\bg_\b1 with _\bs_\bt_\br_\bi_\bn_\bg_\b2. Equivalent to "!!:s^_\bs_\bt_\br_\bi_\bn_\bg_\b1^_\bs_\bt_\br_\bi_\bn_\bg_\b2^"
+ Quick substitution. Repeat the previous command, replacing
+ _\bs_\bt_\br_\bi_\bn_\bg_\b1 with _\bs_\bt_\br_\bi_\bn_\bg_\b2. Equivalent to "!!:s^_\bs_\bt_\br_\bi_\bn_\bg_\b1^_\bs_\bt_\br_\bi_\bn_\bg_\b2^"
(see M\bMo\bod\bdi\bif\bfi\bie\ber\brs\bs below).
!\b!#\b# The entire command line typed so far.
Word designators are used to select desired words from the event. They
are optional; if the word designator isn't supplied, the history expan-
sion uses the entire event. A :\b: separates the event specification from
- the word designator. It may be omitted if the word designator begins
- with a ^\b^, $\b$, *\b*, -\b-, or %\b%. Words are numbered from the beginning of the
- line, with the first word being denoted by 0 (zero). Words are in-
+ the word designator. It may be omitted if the word designator begins
+ with a ^\b^, $\b$, *\b*, -\b-, or %\b%. Words are numbered from the beginning of the
+ line, with the first word being denoted by 0 (zero). Words are in-
serted into the current line separated by single spaces.
0\b0 (\b(z\bze\ber\bro\bo)\b)
The zeroth word. For the shell, this is the command word.
_\bn The _\bnth word.
^\b^ The first argument: word 1.
- $\b$ The last word. This is usually the last argument, but will ex-
+ $\b$ The last word. This is usually the last argument, but will ex-
pand to the zeroth word if there is only one word in the line.
%\b% The first word matched by the most recent "?_\bs_\bt_\br_\bi_\bn_\bg?" search, if
- the search string begins with a character that is part of a
- word. By default, searches begin at the end of each line and
- proceed to the beginning, so the first word matched is the one
+ the search string begins with a character that is part of a
+ word. By default, searches begin at the end of each line and
+ proceed to the beginning, so the first word matched is the one
closest to the end of the line.
_\bx-\b-_\by A range of words; "-_\by" abbreviates "0-_\by".
- *\b* All of the words but the zeroth. This is a synonym for "_\b1_\b-_\b$".
- It is not an error to use *\b* if there is just one word in the
+ *\b* All of the words but the zeroth. This is a synonym for "_\b1_\b-_\b$".
+ It is not an error to use *\b* if there is just one word in the
event; it expands to the empty string in that case.
x\bx*\b* Abbreviates _\bx_\b-_\b$.
x\bx-\b- Abbreviates _\bx_\b-_\b$ like x\bx*\b*, but omits the last word. If x\bx is miss-
ing, it defaults to 0.
- If a word designator is supplied without an event specification, the
+ If a word designator is supplied without an event specification, the
previous command is used as the event, equivalent to !\b!!\b!.
M\bMo\bod\bdi\bif\bfi\bie\ber\brs\bs
- After the optional word designator, the expansion may include a se-
- quence of one or more of the following modifiers, each preceded by a
- ":". These modify, or edit, the word or words selected from the his-
+ After the optional word designator, the expansion may include a se-
+ quence of one or more of the following modifiers, each preceded by a
+ ":". These modify, or edit, the word or words selected from the his-
tory event.
h\bh Remove a trailing pathname component, leaving only the head.
e\be Remove all but the trailing suffix.
p\bp Print the new command but do not execute it.
q\bq Quote the substituted words, escaping further substitutions.
- x\bx Quote the substituted words as with q\bq, but break into words at
- b\bbl\bla\ban\bnk\bks\bs and newlines. The q\bq and x\bx modifiers are mutually exclu-
+ x\bx Quote the substituted words as with q\bq, but break into words at
+ b\bbl\bla\ban\bnk\bks\bs and newlines. The q\bq and x\bx modifiers are mutually exclu-
sive; expansion uses the last one supplied.
s\bs/\b/_\bo_\bl_\bd/\b/_\bn_\be_\bw/\b/
- Substitute _\bn_\be_\bw for the first occurrence of _\bo_\bl_\bd in the event
+ Substitute _\bn_\be_\bw for the first occurrence of _\bo_\bl_\bd in the event
line. Any character may be used as the delimiter in place of /.
- The final delimiter is optional if it is the last character of
- the event line. A single backslash quotes the delimiter in _\bo_\bl_\bd
- and _\bn_\be_\bw. If & appears in _\bn_\be_\bw, it is replaced with _\bo_\bl_\bd. A sin-
- gle backslash quotes the &. If _\bo_\bl_\bd is null, it is set to the
- last _\bo_\bl_\bd substituted, or, if no previous history substitutions
+ The final delimiter is optional if it is the last character of
+ the event line. A single backslash quotes the delimiter in _\bo_\bl_\bd
+ and _\bn_\be_\bw. If & appears in _\bn_\be_\bw, it is replaced with _\bo_\bl_\bd. A sin-
+ gle backslash quotes the &. If _\bo_\bl_\bd is null, it is set to the
+ last _\bo_\bl_\bd substituted, or, if no previous history substitutions
took place, the last _\bs_\bt_\br_\bi_\bn_\bg in a !\b!?\b?_\bs_\bt_\br_\bi_\bn_\bg[\b[?\b?]\b] search. If _\bn_\be_\bw is
null, each matching _\bo_\bl_\bd is deleted.
&\b& Repeat the previous substitution.
g\bg Cause changes to be applied over the entire event line. This is
- used in conjunction with ":\b:s\bs" (e.g., ":\b:g\bgs\bs/\b/_\bo_\bl_\bd/\b/_\bn_\be_\bw/\b/") or ":\b:&\b&".
- If used with ":\b:s\bs", any delimiter can be used in place of /, and
- the final delimiter is optional if it is the last character of
+ used in conjunction with ":\b:s\bs" (e.g., ":\b:g\bgs\bs/\b/_\bo_\bl_\bd/\b/_\bn_\be_\bw/\b/") or ":\b:&\b&".
+ If used with ":\b:s\bs", any delimiter can be used in place of /, and
+ the final delimiter is optional if it is the last character of
the event line. An a\ba may be used as a synonym for g\bg.
G\bG Apply the following "s\bs" or "&\b&" modifier once to each word in the
event line.
Unless otherwise noted, each builtin command documented in this section
as accepting options preceded by -\b- accepts -\b--\b- to signify the end of the
options. The :\b:, t\btr\bru\bue\be, f\bfa\bal\bls\bse\be, and t\bte\bes\bst\bt/[\b[ builtins do not accept options
- and do not treat -\b--\b- specially. The e\bex\bxi\bit\bt, l\blo\bog\bgo\bou\but\bt, r\bre\bet\btu\bur\brn\bn, b\bbr\bre\bea\bak\bk, c\bco\bon\bn-\b-
- t\bti\bin\bnu\bue\be, l\ble\bet\bt, and s\bsh\bhi\bif\bft\bt builtins accept and process arguments beginning
- with -\b- without requiring -\b--\b-. Other builtins that accept arguments but
- are not specified as accepting options interpret arguments beginning
- with -\b- as invalid options and require -\b--\b- to prevent this interpreta-
+ and do not treat -\b--\b- specially. The e\bex\bxi\bit\bt, l\blo\bog\bgo\bou\but\bt, r\bre\bet\btu\bur\brn\bn, b\bbr\bre\bea\bak\bk, c\bco\bon\bn-\b-
+ t\bti\bin\bnu\bue\be, l\ble\bet\bt, and s\bsh\bhi\bif\bft\bt builtins accept and process arguments beginning
+ with -\b- without requiring -\b--\b-. Other builtins that accept arguments but
+ are not specified as accepting options interpret arguments beginning
+ with -\b- as invalid options and require -\b--\b- to prevent this interpreta-
tion.
:\b: [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
- No effect; the command does nothing beyond expanding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs
+ No effect; the command does nothing beyond expanding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs
and performing any specified redirections. The return status is
zero.
.\b. [-\b-p\bp _\bp_\ba_\bt_\bh] _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
s\bso\bou\bur\brc\bce\be [-\b-p\bp _\bp_\ba_\bt_\bh] _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
- The .\b. command (s\bso\bou\bur\brc\bce\be) reads and execute commands from _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
- in the current shell environment and returns the exit status of
+ The .\b. command (s\bso\bou\bur\brc\bce\be) reads and execute commands from _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
+ in the current shell environment and returns the exit status of
the last command executed from _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be.
If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be does not contain a slash, .\b. searches for it. If the
- -\b-p\bp option is supplied, .\b. treats _\bp_\ba_\bt_\bh as a colon-separated list
- of directories in which to find _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be; otherwise, .\b. uses the
- entries in P\bPA\bAT\bTH\bH to find the directory containing _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be.
- _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be does not need to be executable. When b\bba\bas\bsh\bh is not in
+ -\b-p\bp option is supplied, .\b. treats _\bp_\ba_\bt_\bh as a colon-separated list
+ of directories in which to find _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be; otherwise, .\b. uses the
+ entries in P\bPA\bAT\bTH\bH to find the directory containing _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be.
+ _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be does not need to be executable. When b\bba\bas\bsh\bh is not in
posix mode, it searches the current directory if _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is not
- found in P\bPA\bAT\bTH\bH, but does not search the current directory if -\b-p\bp
+ found in P\bPA\bAT\bTH\bH, but does not search the current directory if -\b-p\bp
is supplied. If the s\bso\bou\bur\brc\bce\bep\bpa\bat\bth\bh option to the s\bsh\bho\bop\bpt\bt builtin com-
mand is turned off, .\b. does not search P\bPA\bAT\bTH\bH.
- If any _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs are supplied, they become the positional para-
- meters when _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is executed. Otherwise the positional pa-
+ If any _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs are supplied, they become the positional para-
+ meters when _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is executed. Otherwise the positional pa-
rameters are unchanged.
If the -\b-T\bT option is enabled, .\b. inherits any trap on D\bDE\bEB\bBU\bUG\bG; if it
- is not, any D\bDE\bEB\bBU\bUG\bG trap string is saved and restored around the
+ is not, any D\bDE\bEB\bBU\bUG\bG trap string is saved and restored around the
call to .\b., and .\b. unsets the D\bDE\bEB\bBU\bUG\bG trap while it executes. If -\b-T\bT
is not set, and the sourced file changes the D\bDE\bEB\bBU\bUG\bG trap, the new
value persists after .\b. completes. The return status is the sta-
tus of the last command executed from _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be (0 if no commands
- are executed), and non-zero if _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is not found or cannot
+ are executed), and non-zero if _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is not found or cannot
be read.
a\bal\bli\bia\bas\bs [-\b-p\bp] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ...]
- With no arguments or with the -\b-p\bp option, a\bal\bli\bia\bas\bs prints the list
- of aliases in the form a\bal\bli\bia\bas\bs _\bn_\ba_\bm_\be=_\bv_\ba_\bl_\bu_\be on standard output.
+ With no arguments or with the -\b-p\bp option, a\bal\bli\bia\bas\bs prints the list
+ of aliases in the form a\bal\bli\bia\bas\bs _\bn_\ba_\bm_\be=_\bv_\ba_\bl_\bu_\be on standard output.
When arguments are supplied, define an alias for each _\bn_\ba_\bm_\be whose
- _\bv_\ba_\bl_\bu_\be is given. A trailing space in _\bv_\ba_\bl_\bu_\be causes the next word
- to be checked for alias substitution when the alias is expanded
- during command parsing. For each _\bn_\ba_\bm_\be in the argument list for
- which no _\bv_\ba_\bl_\bu_\be is supplied, print the name and value of the
- alias _\bn_\ba_\bm_\be. a\bal\bli\bia\bas\bs returns true unless a _\bn_\ba_\bm_\be is given (without
+ _\bv_\ba_\bl_\bu_\be is given. A trailing space in _\bv_\ba_\bl_\bu_\be causes the next word
+ to be checked for alias substitution when the alias is expanded
+ during command parsing. For each _\bn_\ba_\bm_\be in the argument list for
+ which no _\bv_\ba_\bl_\bu_\be is supplied, print the name and value of the
+ alias _\bn_\ba_\bm_\be. a\bal\bli\bia\bas\bs returns true unless a _\bn_\ba_\bm_\be is given (without
a corresponding =_\bv_\ba_\bl_\bu_\be) for which no alias has been defined.
b\bbg\bg [_\bj_\bo_\bb_\bs_\bp_\be_\bc ...]
- Resume each suspended job _\bj_\bo_\bb_\bs_\bp_\be_\bc in the background, as if it
- had been started with &\b&. If _\bj_\bo_\bb_\bs_\bp_\be_\bc is not present, the shell
+ Resume each suspended job _\bj_\bo_\bb_\bs_\bp_\be_\bc in the background, as if it
+ had been started with &\b&. If _\bj_\bo_\bb_\bs_\bp_\be_\bc is not present, the shell
uses its notion of the _\bc_\bu_\br_\br_\be_\bn_\bt _\bj_\bo_\bb. b\bbg\bg _\bj_\bo_\bb_\bs_\bp_\be_\bc returns 0 unless
- run when job control is disabled or, when run with job control
- enabled, any specified _\bj_\bo_\bb_\bs_\bp_\be_\bc was not found or was started
+ run when job control is disabled or, when run with job control
+ enabled, any specified _\bj_\bo_\bb_\bs_\bp_\be_\bc was not found or was started
without job control.
b\bbi\bin\bnd\bd [-\b-m\bm _\bk_\be_\by_\bm_\ba_\bp] [-\b-l\bls\bsv\bvS\bSV\bVX\bX]
b\bbi\bin\bnd\bd [-\b-m\bm _\bk_\be_\by_\bm_\ba_\bp] -\b-p\bp|-\b-P\bP [_\br_\be_\ba_\bd_\bl_\bi_\bn_\be_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd]
b\bbi\bin\bnd\bd [-\b-m\bm _\bk_\be_\by_\bm_\ba_\bp] _\bk_\be_\by_\bs_\be_\bq:_\br_\be_\ba_\bd_\bl_\bi_\bn_\be_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd
b\bbi\bin\bnd\bd _\br_\be_\ba_\bd_\bl_\bi_\bn_\be_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b-_\bl_\bi_\bn_\be
- Display current r\bre\bea\bad\bdl\bli\bin\bne\be key and function bindings, bind a key
- sequence to a r\bre\bea\bad\bdl\bli\bin\bne\be function or macro or to a shell command,
- or set a r\bre\bea\bad\bdl\bli\bin\bne\be variable. Each non-option argument is a key
- binding or command as it would appear in a r\bre\bea\bad\bdl\bli\bin\bne\be initializa-
- tion file such as _\b._\bi_\bn_\bp_\bu_\bt_\br_\bc, but each binding or command must be
- passed as a separate argument; e.g., '"\C-x\C-r":
- re-read-init-file'. In the following descriptions, output
- available to be re-read is formatted as commands that would ap-
+ Display current r\bre\bea\bad\bdl\bli\bin\bne\be key and function bindings, bind a key
+ sequence to a r\bre\bea\bad\bdl\bli\bin\bne\be function or macro or to a shell command,
+ or set a r\bre\bea\bad\bdl\bli\bin\bne\be variable. Each non-option argument is a key
+ binding or command as it would appear in a r\bre\bea\bad\bdl\bli\bin\bne\be initializa-
+ tion file such as _\b._\bi_\bn_\bp_\bu_\bt_\br_\bc, but each binding or command must be
+ passed as a separate argument; e.g., '"\C-x\C-r":
+ re-read-init-file'. In the following descriptions, output
+ available to be re-read is formatted as commands that would ap-
pear in a r\bre\bea\bad\bdl\bli\bin\bne\be initialization file or that would be supplied
- as individual arguments to a b\bbi\bin\bnd\bd command. Options, if sup-
+ as individual arguments to a b\bbi\bin\bnd\bd command. Options, if sup-
plied, have the following meanings:
-\b-m\bm _\bk_\be_\by_\bm_\ba_\bp
Use _\bk_\be_\by_\bm_\ba_\bp as the keymap to be affected by the subsequent
bindings. Acceptable _\bk_\be_\by_\bm_\ba_\bp names are _\be_\bm_\ba_\bc_\bs_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\b-
- _\bd_\ba_\br_\bd_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bm_\be_\bt_\ba_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx_\b, _\bv_\bi_\b, _\bv_\bi_\b-_\bm_\bo_\bv_\be_\b, _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd,
- and _\bv_\bi_\b-_\bi_\bn_\bs_\be_\br_\bt. _\bv_\bi is equivalent to _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd (_\bv_\bi_\b-_\bm_\bo_\bv_\be
- is also a synonym); _\be_\bm_\ba_\bc_\bs is equivalent to _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\b-
+ _\bd_\ba_\br_\bd_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bm_\be_\bt_\ba_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx_\b, _\bv_\bi_\b, _\bv_\bi_\b-_\bm_\bo_\bv_\be_\b, _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd,
+ and _\bv_\bi_\b-_\bi_\bn_\bs_\be_\br_\bt. _\bv_\bi is equivalent to _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd (_\bv_\bi_\b-_\bm_\bo_\bv_\be
+ is also a synonym); _\be_\bm_\ba_\bc_\bs is equivalent to _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\b-
_\bd_\ba_\br_\bd.
-\b-l\bl List the names of all r\bre\bea\bad\bdl\bli\bin\bne\be functions.
- -\b-p\bp Display r\bre\bea\bad\bdl\bli\bin\bne\be function names and bindings in such a
- way that they can be used as an argument to a subsequent
- b\bbi\bin\bnd\bd command or in a r\bre\bea\bad\bdl\bli\bin\bne\be initialization file. If
- arguments remain after option processing, b\bbi\bin\bnd\bd treats
- them as r\bre\bea\bad\bdl\bli\bin\bne\be command names and restricts output to
- those names.
- -\b-P\bP List current r\bre\bea\bad\bdl\bli\bin\bne\be function names and bindings. If
+ -\b-p\bp Display r\bre\bea\bad\bdl\bli\bin\bne\be function names and bindings in such a
+ way that they can be used as an argument to a subsequent
+ b\bbi\bin\bnd\bd command or in a r\bre\bea\bad\bdl\bli\bin\bne\be initialization file. If
arguments remain after option processing, b\bbi\bin\bnd\bd treats
them as r\bre\bea\bad\bdl\bli\bin\bne\be command names and restricts output to
those names.
- -\b-s\bs Display r\bre\bea\bad\bdl\bli\bin\bne\be key sequences bound to macros and the
- strings they output in such a way that they can be used
+ -\b-P\bP List current r\bre\bea\bad\bdl\bli\bin\bne\be function names and bindings. If
+ arguments remain after option processing, b\bbi\bin\bnd\bd treats
+ them as r\bre\bea\bad\bdl\bli\bin\bne\be command names and restricts output to
+ those names.
+ -\b-s\bs Display r\bre\bea\bad\bdl\bli\bin\bne\be key sequences bound to macros and the
+ strings they output in such a way that they can be used
as an argument to a subsequent b\bbi\bin\bnd\bd command or in a r\bre\bea\bad\bd-\b-
l\bli\bin\bne\be initialization file.
- -\b-S\bS Display r\bre\bea\bad\bdl\bli\bin\bne\be key sequences bound to macros and the
+ -\b-S\bS Display r\bre\bea\bad\bdl\bli\bin\bne\be key sequences bound to macros and the
strings they output.
- -\b-v\bv Display r\bre\bea\bad\bdl\bli\bin\bne\be variable names and values in such a way
+ -\b-v\bv Display r\bre\bea\bad\bdl\bli\bin\bne\be variable names and values in such a way
that they can be used as an argument to a subsequent b\bbi\bin\bnd\bd
command or in a r\bre\bea\bad\bdl\bli\bin\bne\be initialization file.
-\b-V\bV List current r\bre\bea\bad\bdl\bli\bin\bne\be variable names and values.
-\b-f\bf _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
Read key bindings from _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be.
-\b-q\bq _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn
- Display key sequences that invoke the named r\bre\bea\bad\bdl\bli\bin\bne\be
+ Display key sequences that invoke the named r\bre\bea\bad\bdl\bli\bin\bne\be
_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn.
-\b-u\bu _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn
- Unbind all key sequences bound to the named r\bre\bea\bad\bdl\bli\bin\bne\be
+ Unbind all key sequences bound to the named r\bre\bea\bad\bdl\bli\bin\bne\be
_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn.
-\b-r\br _\bk_\be_\by_\bs_\be_\bq
Remove any current binding for _\bk_\be_\by_\bs_\be_\bq.
-\b-x\bx _\bk_\be_\by_\bs_\be_\bq[\b[:\b: ]\b]_\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd
Cause _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd to be executed whenever _\bk_\be_\by_\bs_\be_\bq is en-
tered. The separator between _\bk_\be_\by_\bs_\be_\bq and _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd is
- either whitespace or a colon optionally followed by
- whitespace. If the separator is whitespace, _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\b-
- _\bm_\ba_\bn_\bd must be enclosed in double quotes and r\bre\bea\bad\bdl\bli\bin\bne\be ex-
- pands any of its special backslash-escapes in _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\b-
- _\bm_\ba_\bn_\bd before saving it. If the separator is a colon, any
- enclosing double quotes are optional, and r\bre\bea\bad\bdl\bli\bin\bne\be does
- not expand the command string before saving it. Since
- the entire key binding expression must be a single argu-
- ment, it should be enclosed in single quotes. When
- _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd is executed, the shell sets the R\bRE\bEA\bAD\bD-\b-
- L\bLI\bIN\bNE\bE_\b_L\bLI\bIN\bNE\bE variable to the contents of the r\bre\bea\bad\bdl\bli\bin\bne\be line
+ either whitespace or a colon optionally followed by
+ whitespace. If the separator is whitespace, _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\b-
+ _\bm_\ba_\bn_\bd must be enclosed in double quotes and r\bre\bea\bad\bdl\bli\bin\bne\be ex-
+ pands any of its special backslash-escapes in _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\b-
+ _\bm_\ba_\bn_\bd before saving it. If the separator is a colon, any
+ enclosing double quotes are optional, and r\bre\bea\bad\bdl\bli\bin\bne\be does
+ not expand the command string before saving it. Since
+ the entire key binding expression must be a single argu-
+ ment, it should be enclosed in single quotes. When
+ _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd is executed, the shell sets the R\bRE\bEA\bAD\bD-\b-
+ L\bLI\bIN\bNE\bE_\b_L\bLI\bIN\bNE\bE variable to the contents of the r\bre\bea\bad\bdl\bli\bin\bne\be line
buffer and the R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_P\bPO\bOI\bIN\bNT\bT and R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_M\bMA\bAR\bRK\bK variables
- to the current location of the insertion point and the
- saved insertion point (the mark), respectively. The
- shell assigns any numeric argument the user supplied to
- the R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_A\bAR\bRG\bGU\bUM\bME\bEN\bNT\bT variable. If there was no argu-
- ment, that variable is not set. If the executed command
- changes the value of any of R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_L\bLI\bIN\bNE\bE, R\bRE\bEA\bAD\bD-\b-
- L\bLI\bIN\bNE\bE_\b_P\bPO\bOI\bIN\bNT\bT, or R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_M\bMA\bAR\bRK\bK, those new values will be
+ to the current location of the insertion point and the
+ saved insertion point (the mark), respectively. The
+ shell assigns any numeric argument the user supplied to
+ the R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_A\bAR\bRG\bGU\bUM\bME\bEN\bNT\bT variable. If there was no argu-
+ ment, that variable is not set. If the executed command
+ changes the value of any of R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_L\bLI\bIN\bNE\bE, R\bRE\bEA\bAD\bD-\b-
+ L\bLI\bIN\bNE\bE_\b_P\bPO\bOI\bIN\bNT\bT, or R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_M\bMA\bAR\bRK\bK, those new values will be
reflected in the editing state.
- -\b-X\bX List all key sequences bound to shell commands and the
- associated commands in a format that can be reused as an
+ -\b-X\bX List all key sequences bound to shell commands and the
+ associated commands in a format that can be reused as an
argument to a subsequent b\bbi\bin\bnd\bd command.
- The return value is 0 unless an unrecognized option is supplied
+ The return value is 0 unless an unrecognized option is supplied
or an error occurred.
b\bbr\bre\bea\bak\bk [_\bn]
- Exit from within a f\bfo\bor\br, w\bwh\bhi\bil\ble\be, u\bun\bnt\bti\bil\bl, or s\bse\bel\ble\bec\bct\bt loop. If _\bn is
+ Exit from within a f\bfo\bor\br, w\bwh\bhi\bil\ble\be, u\bun\bnt\bti\bil\bl, or s\bse\bel\ble\bec\bct\bt loop. If _\bn is
specified, b\bbr\bre\bea\bak\bk exits _\bn enclosing loops. _\bn must be >= 1. If _\bn
- is greater than the number of enclosing loops, all enclosing
+ is greater than the number of enclosing loops, all enclosing
loops are exited. The return value is 0 unless _\bn is not greater
than or equal to 1.
b\bbu\bui\bil\blt\bti\bin\bn _\bs_\bh_\be_\bl_\bl_\b-_\bb_\bu_\bi_\bl_\bt_\bi_\bn [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
- Execute the specified shell builtin _\bs_\bh_\be_\bl_\bl_\b-_\bb_\bu_\bi_\bl_\bt_\bi_\bn, passing it
- _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs, and return its exit status. This is useful when
- defining a function whose name is the same as a shell builtin,
- retaining the functionality of the builtin within the function.
- The c\bcd\bd builtin is commonly redefined this way. The return sta-
+ Execute the specified shell builtin _\bs_\bh_\be_\bl_\bl_\b-_\bb_\bu_\bi_\bl_\bt_\bi_\bn, passing it
+ _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs, and return its exit status. This is useful when
+ defining a function whose name is the same as a shell builtin,
+ retaining the functionality of the builtin within the function.
+ The c\bcd\bd builtin is commonly redefined this way. The return sta-
tus is false if _\bs_\bh_\be_\bl_\bl_\b-_\bb_\bu_\bi_\bl_\bt_\bi_\bn is not a shell builtin command.
c\bca\bal\bll\ble\ber\br [_\be_\bx_\bp_\br]
Returns the context of any active subroutine call (a shell func-
tion or a script executed with the .\b. or s\bso\bou\bur\brc\bce\be builtins).
- Without _\be_\bx_\bp_\br, c\bca\bal\bll\ble\ber\br displays the line number and source file-
- name of the current subroutine call. If a non-negative integer
+ Without _\be_\bx_\bp_\br, c\bca\bal\bll\ble\ber\br displays the line number and source file-
+ name of the current subroutine call. If a non-negative integer
is supplied as _\be_\bx_\bp_\br, c\bca\bal\bll\ble\ber\br displays the line number, subroutine
name, and source file corresponding to that position in the cur-
- rent execution call stack. This extra information may be used,
+ rent execution call stack. This extra information may be used,
for example, to print a stack trace. The current frame is frame
0.
- The return value is 0 unless the shell is not executing a sub-
- routine call or _\be_\bx_\bp_\br does not correspond to a valid position in
+ The return value is 0 unless the shell is not executing a sub-
+ routine call or _\be_\bx_\bp_\br does not correspond to a valid position in
the call stack.
c\bcd\bd [-\b-L\bL] [-\b-@\b@] [_\bd_\bi_\br]
c\bcd\bd -\b-P\bP [-\b-e\be] [-\b-@\b@] [_\bd_\bi_\br]
- Change the current directory to _\bd_\bi_\br. if _\bd_\bi_\br is not supplied,
- the value of the H\bHO\bOM\bME\bE shell variable is used as _\bd_\bi_\br. The vari-
- able C\bCD\bDP\bPA\bAT\bTH\bH exists, and _\bd_\bi_\br does not begin with a slash (/), c\bcd\bd
- uses it as a search path: the shell searches each directory name
- in C\bCD\bDP\bPA\bAT\bTH\bH for _\bd_\bi_\br. Alternative directory names in C\bCD\bDP\bPA\bAT\bTH\bH are
- separated by a colon (:). A null directory name in C\bCD\bDP\bPA\bAT\bTH\bH is
- the same as the current directory, i.e., ".".
-
- The -\b-P\bP option causes c\bcd\bd to use the physical directory structure
+ Change the current directory to _\bd_\bi_\br. if _\bd_\bi_\br is not supplied,
+ the value of the H\bHO\bOM\bME\bE shell variable is used as _\bd_\bi_\br. If _\bd_\bi_\br is
+ the empty string, c\bcd\bd treats it as an error. The variable C\bCD\bDP\bPA\bAT\bTH\bH
+ exists, and _\bd_\bi_\br does not begin with a slash (/), c\bcd\bd uses it as a
+ search path: the shell searches each directory name in C\bCD\bDP\bPA\bAT\bTH\bH
+ for _\bd_\bi_\br. Alternative directory names in C\bCD\bDP\bPA\bAT\bTH\bH are separated by
+ a colon (:). A null directory name in C\bCD\bDP\bPA\bAT\bTH\bH is the same as the
+ current directory, i.e., ".".
+
+ The -\b-P\bP option causes c\bcd\bd to use the physical directory structure
by resolving symbolic links while traversing _\bd_\bi_\br and before pro-
- cessing instances of _\b._\b. in _\bd_\bi_\br (see also the -\b-P\bP option to the
+ cessing instances of _\b._\b. in _\bd_\bi_\br (see also the -\b-P\bP option to the
s\bse\bet\bt builtin command).
- The -\b-L\bL option forces c\bcd\bd to follow symbolic links by resolving
+ The -\b-L\bL option forces c\bcd\bd to follow symbolic links by resolving
the link after processing instances of _\b._\b. in _\bd_\bi_\br. If _\b._\b. appears
- in _\bd_\bi_\br, c\bcd\bd processes it by removing the immediately previous
+ in _\bd_\bi_\br, c\bcd\bd processes it by removing the immediately previous
pathname component from _\bd_\bi_\br, back to a slash or the beginning of
- _\bd_\bi_\br, and verifying that the portion of _\bd_\bi_\br it has processed to
- that point is still a valid directory name after removing the
+ _\bd_\bi_\br, and verifying that the portion of _\bd_\bi_\br it has processed to
+ that point is still a valid directory name after removing the
pathname component. If it is not a valid directory name, c\bcd\bd re-
- turns a non-zero status. If neither -\b-L\bL nor -\b-P\bP is supplied, c\bcd\bd
+ turns a non-zero status. If neither -\b-L\bL nor -\b-P\bP is supplied, c\bcd\bd
behaves as if -\b-L\bL had been supplied.
If the -\b-e\be option is supplied with -\b-P\bP, and c\bcd\bd cannot successfully
- determine the current working directory after a successful di-
+ determine the current working directory after a successful di-
rectory change, it returns a non-zero status.
- On systems that support it, the -\b-@\b@ option presents the extended
+ On systems that support it, the -\b-@\b@ option presents the extended
attributes associated with a file as a directory.
- An argument of -\b- is converted to $\b$O\bOL\bLD\bDP\bPW\bWD\bD before attempting the
+ An argument of -\b- is converted to $\b$O\bOL\bLD\bDP\bPW\bWD\bD before attempting the
directory change.
- If c\bcd\bd uses a non-empty directory name from C\bCD\bDP\bPA\bAT\bTH\bH, or if -\b- is
- the first argument, and the directory change is successful, c\bcd\bd
+ If c\bcd\bd uses a non-empty directory name from C\bCD\bDP\bPA\bAT\bTH\bH, or if -\b- is
+ the first argument, and the directory change is successful, c\bcd\bd
writes the absolute pathname of the new working directory to the
standard output.
- If the directory change is successful, c\bcd\bd sets the value of the
+ If the directory change is successful, c\bcd\bd sets the value of the
P\bPW\bWD\bD environment variable to the new directory name, and sets the
- O\bOL\bLD\bDP\bPW\bWD\bD environment variable to the value of the current working
+ O\bOL\bLD\bDP\bPW\bWD\bD environment variable to the value of the current working
directory before the change.
- The return value is true if the directory was successfully
+ The return value is true if the directory was successfully
changed; false otherwise.
c\bco\bom\bmm\bma\ban\bnd\bd [-\b-p\bpV\bVv\bv] _\bc_\bo_\bm_\bm_\ba_\bn_\bd [_\ba_\br_\bg ...]
- The c\bco\bom\bmm\bma\ban\bnd\bd builtin runs _\bc_\bo_\bm_\bm_\ba_\bn_\bd with _\ba_\br_\bg_\bs suppressing the nor-
+ The c\bco\bom\bmm\bma\ban\bnd\bd builtin runs _\bc_\bo_\bm_\bm_\ba_\bn_\bd with _\ba_\br_\bg_\bs suppressing the nor-
mal shell function lookup for _\bc_\bo_\bm_\bm_\ba_\bn_\bd. Only builtin commands or
- commands found in the P\bPA\bAT\bTH\bH named _\bc_\bo_\bm_\bm_\ba_\bn_\bd are executed. If the
+ commands found in the P\bPA\bAT\bTH\bH named _\bc_\bo_\bm_\bm_\ba_\bn_\bd are executed. If the
-\b-p\bp option is supplied, the search for _\bc_\bo_\bm_\bm_\ba_\bn_\bd is performed using
- a default value for P\bPA\bAT\bTH\bH that is guaranteed to find all of the
+ a default value for P\bPA\bAT\bTH\bH that is guaranteed to find all of the
standard utilities.
- If either the -\b-V\bV or -\b-v\bv option is supplied, c\bco\bom\bmm\bma\ban\bnd\bd prints a de-
- scription of _\bc_\bo_\bm_\bm_\ba_\bn_\bd. The -\b-v\bv option displays a single word in-
- dicating the command or filename used to invoke _\bc_\bo_\bm_\bm_\ba_\bn_\bd; the -\b-V\bV
+ If either the -\b-V\bV or -\b-v\bv option is supplied, c\bco\bom\bmm\bma\ban\bnd\bd prints a de-
+ scription of _\bc_\bo_\bm_\bm_\ba_\bn_\bd. The -\b-v\bv option displays a single word in-
+ dicating the command or filename used to invoke _\bc_\bo_\bm_\bm_\ba_\bn_\bd; the -\b-V\bV
option produces a more verbose description.
- If the -\b-V\bV or -\b-v\bv option is supplied, the exit status is zero if
- _\bc_\bo_\bm_\bm_\ba_\bn_\bd was found, and non-zero if not. If neither option is
- supplied and an error occurred or _\bc_\bo_\bm_\bm_\ba_\bn_\bd cannot be found, the
- exit status is 127. Otherwise, the exit status of the c\bco\bom\bmm\bma\ban\bnd\bd
+ If the -\b-V\bV or -\b-v\bv option is supplied, the exit status is zero if
+ _\bc_\bo_\bm_\bm_\ba_\bn_\bd was found, and non-zero if not. If neither option is
+ supplied and an error occurred or _\bc_\bo_\bm_\bm_\ba_\bn_\bd cannot be found, the
+ exit status is 127. Otherwise, the exit status of the c\bco\bom\bmm\bma\ban\bnd\bd
builtin is the exit status of _\bc_\bo_\bm_\bm_\ba_\bn_\bd.
c\bco\bom\bmp\bpg\bge\ben\bn [-\b-V\bV _\bv_\ba_\br_\bn_\ba_\bm_\be] [_\bo_\bp_\bt_\bi_\bo_\bn] [_\bw_\bo_\br_\bd]
- Generate possible completion matches for _\bw_\bo_\br_\bd according to the
- _\bo_\bp_\bt_\bi_\bo_\bns, which may be any option accepted by the c\bco\bom\bmp\bpl\ble\bet\bte\be
+ Generate possible completion matches for _\bw_\bo_\br_\bd according to the
+ _\bo_\bp_\bt_\bi_\bo_\bns, which may be any option accepted by the c\bco\bom\bmp\bpl\ble\bet\bte\be
builtin with the exceptions of -\b-p\bp, -\b-r\br, -\b-D\bD, -\b-E\bE, and -\b-I\bI, and write
the matches to the standard output.
- If the -\b-V\bV option is supplied, c\bco\bom\bmp\bpg\bge\ben\bn stores the generated com-
- pletions into the indexed array variable _\bv_\ba_\br_\bn_\ba_\bm_\be instead of
+ If the -\b-V\bV option is supplied, c\bco\bom\bmp\bpg\bge\ben\bn stores the generated com-
+ pletions into the indexed array variable _\bv_\ba_\br_\bn_\ba_\bm_\be instead of
writing them to the standard output.
When using the -\b-F\bF or -\b-C\bC options, the various shell variables set
The matches will be generated in the same way as if the program-
mable completion code had generated them directly from a comple-
- tion specification with the same flags. If _\bw_\bo_\br_\bd is specified,
- only those completions matching _\bw_\bo_\br_\bd will be displayed or
+ tion specification with the same flags. If _\bw_\bo_\br_\bd is specified,
+ only those completions matching _\bw_\bo_\br_\bd will be displayed or
stored.
- The return value is true unless an invalid option is supplied,
+ The return value is true unless an invalid option is supplied,
or no matches were generated.
c\bco\bom\bmp\bpl\ble\bet\bte\be [-\b-a\bab\bbc\bcd\bde\bef\bfg\bgj\bjk\bks\bsu\buv\bv] [-\b-o\bo _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn] [-\b-D\bDE\bEI\bI] [-\b-A\bA _\ba_\bc_\bt_\bi_\bo_\bn]
Specify how arguments to each _\bn_\ba_\bm_\be should be completed.
If the -\b-p\bp option is supplied, or if no options or _\bn_\ba_\bm_\bes are sup-
- plied, print existing completion specifications in a way that
+ plied, print existing completion specifications in a way that
allows them to be reused as input. The -\b-r\br option removes a com-
- pletion specification for each _\bn_\ba_\bm_\be, or, if no _\bn_\ba_\bm_\bes are sup-
+ pletion specification for each _\bn_\ba_\bm_\be, or, if no _\bn_\ba_\bm_\bes are sup-
plied, all completion specifications.
- The -\b-D\bD option indicates that other supplied options and actions
- should apply to the "default" command completion; that is, com-
- pletion attempted on a command for which no completion has pre-
- viously been defined. The -\b-E\bE option indicates that other sup-
- plied options and actions should apply to "empty" command com-
- pletion; that is, completion attempted on a blank line. The -\b-I\bI
- option indicates that other supplied options and actions should
- apply to completion on the initial non-assignment word on the
+ The -\b-D\bD option indicates that other supplied options and actions
+ should apply to the "default" command completion; that is, com-
+ pletion attempted on a command for which no completion has pre-
+ viously been defined. The -\b-E\bE option indicates that other sup-
+ plied options and actions should apply to "empty" command com-
+ pletion; that is, completion attempted on a blank line. The -\b-I\bI
+ option indicates that other supplied options and actions should
+ apply to completion on the initial non-assignment word on the
line, or after a command delimiter such as ;\b; or |\b|, which is usu-
ally command name completion. If multiple options are supplied,
the -\b-D\bD option takes precedence over -\b-E\bE, and both take precedence
- over -\b-I\bI. If any of -\b-D\bD, -\b-E\bE, or -\b-I\bI are supplied, any other _\bn_\ba_\bm_\be
- arguments are ignored; these completions only apply to the case
+ over -\b-I\bI. If any of -\b-D\bD, -\b-E\bE, or -\b-I\bI are supplied, any other _\bn_\ba_\bm_\be
+ arguments are ignored; these completions only apply to the case
specified by the option.
The process of applying these completion specifications when at-
- tempting word completion is described above under P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be
+ tempting word completion is described above under P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be
C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn.
- Other options, if specified, have the following meanings. The
- arguments to the -\b-G\bG, -\b-W\bW, and -\b-X\bX options (and, if necessary, the
- -\b-P\bP and -\b-S\bS options) should be quoted to protect them from expan-
+ Other options, if specified, have the following meanings. The
+ arguments to the -\b-G\bG, -\b-W\bW, and -\b-X\bX options (and, if necessary, the
+ -\b-P\bP and -\b-S\bS options) should be quoted to protect them from expan-
sion before the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin is invoked.
-\b-o\bo _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn
- The _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn controls several aspects of the comp-
- spec's behavior beyond the simple generation of comple-
+ The _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn controls several aspects of the comp-
+ spec's behavior beyond the simple generation of comple-
tions. _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn may be one of:
b\bba\bas\bsh\bhd\bde\bef\bfa\bau\bul\blt\bt
Perform the rest of the default b\bba\bas\bsh\bh completions
if the compspec generates no matches.
- d\bde\bef\bfa\bau\bul\blt\bt Use r\bre\bea\bad\bdl\bli\bin\bne\be's default filename completion if
+ d\bde\bef\bfa\bau\bul\blt\bt Use r\bre\bea\bad\bdl\bli\bin\bne\be's default filename completion if
the compspec generates no matches.
d\bdi\bir\brn\bna\bam\bme\bes\bs
- Perform directory name completion if the comp-
+ Perform directory name completion if the comp-
spec generates no matches.
f\bfi\bil\ble\ben\bna\bam\bme\bes\bs
- Tell r\bre\bea\bad\bdl\bli\bin\bne\be that the compspec generates file-
- names, so it can perform any filename-specific
- processing (such as adding a slash to directory
- names, quoting special characters, or suppress-
- ing trailing spaces). This is intended to be
+ Tell r\bre\bea\bad\bdl\bli\bin\bne\be that the compspec generates file-
+ names, so it can perform any filename-specific
+ processing (such as adding a slash to directory
+ names, quoting special characters, or suppress-
+ ing trailing spaces). This is intended to be
used with shell functions.
f\bfu\bul\bll\blq\bqu\buo\bot\bte\be
- Tell r\bre\bea\bad\bdl\bli\bin\bne\be to quote all the completed words
+ Tell r\bre\bea\bad\bdl\bli\bin\bne\be to quote all the completed words
even if they are not filenames.
- n\bno\boq\bqu\buo\bot\bte\be Tell r\bre\bea\bad\bdl\bli\bin\bne\be not to quote the completed words
- if they are filenames (quoting filenames is the
+ n\bno\boq\bqu\buo\bot\bte\be Tell r\bre\bea\bad\bdl\bli\bin\bne\be not to quote the completed words
+ if they are filenames (quoting filenames is the
default).
- n\bno\bos\bso\bor\brt\bt Tell r\bre\bea\bad\bdl\bli\bin\bne\be not to sort the list of possible
+ n\bno\bos\bso\bor\brt\bt Tell r\bre\bea\bad\bdl\bli\bin\bne\be not to sort the list of possible
completions alphabetically.
- n\bno\bos\bsp\bpa\bac\bce\be Tell r\bre\bea\bad\bdl\bli\bin\bne\be not to append a space (the de-
- fault) to words completed at the end of the
+ n\bno\bos\bsp\bpa\bac\bce\be Tell r\bre\bea\bad\bdl\bli\bin\bne\be not to append a space (the de-
+ fault) to words completed at the end of the
line.
p\bpl\blu\bus\bsd\bdi\bir\brs\bs
- After generating any matches defined by the
- compspec, attempt directory name completion and
- add any matches to the results of the other ac-
+ After generating any matches defined by the
+ compspec, attempt directory name completion and
+ add any matches to the results of the other ac-
tions.
-\b-A\bA _\ba_\bc_\bt_\bi_\bo_\bn
- The _\ba_\bc_\bt_\bi_\bo_\bn may be one of the following to generate a
+ The _\ba_\bc_\bt_\bi_\bo_\bn may be one of the following to generate a
list of possible completions:
a\bal\bli\bia\bas\bs Alias names. May also be specified as -\b-a\ba.
a\bar\brr\bra\bay\byv\bva\bar\br
Array variable names.
b\bbi\bin\bnd\bdi\bin\bng\bg R\bRe\bea\bad\bdl\bli\bin\bne\be key binding names.
- b\bbu\bui\bil\blt\bti\bin\bn Names of shell builtin commands. May also be
+ b\bbu\bui\bil\blt\bti\bin\bn Names of shell builtin commands. May also be
specified as -\b-b\bb.
c\bco\bom\bmm\bma\ban\bnd\bd Command names. May also be specified as -\b-c\bc.
d\bdi\bir\bre\bec\bct\bto\bor\bry\by
d\bdi\bis\bsa\bab\bbl\ble\bed\bd
Names of disabled shell builtins.
e\ben\bna\bab\bbl\ble\bed\bd Names of enabled shell builtins.
- e\bex\bxp\bpo\bor\brt\bt Names of exported shell variables. May also be
+ e\bex\bxp\bpo\bor\brt\bt Names of exported shell variables. May also be
specified as -\b-e\be.
- f\bfi\bil\ble\be File and directory names, similar to r\bre\bea\bad\bdl\bli\bin\bne\be's
- filename completion. May also be specified as
+ f\bfi\bil\ble\be File and directory names, similar to r\bre\bea\bad\bdl\bli\bin\bne\be's
+ filename completion. May also be specified as
-\b-f\bf.
f\bfu\bun\bnc\bct\bti\bio\bon\bn
Names of shell functions.
h\bhe\bel\blp\bpt\bto\bop\bpi\bic\bc
Help topics as accepted by the h\bhe\bel\blp\bp builtin.
h\bho\bos\bst\btn\bna\bam\bme\be
- Hostnames, as taken from the file specified by
+ Hostnames, as taken from the file specified by
the H\bHO\bOS\bST\bTF\bFI\bIL\bLE\bE shell variable.
- j\bjo\bob\bb Job names, if job control is active. May also
+ j\bjo\bob\bb Job names, if job control is active. May also
be specified as -\b-j\bj.
- k\bke\bey\byw\bwo\bor\brd\bd Shell reserved words. May also be specified as
+ k\bke\bey\byw\bwo\bor\brd\bd Shell reserved words. May also be specified as
-\b-k\bk.
r\bru\bun\bnn\bni\bin\bng\bg Names of running jobs, if job control is active.
s\bse\ber\brv\bvi\bic\bce\be Service names. May also be specified as -\b-s\bs.
- s\bse\bet\bto\bop\bpt\bt Valid arguments for the -\b-o\bo option to the s\bse\bet\bt
+ s\bse\bet\bto\bop\bpt\bt Valid arguments for the -\b-o\bo option to the s\bse\bet\bt
builtin.
- s\bsh\bho\bop\bpt\bt Shell option names as accepted by the s\bsh\bho\bop\bpt\bt
+ s\bsh\bho\bop\bpt\bt Shell option names as accepted by the s\bsh\bho\bop\bpt\bt
builtin.
s\bsi\big\bgn\bna\bal\bl Signal names.
s\bst\bto\bop\bpp\bpe\bed\bd Names of stopped jobs, if job control is active.
Names of all shell variables. May also be spec-
ified as -\b-v\bv.
-\b-C\bC _\bc_\bo_\bm_\bm_\ba_\bn_\bd
- _\bc_\bo_\bm_\bm_\ba_\bn_\bd is executed in a subshell environment, and its
- output is used as the possible completions. Arguments
+ _\bc_\bo_\bm_\bm_\ba_\bn_\bd is executed in a subshell environment, and its
+ output is used as the possible completions. Arguments
are passed as with the -\b-F\bF option.
-\b-F\bF _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn
- The shell function _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn is executed in the current
- shell environment. When the function is executed, the
+ The shell function _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn is executed in the current
+ shell environment. When the function is executed, the
first argument ($\b$1\b1) is the name of the command whose ar-
guments are being completed, the second argument ($\b$2\b2) is
the word being completed, and the third argument ($\b$3\b3) is
- the word preceding the word being completed on the cur-
+ the word preceding the word being completed on the cur-
rent command line. When _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn finishes, programmable
- completion retrieves the possible completions from the
+ completion retrieves the possible completions from the
value of the C\bCO\bOM\bMP\bPR\bRE\bEP\bPL\bLY\bY array variable.
-\b-G\bG _\bg_\bl_\bo_\bb_\bp_\ba_\bt
- Expand the pathname expansion pattern _\bg_\bl_\bo_\bb_\bp_\ba_\bt to gener-
+ Expand the pathname expansion pattern _\bg_\bl_\bo_\bb_\bp_\ba_\bt to gener-
ate the possible completions.
-\b-P\bP _\bp_\br_\be_\bf_\bi_\bx
- Add _\bp_\br_\be_\bf_\bi_\bx to the beginning of each possible completion
+ Add _\bp_\br_\be_\bf_\bi_\bx to the beginning of each possible completion
after all other options have been applied.
-\b-S\bS _\bs_\bu_\bf_\bf_\bi_\bx
- Append _\bs_\bu_\bf_\bf_\bi_\bx to each possible completion after all
+ Append _\bs_\bu_\bf_\bf_\bi_\bx to each possible completion after all
other options have been applied.
-\b-W\bW _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt
- Split the _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt using the characters in the I\bIF\bFS\bS spe-
- cial variable as delimiters, and expand each resulting
- word. Shell quoting is honored within _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt, in or-
- der to provide a mechanism for the words to contain
- shell metacharacters or characters in the value of I\bIF\bFS\bS.
- The possible completions are the members of the resul-
- tant list which match a prefix of the word being com-
+ Split the _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt using the characters in the I\bIF\bFS\bS spe-
+ cial variable as delimiters, and expand each resulting
+ word. Shell quoting is honored within _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt, in or-
+ der to provide a mechanism for the words to contain
+ shell metacharacters or characters in the value of I\bIF\bFS\bS.
+ The possible completions are the members of the resul-
+ tant list which match a prefix of the word being com-
pleted.
-\b-X\bX _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt
- _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is a pattern as used for pathname expansion.
+ _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is a pattern as used for pathname expansion.
It is applied to the list of possible completions gener-
- ated by the preceding options and arguments, and each
- completion matching _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is removed from the list.
- A leading !\b! in _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt negates the pattern; in this
+ ated by the preceding options and arguments, and each
+ completion matching _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is removed from the list.
+ A leading !\b! in _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt negates the pattern; in this
case, any completion not matching _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is removed.
- The return value is true unless an invalid option is supplied,
+ The return value is true unless an invalid option is supplied,
an option other than -\b-p\bp, -\b-r\br, -\b-D\bD, -\b-E\bE, or -\b-I\bI is supplied without a
- _\bn_\ba_\bm_\be argument, an attempt is made to remove a completion speci-
+ _\bn_\ba_\bm_\be argument, an attempt is made to remove a completion speci-
fication for a _\bn_\ba_\bm_\be for which no specification exists, or an er-
ror occurs adding a completion specification.
c\bco\bom\bmp\bpo\bop\bpt\bt [-\b-o\bo _\bo_\bp_\bt_\bi_\bo_\bn] [-\b-D\bDE\bEI\bI] [+\b+o\bo _\bo_\bp_\bt_\bi_\bo_\bn] [_\bn_\ba_\bm_\be]
- Modify completion options for each _\bn_\ba_\bm_\be according to the _\bo_\bp_\b-
+ Modify completion options for each _\bn_\ba_\bm_\be according to the _\bo_\bp_\b-
_\bt_\bi_\bo_\bns, or for the currently-executing completion if no _\bn_\ba_\bm_\bes are
- supplied. If no _\bo_\bp_\bt_\bi_\bo_\bns are supplied, display the completion
- options for each _\bn_\ba_\bm_\be or the current completion. The possible
- values of _\bo_\bp_\bt_\bi_\bo_\bn are those valid for the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin de-
+ supplied. If no _\bo_\bp_\bt_\bi_\bo_\bns are supplied, display the completion
+ options for each _\bn_\ba_\bm_\be or the current completion. The possible
+ values of _\bo_\bp_\bt_\bi_\bo_\bn are those valid for the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin de-
scribed above.
The -\b-D\bD option indicates that other supplied options should apply
- to the "default" command completion; the -\b-E\bE option indicates
+ to the "default" command completion; the -\b-E\bE option indicates
that other supplied options should apply to "empty" command com-
pletion; and the -\b-I\bI option indicates that other supplied options
- should apply to completion on the initial word on the line.
+ should apply to completion on the initial word on the line.
These are determined in the same way as the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin.
If multiple options are supplied, the -\b-D\bD option takes precedence
over -\b-E\bE, and both take precedence over -\b-I\bI.
- The return value is true unless an invalid option is supplied,
+ The return value is true unless an invalid option is supplied,
an attempt is made to modify the options for a _\bn_\ba_\bm_\be for which no
completion specification exists, or an output error occurs.
c\bco\bon\bnt\bti\bin\bnu\bue\be [_\bn]
c\bco\bon\bnt\bti\bin\bnu\bue\be resumes the next iteration of the enclosing f\bfo\bor\br, w\bwh\bhi\bil\ble\be,
- u\bun\bnt\bti\bil\bl, or s\bse\bel\ble\bec\bct\bt loop. If _\bn is specified, b\bba\bas\bsh\bh resumes the _\bnth
- enclosing loop. _\bn must be >= 1. If _\bn is greater than the num-
- ber of enclosing loops, the shell resumes the last enclosing
- loop (the "top-level" loop). The return value is 0 unless _\bn is
+ u\bun\bnt\bti\bil\bl, or s\bse\bel\ble\bec\bct\bt loop. If _\bn is specified, b\bba\bas\bsh\bh resumes the _\bnth
+ enclosing loop. _\bn must be >= 1. If _\bn is greater than the num-
+ ber of enclosing loops, the shell resumes the last enclosing
+ loop (the "top-level" loop). The return value is 0 unless _\bn is
not greater than or equal to 1.
d\bde\bec\bcl\bla\bar\bre\be [-\b-a\baA\bAf\bfF\bFg\bgi\biI\bIl\bln\bnr\brt\btu\bux\bx] [-\b-p\bp] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ...]
t\bty\byp\bpe\bes\bse\bet\bt [-\b-a\baA\bAf\bfF\bFg\bgi\biI\bIl\bln\bnr\brt\btu\bux\bx] [-\b-p\bp] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ...]
- Declare variables and/or give them attributes. If no _\bn_\ba_\bm_\bes are
+ Declare variables and/or give them attributes. If no _\bn_\ba_\bm_\bes are
given then display the values of variables or functions. The -\b-p\bp
- option will display the attributes and values of each _\bn_\ba_\bm_\be.
- When -\b-p\bp is used with _\bn_\ba_\bm_\be arguments, additional options, other
+ option will display the attributes and values of each _\bn_\ba_\bm_\be.
+ When -\b-p\bp is used with _\bn_\ba_\bm_\be arguments, additional options, other
than -\b-f\bf and -\b-F\bF, are ignored.
When -\b-p\bp is supplied without _\bn_\ba_\bm_\be arguments, d\bde\bec\bcl\bla\bar\bre\be will display
the attributes and values of all variables having the attributes
- specified by the additional options. If no other options are
+ specified by the additional options. If no other options are
supplied with -\b-p\bp, d\bde\bec\bcl\bla\bar\bre\be will display the attributes and values
- of all shell variables. The -\b-f\bf option restricts the display to
+ of all shell variables. The -\b-f\bf option restricts the display to
shell functions.
The -\b-F\bF option inhibits the display of function definitions; only
- the function name and attributes are printed. If the e\bex\bxt\btd\bde\beb\bbu\bug\bg
- shell option is enabled using s\bsh\bho\bop\bpt\bt, the source file name and
- line number where each _\bn_\ba_\bm_\be is defined are displayed as well.
+ the function name and attributes are printed. If the e\bex\bxt\btd\bde\beb\bbu\bug\bg
+ shell option is enabled using s\bsh\bho\bop\bpt\bt, the source file name and
+ line number where each _\bn_\ba_\bm_\be is defined are displayed as well.
The -\b-F\bF option implies -\b-f\bf.
- The -\b-g\bg option forces variables to be created or modified at the
+ The -\b-g\bg option forces variables to be created or modified at the
global scope, even when d\bde\bec\bcl\bla\bar\bre\be is executed in a shell function.
It is ignored when d\bde\bec\bcl\bla\bar\bre\be is not executed in a shell function.
- The -\b-I\bI option causes local variables to inherit the attributes
- (except the _\bn_\ba_\bm_\be_\br_\be_\bf attribute) and value of any existing vari-
- able with the same _\bn_\ba_\bm_\be at a surrounding scope. If there is no
+ The -\b-I\bI option causes local variables to inherit the attributes
+ (except the _\bn_\ba_\bm_\be_\br_\be_\bf attribute) and value of any existing vari-
+ able with the same _\bn_\ba_\bm_\be at a surrounding scope. If there is no
existing variable, the local variable is initially unset.
- The following options can be used to restrict output to vari-
- ables with the specified attribute or to give variables attrib-
+ The following options can be used to restrict output to vari-
+ ables with the specified attribute or to give variables attrib-
utes:
- -\b-a\ba Each _\bn_\ba_\bm_\be is an indexed array variable (see A\bAr\brr\bra\bay\bys\bs
+ -\b-a\ba Each _\bn_\ba_\bm_\be is an indexed array variable (see A\bAr\brr\bra\bay\bys\bs
above).
- -\b-A\bA Each _\bn_\ba_\bm_\be is an associative array variable (see A\bAr\brr\bra\bay\bys\bs
+ -\b-A\bA Each _\bn_\ba_\bm_\be is an associative array variable (see A\bAr\brr\bra\bay\bys\bs
above).
-\b-f\bf Each _\bn_\ba_\bm_\be refers to a shell function.
-\b-i\bi The variable is treated as an integer; arithmetic evalua-
- tion (see A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN above) is performed when
+ tion (see A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN above) is performed when
the variable is assigned a value.
- -\b-l\bl When the variable is assigned a value, all upper-case
- characters are converted to lower-case. The upper-case
+ -\b-l\bl When the variable is assigned a value, all upper-case
+ characters are converted to lower-case. The upper-case
attribute is disabled.
- -\b-n\bn Give each _\bn_\ba_\bm_\be the _\bn_\ba_\bm_\be_\br_\be_\bf attribute, making it a name
- reference to another variable. That other variable is
- defined by the value of _\bn_\ba_\bm_\be. All references, assign-
- ments, and attribute modifications to _\bn_\ba_\bm_\be, except those
- using or changing the -\b-n\bn attribute itself, are performed
- on the variable referenced by _\bn_\ba_\bm_\be's value. The nameref
+ -\b-n\bn Give each _\bn_\ba_\bm_\be the _\bn_\ba_\bm_\be_\br_\be_\bf attribute, making it a name
+ reference to another variable. That other variable is
+ defined by the value of _\bn_\ba_\bm_\be. All references, assign-
+ ments, and attribute modifications to _\bn_\ba_\bm_\be, except those
+ using or changing the -\b-n\bn attribute itself, are performed
+ on the variable referenced by _\bn_\ba_\bm_\be's value. The nameref
attribute cannot be applied to array variables.
-\b-r\br Make _\bn_\ba_\bm_\bes readonly. These names cannot then be assigned
values by subsequent assignment statements or unset.
-\b-t\bt Give each _\bn_\ba_\bm_\be the _\bt_\br_\ba_\bc_\be attribute. Traced functions in-
- herit the D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN traps from the calling shell.
+ herit the D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN traps from the calling shell.
The trace attribute has no special meaning for variables.
- -\b-u\bu When the variable is assigned a value, all lower-case
- characters are converted to upper-case. The lower-case
+ -\b-u\bu When the variable is assigned a value, all lower-case
+ characters are converted to upper-case. The lower-case
attribute is disabled.
- -\b-x\bx Mark each _\bn_\ba_\bm_\be for export to subsequent commands via the
+ -\b-x\bx Mark each _\bn_\ba_\bm_\be for export to subsequent commands via the
environment.
- Using "+" instead of "-" turns off the specified attribute in-
+ Using "+" instead of "-" turns off the specified attribute in-
stead, with the exceptions that +\b+a\ba and +\b+A\bA may not be used to de-
- stroy array variables and +\b+r\br will not remove the readonly at-
+ stroy array variables and +\b+r\br will not remove the readonly at-
tribute.
- When used in a function, d\bde\bec\bcl\bla\bar\bre\be and t\bty\byp\bpe\bes\bse\bet\bt make each _\bn_\ba_\bm_\be lo-
- cal, as with the l\blo\boc\bca\bal\bl command, unless the -\b-g\bg option is sup-
- plied. If a variable name is followed by =_\bv_\ba_\bl_\bu_\be, the value of
- the variable is set to _\bv_\ba_\bl_\bu_\be. When using -\b-a\ba or -\b-A\bA and the com-
- pound assignment syntax to create array variables, additional
+ When used in a function, d\bde\bec\bcl\bla\bar\bre\be and t\bty\byp\bpe\bes\bse\bet\bt make each _\bn_\ba_\bm_\be lo-
+ cal, as with the l\blo\boc\bca\bal\bl command, unless the -\b-g\bg option is sup-
+ plied. If a variable name is followed by =_\bv_\ba_\bl_\bu_\be, the value of
+ the variable is set to _\bv_\ba_\bl_\bu_\be. When using -\b-a\ba or -\b-A\bA and the com-
+ pound assignment syntax to create array variables, additional
attributes do not take effect until subsequent assignments.
- The return value is 0 unless an invalid option is encountered,
- an attempt is made to define a function using "-f foo=bar", an
+ The return value is 0 unless an invalid option is encountered,
+ an attempt is made to define a function using "-f foo=bar", an
attempt is made to assign a value to a readonly variable, an at-
tempt is made to assign a value to an array variable without us-
- ing the compound assignment syntax (see A\bAr\brr\bra\bay\bys\bs above), one of
+ ing the compound assignment syntax (see A\bAr\brr\bra\bay\bys\bs above), one of
the _\bn_\ba_\bm_\be_\bs is not a valid shell variable name, an attempt is made
- to turn off readonly status for a readonly variable, an attempt
- is made to turn off array status for an array variable, or an
+ to turn off readonly status for a readonly variable, an attempt
+ is made to turn off array status for an array variable, or an
attempt is made to display a non-existent function with -\b-f\bf.
d\bdi\bir\brs\bs [\b[-\b-c\bcl\blp\bpv\bv]\b] [\b[+\b+_\bn]\b] [\b[-\b-_\bn]\b]
Without options, display the list of currently remembered direc-
- tories. The default display is on a single line with directory
- names separated by spaces. Directories are added to the list
- with the p\bpu\bus\bsh\bhd\bd command; the p\bpo\bop\bpd\bd command removes entries from
- the list. The current directory is always the first directory
+ tories. The default display is on a single line with directory
+ names separated by spaces. Directories are added to the list
+ with the p\bpu\bus\bsh\bhd\bd command; the p\bpo\bop\bpd\bd command removes entries from
+ the list. The current directory is always the first directory
in the stack.
Options, if supplied, have the following meanings:
- -\b-c\bc Clears the directory stack by deleting all of the en-
+ -\b-c\bc Clears the directory stack by deleting all of the en-
tries.
- -\b-l\bl Produces a listing using full pathnames; the default
+ -\b-l\bl Produces a listing using full pathnames; the default
listing format uses a tilde to denote the home directory.
-\b-p\bp Print the directory stack with one entry per line.
- -\b-v\bv Print the directory stack with one entry per line, pre-
+ -\b-v\bv Print the directory stack with one entry per line, pre-
fixing each entry with its index in the stack.
+\b+_\bn Displays the _\bnth entry counting from the left of the list
shown by d\bdi\bir\brs\bs when invoked without options, starting with
zero.
- -\b-_\bn Displays the _\bnth entry counting from the right of the
+ -\b-_\bn Displays the _\bnth entry counting from the right of the
list shown by d\bdi\bir\brs\bs when invoked without options, starting
with zero.
- The return value is 0 unless an invalid option is supplied or _\bn
+ The return value is 0 unless an invalid option is supplied or _\bn
indexes beyond the end of the directory stack.
d\bdi\bis\bso\bow\bwn\bn [-\b-a\bar\br] [-\b-h\bh] [_\bi_\bd ...]
- Without options, remove each _\bi_\bd from the table of active jobs.
- Each _\bi_\bd may be a job specification _\bj_\bo_\bb_\bs_\bp_\be_\bc or a process ID _\bp_\bi_\bd;
+ Without options, remove each _\bi_\bd from the table of active jobs.
+ Each _\bi_\bd may be a job specification _\bj_\bo_\bb_\bs_\bp_\be_\bc or a process ID _\bp_\bi_\bd;
if _\bi_\bd is a _\bp_\bi_\bd, d\bdi\bis\bso\bow\bwn\bn uses the job containing _\bp_\bi_\bd as _\bj_\bo_\bb_\bs_\bp_\be_\bc.
- If the -\b-h\bh option is supplied, d\bdi\bis\bso\bow\bwn\bn does not remove the jobs
- corresponding to each _\bi_\bd from the jobs table, but rather marks
- them so the shell does not send S\bSI\bIG\bGH\bHU\bUP\bP to the job if the shell
+ If the -\b-h\bh option is supplied, d\bdi\bis\bso\bow\bwn\bn does not remove the jobs
+ corresponding to each _\bi_\bd from the jobs table, but rather marks
+ them so the shell does not send S\bSI\bIG\bGH\bHU\bUP\bP to the job if the shell
receives a S\bSI\bIG\bGH\bHU\bUP\bP.
- If no _\bi_\bd is supplied, the -\b-a\ba option means to remove or mark all
+ If no _\bi_\bd is supplied, the -\b-a\ba option means to remove or mark all
jobs; the -\b-r\br option without an _\bi_\bd argument removes or marks run-
- ning jobs. If no _\bi_\bd is supplied, and neither the -\b-a\ba nor the -\b-r\br
+ ning jobs. If no _\bi_\bd is supplied, and neither the -\b-a\ba nor the -\b-r\br
option is supplied, d\bdi\bis\bso\bow\bwn\bn removes or marks the current job.
The return value is 0 unless an _\bi_\bd does not specify a valid job.
e\bec\bch\bho\bo [-\b-n\bne\beE\bE] [_\ba_\br_\bg ...]
- Output the _\ba_\br_\bgs, separated by spaces, followed by a newline.
- The return status is 0 unless a write error occurs. If -\b-n\bn is
+ Output the _\ba_\br_\bgs, separated by spaces, followed by a newline.
+ The return status is 0 unless a write error occurs. If -\b-n\bn is
specified, the trailing newline is not printed.
- If the -\b-e\be option is given, e\bec\bch\bho\bo interprets the following back-
+ If the -\b-e\be option is given, e\bec\bch\bho\bo interprets the following back-
slash-escaped characters. The -\b-E\bE option disables interpretation
- of these escape characters, even on systems where they are in-
- terpreted by default. The x\bxp\bpg\bg_\b_e\bec\bch\bho\bo shell option determines
+ of these escape characters, even on systems where they are in-
+ terpreted by default. The x\bxp\bpg\bg_\b_e\bec\bch\bho\bo shell option determines
whether or not e\bec\bch\bho\bo interprets any options and expands these es-
- cape characters. e\bec\bch\bho\bo does not interpret -\b--\b- to mean the end of
+ cape characters. e\bec\bch\bho\bo does not interpret -\b--\b- to mean the end of
options.
e\bec\bch\bho\bo interprets the following escape sequences:
\\b\t\bt horizontal tab
\\b\v\bv vertical tab
\\b\\\b\ backslash
- \\b\0\b0_\bn_\bn_\bn The eight-bit character whose value is the octal value
+ \\b\0\b0_\bn_\bn_\bn The eight-bit character whose value is the octal value
_\bn_\bn_\bn (zero to three octal digits).
- \\b\x\bx_\bH_\bH The eight-bit character whose value is the hexadecimal
+ \\b\x\bx_\bH_\bH The eight-bit character whose value is the hexadecimal
value _\bH_\bH (one or two hex digits).
- \\b\u\bu_\bH_\bH_\bH_\bH The Unicode (ISO/IEC 10646) character whose value is the
+ \\b\u\bu_\bH_\bH_\bH_\bH The Unicode (ISO/IEC 10646) character whose value is the
hexadecimal value _\bH_\bH_\bH_\bH (one to four hex digits).
\\b\U\bU_\bH_\bH_\bH_\bH_\bH_\bH_\bH_\bH
- The Unicode (ISO/IEC 10646) character whose value is the
+ The Unicode (ISO/IEC 10646) character whose value is the
hexadecimal value _\bH_\bH_\bH_\bH_\bH_\bH_\bH_\bH (one to eight hex digits).
- e\bec\bch\bho\bo writes any unrecognized backslash-escaped characters un-
+ e\bec\bch\bho\bo writes any unrecognized backslash-escaped characters un-
changed.
e\ben\bna\bab\bbl\ble\be [-\b-a\ba] [-\b-d\bdn\bnp\bps\bs] [-\b-f\bf _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be] [_\bn_\ba_\bm_\be ...]
- Enable and disable builtin shell commands. Disabling a builtin
- allows an executable file which has the same name as a shell
- builtin to be executed without specifying a full pathname, even
+ Enable and disable builtin shell commands. Disabling a builtin
+ allows an executable file which has the same name as a shell
+ builtin to be executed without specifying a full pathname, even
though the shell normally searches for builtins before files.
- If -\b-n\bn is supplied, each _\bn_\ba_\bm_\be is disabled; otherwise, _\bn_\ba_\bm_\bes are
- enabled. For example, to use the t\bte\bes\bst\bt binary found using P\bPA\bAT\bTH\bH
+ If -\b-n\bn is supplied, each _\bn_\ba_\bm_\be is disabled; otherwise, _\bn_\ba_\bm_\bes are
+ enabled. For example, to use the t\bte\bes\bst\bt binary found using P\bPA\bAT\bTH\bH
instead of the shell builtin version, run "enable -n test".
- If no _\bn_\ba_\bm_\be arguments are supplied, or if the -\b-p\bp option is sup-
+ If no _\bn_\ba_\bm_\be arguments are supplied, or if the -\b-p\bp option is sup-
plied, print a list of shell builtins. With no other option ar-
guments, the list consists of all enabled shell builtins. If -\b-n\bn
- is supplied, print only disabled builtins. If -\b-a\ba is supplied,
- the list printed includes all builtins, with an indication of
+ is supplied, print only disabled builtins. If -\b-a\ba is supplied,
+ the list printed includes all builtins, with an indication of
whether or not each is enabled. The -\b-s\bs option means to restrict
the output to the POSIX _\bs_\bp_\be_\bc_\bi_\ba_\bl builtins.
- The -\b-f\bf option means to load the new builtin command _\bn_\ba_\bm_\be from
+ The -\b-f\bf option means to load the new builtin command _\bn_\ba_\bm_\be from
shared object _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be, on systems that support dynamic loading.
If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be does not contain a slash, B\bBa\bas\bsh\bh will use the value of
- the B\bBA\bAS\bSH\bH_\b_L\bLO\bOA\bAD\bDA\bAB\bBL\bLE\bES\bS_\b_P\bPA\bAT\bTH\bH variable as a colon-separated list of
- directories in which to search for _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be. The default for
- B\bBA\bAS\bSH\bH_\b_L\bLO\bOA\bAD\bDA\bAB\bBL\bLE\bES\bS_\b_P\bPA\bAT\bTH\bH is system-dependent, and may include "." to
- force a search of the current directory. The -\b-d\bd option will
- delete a builtin previously loaded with -\b-f\bf. If _\b-_\bs is used with
+ the B\bBA\bAS\bSH\bH_\b_L\bLO\bOA\bAD\bDA\bAB\bBL\bLE\bES\bS_\b_P\bPA\bAT\bTH\bH variable as a colon-separated list of
+ directories in which to search for _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be. The default for
+ B\bBA\bAS\bSH\bH_\b_L\bLO\bOA\bAD\bDA\bAB\bBL\bLE\bES\bS_\b_P\bPA\bAT\bTH\bH is system-dependent, and may include "." to
+ force a search of the current directory. The -\b-d\bd option will
+ delete a builtin previously loaded with -\b-f\bf. If _\b-_\bs is used with
_\b-_\bf, the new builtin becomes a POSIX special builtin.
- If no options are supplied and a _\bn_\ba_\bm_\be is not a shell builtin,
- e\ben\bna\bab\bbl\ble\be will attempt to load _\bn_\ba_\bm_\be from a shared object named
+ If no options are supplied and a _\bn_\ba_\bm_\be is not a shell builtin,
+ e\ben\bna\bab\bbl\ble\be will attempt to load _\bn_\ba_\bm_\be from a shared object named
_\bn_\ba_\bm_\be, as if the command were "enable -f _\bn_\ba_\bm_\be _\bn_\ba_\bm_\be".
- The return value is 0 unless a _\bn_\ba_\bm_\be is not a shell builtin or
+ The return value is 0 unless a _\bn_\ba_\bm_\be is not a shell builtin or
there is an error loading a new builtin from a shared object.
e\bev\bva\bal\bl [_\ba_\br_\bg ...]
- Concatenate the _\ba_\br_\bgs together into a single command, separating
+ Concatenate the _\ba_\br_\bgs together into a single command, separating
them with spaces. B\bBa\bas\bsh\bh then reads and execute this command, and
- returns its exit status as the return status of e\bev\bva\bal\bl. If there
+ returns its exit status as the return status of e\bev\bva\bal\bl. If there
are no _\ba_\br_\bg_\bs, or only null arguments, e\bev\bva\bal\bl returns 0.
e\bex\bxe\bec\bc [-\b-c\bcl\bl] [-\b-a\ba _\bn_\ba_\bm_\be] [_\bc_\bo_\bm_\bm_\ba_\bn_\bd [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]]
- If _\bc_\bo_\bm_\bm_\ba_\bn_\bd is specified, it replaces the shell without creating
- a new process. _\bc_\bo_\bm_\bm_\ba_\bn_\bd cannot be a shell builtin or function.
+ If _\bc_\bo_\bm_\bm_\ba_\bn_\bd is specified, it replaces the shell without creating
+ a new process. _\bc_\bo_\bm_\bm_\ba_\bn_\bd cannot be a shell builtin or function.
The _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs become the arguments to _\bc_\bo_\bm_\bm_\ba_\bn_\bd. If the -\b-l\bl option
is supplied, the shell places a dash at the beginning of the ze-
- roth argument passed to _\bc_\bo_\bm_\bm_\ba_\bn_\bd. This is what _\bl_\bo_\bg_\bi_\bn(1) does.
- The -\b-c\bc option causes _\bc_\bo_\bm_\bm_\ba_\bn_\bd to be executed with an empty envi-
+ roth argument passed to _\bc_\bo_\bm_\bm_\ba_\bn_\bd. This is what _\bl_\bo_\bg_\bi_\bn(1) does.
+ The -\b-c\bc option causes _\bc_\bo_\bm_\bm_\ba_\bn_\bd to be executed with an empty envi-
ronment. If -\b-a\ba is supplied, the shell passes _\bn_\ba_\bm_\be as the zeroth
argument to the executed command.
If _\bc_\bo_\bm_\bm_\ba_\bn_\bd cannot be executed for some reason, a non-interactive
- shell exits, unless the e\bex\bxe\bec\bcf\bfa\bai\bil\bl shell option is enabled. In
- that case, it returns a non-zero status. An interactive shell
- returns a non-zero status if the file cannot be executed. A
+ shell exits, unless the e\bex\bxe\bec\bcf\bfa\bai\bil\bl shell option is enabled. In
+ that case, it returns a non-zero status. An interactive shell
+ returns a non-zero status if the file cannot be executed. A
subshell exits unconditionally if e\bex\bxe\bec\bc fails.
If _\bc_\bo_\bm_\bm_\ba_\bn_\bd is not specified, any redirections take effect in the
- current shell, and the return status is 0. If there is a redi-
+ current shell, and the return status is 0. If there is a redi-
rection error, the return status is 1.
e\bex\bxi\bit\bt [_\bn]
- Cause the shell to exit with a status of _\bn. If _\bn is omitted,
- the exit status is that of the last command executed. Any trap
+ Cause the shell to exit with a status of _\bn. If _\bn is omitted,
+ the exit status is that of the last command executed. Any trap
on E\bEX\bXI\bIT\bT is executed before the shell terminates.
e\bex\bxp\bpo\bor\brt\bt [-\b-f\bfn\bn] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be]] ...
e\bex\bxp\bpo\bor\brt\bt -\b-p\bp [\b[-\b-f\bf]\b]
- The supplied _\bn_\ba_\bm_\be_\bs are marked for automatic export to the envi-
- ronment of subsequently executed commands. If the -\b-f\bf option is
+ The supplied _\bn_\ba_\bm_\be_\bs are marked for automatic export to the envi-
+ ronment of subsequently executed commands. If the -\b-f\bf option is
given, the _\bn_\ba_\bm_\be_\bs refer to functions.
- The -\b-n\bn option unexports, or removes the export attribute, from
- each _\bn_\ba_\bm_\be. If no _\bn_\ba_\bm_\be_\bs are given, or if only the -\b-p\bp option is
- supplied, e\bex\bxp\bpo\bor\brt\bt displays a list of names of all exported vari-
+ The -\b-n\bn option unexports, or removes the export attribute, from
+ each _\bn_\ba_\bm_\be. If no _\bn_\ba_\bm_\be_\bs are given, or if only the -\b-p\bp option is
+ supplied, e\bex\bxp\bpo\bor\brt\bt displays a list of names of all exported vari-
ables on the standard output. Using -\b-p\bp and -\b-f\bf together displays
- exported functions. The -\b-p\bp option displays output in a form
+ exported functions. The -\b-p\bp option displays output in a form
that may be reused as input.
- e\bex\bxp\bpo\bor\brt\bt allows the value of a variable to be set when it is ex-
+ e\bex\bxp\bpo\bor\brt\bt allows the value of a variable to be set when it is ex-
ported or unexported by following the variable name with =_\bv_\ba_\bl_\bu_\be.
This sets the value of the variable to _\bv_\ba_\bl_\bu_\be while modifying the
- export attribute. e\bex\bxp\bpo\bor\brt\bt returns an exit status of 0 unless an
- invalid option is encountered, one of the _\bn_\ba_\bm_\be_\bs is not a valid
+ export attribute. e\bex\bxp\bpo\bor\brt\bt returns an exit status of 0 unless an
+ invalid option is encountered, one of the _\bn_\ba_\bm_\be_\bs is not a valid
shell variable name, or -\b-f\bf is supplied with a _\bn_\ba_\bm_\be that is not a
function.
f\bfc\bc [-\b-e\be _\be_\bn_\ba_\bm_\be] [-\b-l\bln\bnr\br] [_\bf_\bi_\br_\bs_\bt] [_\bl_\ba_\bs_\bt]
f\bfc\bc -\b-s\bs [_\bp_\ba_\bt=_\br_\be_\bp] [_\bc_\bm_\bd]
- The first form selects a range of commands from _\bf_\bi_\br_\bs_\bt to _\bl_\ba_\bs_\bt
- from the history list and displays or edits and re-executes
- them. _\bF_\bi_\br_\bs_\bt and _\bl_\ba_\bs_\bt may be specified as a string (to locate
- the last command beginning with that string) or as a number (an
- index into the history list, where a negative number is used as
+ The first form selects a range of commands from _\bf_\bi_\br_\bs_\bt to _\bl_\ba_\bs_\bt
+ from the history list and displays or edits and re-executes
+ them. _\bF_\bi_\br_\bs_\bt and _\bl_\ba_\bs_\bt may be specified as a string (to locate
+ the last command beginning with that string) or as a number (an
+ index into the history list, where a negative number is used as
an offset from the current command number).
When listing, a _\bf_\bi_\br_\bs_\bt or _\bl_\ba_\bs_\bt of 0 is equivalent to -1 and -0 is
equivalent to the current command (usually the f\bfc\bc command); oth-
- erwise 0 is equivalent to -1 and -0 is invalid. If _\bl_\ba_\bs_\bt is not
+ erwise 0 is equivalent to -1 and -0 is invalid. If _\bl_\ba_\bs_\bt is not
specified, it is set to the current command for listing (so that
"fc -l -10" prints the last 10 commands) and to _\bf_\bi_\br_\bs_\bt otherwise.
If _\bf_\bi_\br_\bs_\bt is not specified, it is set to the previous command for
editing and -16 for listing.
- If the -\b-l\bl option is supplied, the commands are listed on the
- standard output. The -\b-n\bn option suppresses the command numbers
+ If the -\b-l\bl option is supplied, the commands are listed on the
+ standard output. The -\b-n\bn option suppresses the command numbers
when listing. The -\b-r\br option reverses the order of the commands.
- Otherwise, f\bfc\bc invokes the editor named by _\be_\bn_\ba_\bm_\be on a file con-
- taining those commands. If _\be_\bn_\ba_\bm_\be is not supplied, f\bfc\bc uses the
- value of the F\bFC\bCE\bED\bDI\bIT\bT variable, and the value of E\bED\bDI\bIT\bTO\bOR\bR if F\bFC\bCE\bED\bDI\bIT\bT
- is not set. If neither variable is set, f\bfc\bc uses _\bv_\bi_\b. When edit-
- ing is complete, f\bfc\bc reads the file containing the edited com-
+ Otherwise, f\bfc\bc invokes the editor named by _\be_\bn_\ba_\bm_\be on a file con-
+ taining those commands. If _\be_\bn_\ba_\bm_\be is not supplied, f\bfc\bc uses the
+ value of the F\bFC\bCE\bED\bDI\bIT\bT variable, and the value of E\bED\bDI\bIT\bTO\bOR\bR if F\bFC\bCE\bED\bDI\bIT\bT
+ is not set. If neither variable is set, f\bfc\bc uses _\bv_\bi_\b. When edit-
+ ing is complete, f\bfc\bc reads the file containing the edited com-
mands and echoes and executes them.
- In the second form, f\bfc\bc re-executes _\bc_\bo_\bm_\bm_\ba_\bn_\bd after replacing each
- instance of _\bp_\ba_\bt with _\br_\be_\bp. _\bC_\bo_\bm_\bm_\ba_\bn_\bd is interpreted the same as
+ In the second form, f\bfc\bc re-executes _\bc_\bo_\bm_\bm_\ba_\bn_\bd after replacing each
+ instance of _\bp_\ba_\bt with _\br_\be_\bp. _\bC_\bo_\bm_\bm_\ba_\bn_\bd is interpreted the same as
_\bf_\bi_\br_\bs_\bt above.
- A useful alias to use with f\bfc\bc is "r="fc -s"", so that typing "r
+ A useful alias to use with f\bfc\bc is "r="fc -s"", so that typing "r
cc" runs the last command beginning with "cc" and typing "r" re-
executes the last command.
- If the first form is used, the return value is zero unless an
- invalid option is encountered or _\bf_\bi_\br_\bs_\bt or _\bl_\ba_\bs_\bt specify history
- lines out of range. When editing and re-executing a file of
+ If the first form is used, the return value is zero unless an
+ invalid option is encountered or _\bf_\bi_\br_\bs_\bt or _\bl_\ba_\bs_\bt specify history
+ lines out of range. When editing and re-executing a file of
commands, the return value is the value of the last command exe-
cuted or failure if an error occurs with the temporary file. If
the second form is used, the return status is that of the re-ex-
- ecuted command, unless _\bc_\bm_\bd does not specify a valid history en-
+ ecuted command, unless _\bc_\bm_\bd does not specify a valid history en-
try, in which case f\bfc\bc returns a non-zero status.
f\bfg\bg [_\bj_\bo_\bb_\bs_\bp_\be_\bc]
- Resume _\bj_\bo_\bb_\bs_\bp_\be_\bc in the foreground, and make it the current job.
- If _\bj_\bo_\bb_\bs_\bp_\be_\bc is not present, f\bfg\bg uses the shell's notion of the
- _\bc_\bu_\br_\br_\be_\bn_\bt _\bj_\bo_\bb. The return value is that of the command placed
- into the foreground, or failure if run when job control is dis-
+ Resume _\bj_\bo_\bb_\bs_\bp_\be_\bc in the foreground, and make it the current job.
+ If _\bj_\bo_\bb_\bs_\bp_\be_\bc is not present, f\bfg\bg uses the shell's notion of the
+ _\bc_\bu_\br_\br_\be_\bn_\bt _\bj_\bo_\bb. The return value is that of the command placed
+ into the foreground, or failure if run when job control is dis-
abled or, when run with job control enabled, if _\bj_\bo_\bb_\bs_\bp_\be_\bc does not
- specify a valid job or _\bj_\bo_\bb_\bs_\bp_\be_\bc specifies a job that was started
+ specify a valid job or _\bj_\bo_\bb_\bs_\bp_\be_\bc specifies a job that was started
without job control.
g\bge\bet\bto\bop\bpt\bts\bs _\bo_\bp_\bt_\bs_\bt_\br_\bi_\bn_\bg _\bn_\ba_\bm_\be [_\ba_\br_\bg ...]
- g\bge\bet\bto\bop\bpt\bts\bs is used by shell scripts and functions to parse posi-
- tional parameters and obtain options and their arguments. _\bo_\bp_\bt_\b-
- _\bs_\bt_\br_\bi_\bn_\bg contains the option characters to be recognized; if a
+ g\bge\bet\bto\bop\bpt\bts\bs is used by shell scripts and functions to parse posi-
+ tional parameters and obtain options and their arguments. _\bo_\bp_\bt_\b-
+ _\bs_\bt_\br_\bi_\bn_\bg contains the option characters to be recognized; if a
character is followed by a colon, the option is expected to have
- an argument, which should be separated from it by white space.
+ an argument, which should be separated from it by white space.
The colon and question mark characters may not be used as option
characters.
- Each time it is invoked, g\bge\bet\bto\bop\bpt\bts\bs places the next option in the
+ Each time it is invoked, g\bge\bet\bto\bop\bpt\bts\bs places the next option in the
shell variable _\bn_\ba_\bm_\be, initializing _\bn_\ba_\bm_\be if it does not exist, and
the index of the next argument to be processed into the variable
- O\bOP\bPT\bTI\bIN\bND\bD. O\bOP\bPT\bTI\bIN\bND\bD is initialized to 1 each time the shell or a
- shell script is invoked. When an option requires an argument,
+ O\bOP\bPT\bTI\bIN\bND\bD. O\bOP\bPT\bTI\bIN\bND\bD is initialized to 1 each time the shell or a
+ shell script is invoked. When an option requires an argument,
g\bge\bet\bto\bop\bpt\bts\bs places that argument into the variable O\bOP\bPT\bTA\bAR\bRG\bG.
- The shell does not reset O\bOP\bPT\bTI\bIN\bND\bD automatically; it must be manu-
- ally reset between multiple calls to g\bge\bet\bto\bop\bpt\bts\bs within the same
+ The shell does not reset O\bOP\bPT\bTI\bIN\bND\bD automatically; it must be manu-
+ ally reset between multiple calls to g\bge\bet\bto\bop\bpt\bts\bs within the same
shell invocation to use a new set of parameters.
- When it reaches the end of options, g\bge\bet\bto\bop\bpt\bts\bs exits with a return
- value greater than zero. O\bOP\bPT\bTI\bIN\bND\bD is set to the index of the
+ When it reaches the end of options, g\bge\bet\bto\bop\bpt\bts\bs exits with a return
+ value greater than zero. O\bOP\bPT\bTI\bIN\bND\bD is set to the index of the
first non-option argument, and _\bn_\ba_\bm_\be is set to ?.
- g\bge\bet\bto\bop\bpt\bts\bs normally parses the positional parameters, but if more
- arguments are supplied as _\ba_\br_\bg values, g\bge\bet\bto\bop\bpt\bts\bs parses those in-
+ g\bge\bet\bto\bop\bpt\bts\bs normally parses the positional parameters, but if more
+ arguments are supplied as _\ba_\br_\bg values, g\bge\bet\bto\bop\bpt\bts\bs parses those in-
stead.
- g\bge\bet\bto\bop\bpt\bts\bs can report errors in two ways. If the first character
- of _\bo_\bp_\bt_\bs_\bt_\br_\bi_\bn_\bg is a colon, g\bge\bet\bto\bop\bpt\bts\bs uses _\bs_\bi_\bl_\be_\bn_\bt error reporting.
- In normal operation, g\bge\bet\bto\bop\bpt\bts\bs prints diagnostic messages when it
- encounters invalid options or missing option arguments. If the
- variable O\bOP\bPT\bTE\bER\bRR\bR is set to 0, g\bge\bet\bto\bop\bpt\bts\bs does not display any error
- messages, even if the first character of _\bo_\bp_\bt_\bs_\bt_\br_\bi_\bn_\bg is not a
+ g\bge\bet\bto\bop\bpt\bts\bs can report errors in two ways. If the first character
+ of _\bo_\bp_\bt_\bs_\bt_\br_\bi_\bn_\bg is a colon, g\bge\bet\bto\bop\bpt\bts\bs uses _\bs_\bi_\bl_\be_\bn_\bt error reporting.
+ In normal operation, g\bge\bet\bto\bop\bpt\bts\bs prints diagnostic messages when it
+ encounters invalid options or missing option arguments. If the
+ variable O\bOP\bPT\bTE\bER\bRR\bR is set to 0, g\bge\bet\bto\bop\bpt\bts\bs does not display any error
+ messages, even if the first character of _\bo_\bp_\bt_\bs_\bt_\br_\bi_\bn_\bg is not a
colon.
If g\bge\bet\bto\bop\bpt\bts\bs detects an invalid option, it places ? into _\bn_\ba_\bm_\be and,
- if not silent, prints an error message and unsets O\bOP\bPT\bTA\bAR\bRG\bG. If
- g\bge\bet\bto\bop\bpt\bts\bs is silent, it assigns the option character found to O\bOP\bP-\b-
+ if not silent, prints an error message and unsets O\bOP\bPT\bTA\bAR\bRG\bG. If
+ g\bge\bet\bto\bop\bpt\bts\bs is silent, it assigns the option character found to O\bOP\bP-\b-
T\bTA\bAR\bRG\bG and does not print a diagnostic message.
- If a required argument is not found, and g\bge\bet\bto\bop\bpt\bts\bs is not silent,
+ If a required argument is not found, and g\bge\bet\bto\bop\bpt\bts\bs is not silent,
it sets the value of _\bn_\ba_\bm_\be to a question mark (?\b?), unsets O\bOP\bPT\bTA\bAR\bRG\bG,
- and prints a diagnostic message. If g\bge\bet\bto\bop\bpt\bts\bs is silent, it sets
- the value of _\bn_\ba_\bm_\be to a colon (:\b:) and sets O\bOP\bPT\bTA\bAR\bRG\bG to the option
+ and prints a diagnostic message. If g\bge\bet\bto\bop\bpt\bts\bs is silent, it sets
+ the value of _\bn_\ba_\bm_\be to a colon (:\b:) and sets O\bOP\bPT\bTA\bAR\bRG\bG to the option
character found.
- g\bge\bet\bto\bop\bpt\bts\bs returns true if an option, specified or unspecified, is
+ g\bge\bet\bto\bop\bpt\bts\bs returns true if an option, specified or unspecified, is
found. It returns false if the end of options is encountered or
an error occurs.
h\bha\bas\bsh\bh [-\b-l\blr\br] [-\b-p\bp _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be] [-\b-d\bdt\bt] [_\bn_\ba_\bm_\be]
Each time h\bha\bas\bsh\bh is invoked, it remembers the full pathname of the
- command _\bn_\ba_\bm_\be as determined by searching the directories in
- $\b$P\bPA\bAT\bTH\bH. Any previously-remembered pathname associated with _\bn_\ba_\bm_\be
- is discarded. If the -\b-p\bp option is supplied, h\bha\bas\bsh\bh uses _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
+ command _\bn_\ba_\bm_\be as determined by searching the directories in
+ $\b$P\bPA\bAT\bTH\bH. Any previously-remembered pathname associated with _\bn_\ba_\bm_\be
+ is discarded. If the -\b-p\bp option is supplied, h\bha\bas\bsh\bh uses _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
as the full pathname of the command.
- The -\b-r\br option causes the shell to forget all remembered loca-
- tions. Assigning to the P\bPA\bAT\bTH\bH variable also clears all hashed
- filenames. The -\b-d\bd option causes the shell to forget the remem-
+ The -\b-r\br option causes the shell to forget all remembered loca-
+ tions. Assigning to the P\bPA\bAT\bTH\bH variable also clears all hashed
+ filenames. The -\b-d\bd option causes the shell to forget the remem-
bered location of each _\bn_\ba_\bm_\be.
If the -\b-t\bt option is supplied, h\bha\bas\bsh\bh prints the full pathname cor-
- responding to each _\bn_\ba_\bm_\be. If multiple _\bn_\ba_\bm_\be arguments are sup-
- plied with -\b-t\bt, h\bha\bas\bsh\bh prints the _\bn_\ba_\bm_\be before the corresponding
+ responding to each _\bn_\ba_\bm_\be. If multiple _\bn_\ba_\bm_\be arguments are sup-
+ plied with -\b-t\bt, h\bha\bas\bsh\bh prints the _\bn_\ba_\bm_\be before the corresponding
hashed full pathname. The -\b-l\bl option displays output in a format
that may be reused as input.
- If no arguments are given, or if only -\b-l\bl is supplied, h\bha\bas\bsh\bh
- prints information about remembered commands. The -\b-t\bt, -\b-d\bd, and
- -\b-p\bp options (the options that act on the _\bn_\ba_\bm_\be arguments) are mu-
+ If no arguments are given, or if only -\b-l\bl is supplied, h\bha\bas\bsh\bh
+ prints information about remembered commands. The -\b-t\bt, -\b-d\bd, and
+ -\b-p\bp options (the options that act on the _\bn_\ba_\bm_\be arguments) are mu-
tually exclusive. Only one will be active. If more than one is
- supplied, -\b-t\bt has higher priority than -\b-p\bp, and both have higher
+ supplied, -\b-t\bt has higher priority than -\b-p\bp, and both have higher
priority than -\b-d\bd.
- The return status is zero unless a _\bn_\ba_\bm_\be is not found or an in-
+ The return status is zero unless a _\bn_\ba_\bm_\be is not found or an in-
valid option is supplied.
h\bhe\bel\blp\bp [-\b-d\bdm\bms\bs] [_\bp_\ba_\bt_\bt_\be_\br_\bn]
- Display helpful information about builtin commands. If _\bp_\ba_\bt_\bt_\be_\br_\bn
- is specified, h\bhe\bel\blp\bp gives detailed help on all commands matching
- _\bp_\ba_\bt_\bt_\be_\br_\bn as described below; otherwise it displays a list of all
+ Display helpful information about builtin commands. If _\bp_\ba_\bt_\bt_\be_\br_\bn
+ is specified, h\bhe\bel\blp\bp gives detailed help on all commands matching
+ _\bp_\ba_\bt_\bt_\be_\br_\bn as described below; otherwise it displays a list of all
the builtins and shell compound commands.
Options, if supplied, have the follow meanings:
format
-\b-s\bs Display only a short usage synopsis for each _\bp_\ba_\bt_\bt_\be_\br_\bn
- If _\bp_\ba_\bt_\bt_\be_\br_\bn contains pattern matching characters (see P\bPa\bat\btt\bte\ber\brn\bn
- M\bMa\bat\btc\bch\bhi\bin\bng\bg above) it's treated as a shell pattern and h\bhe\bel\blp\bp prints
+ If _\bp_\ba_\bt_\bt_\be_\br_\bn contains pattern matching characters (see P\bPa\bat\btt\bte\ber\brn\bn
+ M\bMa\bat\btc\bch\bhi\bin\bng\bg above) it's treated as a shell pattern and h\bhe\bel\blp\bp prints
the description of each help topic matching _\bp_\ba_\bt_\bt_\be_\br_\bn.
- If not, and _\bp_\ba_\bt_\bt_\be_\br_\bn exactly matches the name of a help topic,
- h\bhe\bel\blp\bp prints the description associated with that topic. Other-
- wise, h\bhe\bel\blp\bp performs prefix matching and prints the descriptions
+ If not, and _\bp_\ba_\bt_\bt_\be_\br_\bn exactly matches the name of a help topic,
+ h\bhe\bel\blp\bp prints the description associated with that topic. Other-
+ wise, h\bhe\bel\blp\bp performs prefix matching and prints the descriptions
of all matching help topics.
The return status is 0 unless no command matches _\bp_\ba_\bt_\bt_\be_\br_\bn.
h\bhi\bis\bst\bto\bor\bry\by -\b-a\ban\bnr\brw\bw [_\bf_\bi_\bl_\be_\bn_\ba_\bm_\be]
h\bhi\bis\bst\bto\bor\bry\by -\b-p\bp _\ba_\br_\bg [_\ba_\br_\bg ...]
h\bhi\bis\bst\bto\bor\bry\by -\b-s\bs _\ba_\br_\bg [_\ba_\br_\bg ...]
- With no options, display the command history list with numbers.
- Entries prefixed with a *\b* have been modified. An argument of _\bn
- lists only the last _\bn entries. If the shell variable H\bHI\bIS\bST\bTT\bTI\bIM\bME\bE-\b-
- F\bFO\bOR\bRM\bMA\bAT\bT is set and not null, it is used as a format string for
- _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3) to display the time stamp associated with each dis-
- played history entry. If h\bhi\bis\bst\bto\bor\bry\by uses H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT, it does
- not print an intervening space between the formatted time stamp
+ With no options, display the command history list with numbers.
+ Entries prefixed with a *\b* have been modified. An argument of _\bn
+ lists only the last _\bn entries. If the shell variable H\bHI\bIS\bST\bTT\bTI\bIM\bME\bE-\b-
+ F\bFO\bOR\bRM\bMA\bAT\bT is set and not null, it is used as a format string for
+ _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3) to display the time stamp associated with each dis-
+ played history entry. If h\bhi\bis\bst\bto\bor\bry\by uses H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT, it does
+ not print an intervening space between the formatted time stamp
and the history entry.
If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is supplied, h\bhi\bis\bst\bto\bor\bry\by uses it as the name of the his-
- tory file; if not, it uses the value of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE. If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
- is not supplied and H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is unset or null, the -\b-a\ba,\b, -\b-n\bn,\b, -\b-r\br,\b,
+ tory file; if not, it uses the value of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE. If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
+ is not supplied and H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is unset or null, the -\b-a\ba,\b, -\b-n\bn,\b, -\b-r\br,\b,
and -\b-w\bw options have no effect.
Options, if supplied, have the following meanings:
can be used with the other options to replace the history
list.
-\b-d\bd _\bo_\bf_\bf_\bs_\be_\bt
- Delete the history entry at position _\bo_\bf_\bf_\bs_\be_\bt. If _\bo_\bf_\bf_\bs_\be_\bt
+ Delete the history entry at position _\bo_\bf_\bf_\bs_\be_\bt. If _\bo_\bf_\bf_\bs_\be_\bt
is negative, it is interpreted as relative to one greater
than the last history position, so negative indices count
- back from the end of the history, and an index of -1
+ back from the end of the history, and an index of -1
refers to the current h\bhi\bis\bst\bto\bor\bry\by -\b-d\bd command.
-\b-d\bd _\bs_\bt_\ba_\br_\bt-_\be_\bn_\bd
- Delete the range of history entries between positions
- _\bs_\bt_\ba_\br_\bt and _\be_\bn_\bd, inclusive. Positive and negative values
+ Delete the range of history entries between positions
+ _\bs_\bt_\ba_\br_\bt and _\be_\bn_\bd, inclusive. Positive and negative values
for _\bs_\bt_\ba_\br_\bt and _\be_\bn_\bd are interpreted as described above.
- -\b-a\ba Append the "new" history lines to the history file.
- These are history lines entered since the beginning of
+ -\b-a\ba Append the "new" history lines to the history file.
+ These are history lines entered since the beginning of
the current b\bba\bas\bsh\bh session, but not already appended to the
history file.
- -\b-n\bn Read the history lines not already read from the history
+ -\b-n\bn Read the history lines not already read from the history
file and add them to the current history list. These are
lines appended to the history file since the beginning of
the current b\bba\bas\bsh\bh session.
rent history list.
-\b-w\bw Write the current history list to the history file, over-
writing the history file.
- -\b-p\bp Perform history substitution on the following _\ba_\br_\bg_\bs and
- display the result on the standard output, without stor-
- ing the results in the history list. Each _\ba_\br_\bg must be
+ -\b-p\bp Perform history substitution on the following _\ba_\br_\bg_\bs and
+ display the result on the standard output, without stor-
+ ing the results in the history list. Each _\ba_\br_\bg must be
quoted to disable normal history expansion.
- -\b-s\bs Store the _\ba_\br_\bg_\bs in the history list as a single entry.
- The last command in the history list is removed before
+ -\b-s\bs Store the _\ba_\br_\bg_\bs in the history list as a single entry.
+ The last command in the history list is removed before
adding the _\ba_\br_\bg_\bs.
- If the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable is set, h\bhi\bis\bst\bto\bor\bry\by writes the time
+ If the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable is set, h\bhi\bis\bst\bto\bor\bry\by writes the time
stamp information associated with each history entry to the his-
- tory file, marked with the history comment character as de-
- scribed above. When the history file is read, lines beginning
- with the history comment character followed immediately by a
- digit are interpreted as timestamps for the following history
+ tory file, marked with the history comment character as de-
+ scribed above. When the history file is read, lines beginning
+ with the history comment character followed immediately by a
+ digit are interpreted as timestamps for the following history
entry.
- The return value is 0 unless an invalid option is encountered,
- an error occurs while reading or writing the history file, an
+ The return value is 0 unless an invalid option is encountered,
+ an error occurs while reading or writing the history file, an
invalid _\bo_\bf_\bf_\bs_\be_\bt or range is supplied as an argument to -\b-d\bd, or the
history expansion supplied as an argument to -\b-p\bp fails.
The first form lists the active jobs. The options have the fol-
lowing meanings:
-\b-l\bl List process IDs in addition to the normal information.
- -\b-n\bn Display information only about jobs that have changed
+ -\b-n\bn Display information only about jobs that have changed
status since the user was last notified of their status.
- -\b-p\bp List only the process ID of the job's process group
+ -\b-p\bp List only the process ID of the job's process group
leader.
-\b-r\br Display only running jobs.
-\b-s\bs Display only stopped jobs.
- If _\bj_\bo_\bb_\bs_\bp_\be_\bc is supplied, j\bjo\bob\bbs\bs restricts output to information
+ If _\bj_\bo_\bb_\bs_\bp_\be_\bc is supplied, j\bjo\bob\bbs\bs restricts output to information
about that job. The return status is 0 unless an invalid option
is encountered or an invalid _\bj_\bo_\bb_\bs_\bp_\be_\bc is supplied.
k\bki\bil\bll\bl [-\b-s\bs _\bs_\bi_\bg_\bs_\bp_\be_\bc | -\b-n\bn _\bs_\bi_\bg_\bn_\bu_\bm | -\b-_\bs_\bi_\bg_\bs_\bp_\be_\bc] _\bi_\bd [ ... ]
k\bki\bil\bll\bl -\b-l\bl|-\b-L\bL [_\bs_\bi_\bg_\bs_\bp_\be_\bc | _\be_\bx_\bi_\bt_\b__\bs_\bt_\ba_\bt_\bu_\bs]
- Send the signal specified by _\bs_\bi_\bg_\bs_\bp_\be_\bc or _\bs_\bi_\bg_\bn_\bu_\bm to the processes
+ Send the signal specified by _\bs_\bi_\bg_\bs_\bp_\be_\bc or _\bs_\bi_\bg_\bn_\bu_\bm to the processes
named by each _\bi_\bd. Each _\bi_\bd may be a job specification _\bj_\bo_\bb_\bs_\bp_\be_\bc or
- a process ID _\bp_\bi_\bd. _\bs_\bi_\bg_\bs_\bp_\be_\bc is either a case-insensitive signal
- name such as S\bSI\bIG\bGK\bKI\bIL\bLL\bL (with or without the S\bSI\bIG\bG prefix) or a sig-
- nal number; _\bs_\bi_\bg_\bn_\bu_\bm is a signal number. If _\bs_\bi_\bg_\bs_\bp_\be_\bc is not sup-
+ a process ID _\bp_\bi_\bd. _\bs_\bi_\bg_\bs_\bp_\be_\bc is either a case-insensitive signal
+ name such as S\bSI\bIG\bGK\bKI\bIL\bLL\bL (with or without the S\bSI\bIG\bG prefix) or a sig-
+ nal number; _\bs_\bi_\bg_\bn_\bu_\bm is a signal number. If _\bs_\bi_\bg_\bs_\bp_\be_\bc is not sup-
plied, then k\bki\bil\bll\bl sends S\bSI\bIG\bGT\bTE\bER\bRM\bM.
The -\b-l\bl option lists the signal names. If any arguments are sup-
plied when -\b-l\bl is given, k\bki\bil\bll\bl lists the names of the signals cor-
- responding to the arguments, and the return status is 0. The
- _\be_\bx_\bi_\bt_\b__\bs_\bt_\ba_\bt_\bu_\bs argument to -\b-l\bl is a number specifying either a sig-
- nal number or the exit status of a process terminated by a sig-
- nal; if it is supplied, k\bki\bil\bll\bl prints the name of the signal that
+ responding to the arguments, and the return status is 0. The
+ _\be_\bx_\bi_\bt_\b__\bs_\bt_\ba_\bt_\bu_\bs argument to -\b-l\bl is a number specifying either a sig-
+ nal number or the exit status of a process terminated by a sig-
+ nal; if it is supplied, k\bki\bil\bll\bl prints the name of the signal that
caused the process to terminate. k\bki\bil\bll\bl assumes that process exit
statuses are greater than 128; anything less than that is a sig-
nal number. The -\b-L\bL option is equivalent to -\b-l\bl.
- k\bki\bil\bll\bl returns true if at least one signal was successfully sent,
+ k\bki\bil\bll\bl returns true if at least one signal was successfully sent,
or false if an error occurs or an invalid option is encountered.
l\ble\bet\bt _\ba_\br_\bg [_\ba_\br_\bg ...]
- Each _\ba_\br_\bg is evaluated as an arithmetic expression (see A\bAR\bRI\bIT\bTH\bH-\b-
- M\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN above). If the last _\ba_\br_\bg evaluates to 0, l\ble\bet\bt
+ Each _\ba_\br_\bg is evaluated as an arithmetic expression (see A\bAR\bRI\bIT\bTH\bH-\b-
+ M\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN above). If the last _\ba_\br_\bg evaluates to 0, l\ble\bet\bt
returns 1; otherwise l\ble\bet\bt returns 0.
l\blo\boc\bca\bal\bl [_\bo_\bp_\bt_\bi_\bo_\bn] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ... | - ]
For each argument, create a local variable named _\bn_\ba_\bm_\be and assign
- it _\bv_\ba_\bl_\bu_\be. The _\bo_\bp_\bt_\bi_\bo_\bn can be any of the options accepted by d\bde\be-\b-
- c\bcl\bla\bar\bre\be. When l\blo\boc\bca\bal\bl is used within a function, it causes the
- variable _\bn_\ba_\bm_\be to have a visible scope restricted to that func-
- tion and its children. It is an error to use l\blo\boc\bca\bal\bl when not
+ it _\bv_\ba_\bl_\bu_\be. The _\bo_\bp_\bt_\bi_\bo_\bn can be any of the options accepted by d\bde\be-\b-
+ c\bcl\bla\bar\bre\be. When l\blo\boc\bca\bal\bl is used within a function, it causes the
+ variable _\bn_\ba_\bm_\be to have a visible scope restricted to that func-
+ tion and its children. It is an error to use l\blo\boc\bca\bal\bl when not
within a function.
- If _\bn_\ba_\bm_\be is -, it makes the set of shell options local to the
- function in which l\blo\boc\bca\bal\bl is invoked: any shell options changed
- using the s\bse\bet\bt builtin inside the function after the call to l\blo\bo-\b-
- c\bca\bal\bl are restored to their original values when the function re-
- turns. The restore is performed as if a series of s\bse\bet\bt commands
- were executed to restore the values that were in place before
+ If _\bn_\ba_\bm_\be is -, it makes the set of shell options local to the
+ function in which l\blo\boc\bca\bal\bl is invoked: any shell options changed
+ using the s\bse\bet\bt builtin inside the function after the call to l\blo\bo-\b-
+ c\bca\bal\bl are restored to their original values when the function re-
+ turns. The restore is performed as if a series of s\bse\bet\bt commands
+ were executed to restore the values that were in place before
the function.
- With no operands, l\blo\boc\bca\bal\bl writes a list of local variables to the
+ With no operands, l\blo\boc\bca\bal\bl writes a list of local variables to the
standard output.
- The return status is 0 unless l\blo\boc\bca\bal\bl is used outside a function,
+ The return status is 0 unless l\blo\boc\bca\bal\bl is used outside a function,
an invalid _\bn_\ba_\bm_\be is supplied, or _\bn_\ba_\bm_\be is a readonly variable.
l\blo\bog\bgo\bou\but\bt [\b[_\bn]\b]
- Exit a login shell, returning a status of _\bn to the shell's par-
+ Exit a login shell, returning a status of _\bn to the shell's par-
ent.
m\bma\bap\bpf\bfi\bil\ble\be [-\b-d\bd _\bd_\be_\bl_\bi_\bm] [-\b-n\bn _\bc_\bo_\bu_\bn_\bt] [-\b-O\bO _\bo_\br_\bi_\bg_\bi_\bn] [-\b-s\bs _\bc_\bo_\bu_\bn_\bt] [-\b-t\bt] [-\b-u\bu _\bf_\bd] [-\b-C\bC
_\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk] [-\b-c\bc _\bq_\bu_\ba_\bn_\bt_\bu_\bm] [_\ba_\br_\br_\ba_\by]
r\bre\bea\bad\bda\bar\brr\bra\bay\by [-\b-d\bd _\bd_\be_\bl_\bi_\bm] [-\b-n\bn _\bc_\bo_\bu_\bn_\bt] [-\b-O\bO _\bo_\br_\bi_\bg_\bi_\bn] [-\b-s\bs _\bc_\bo_\bu_\bn_\bt] [-\b-t\bt] [-\b-u\bu _\bf_\bd] [-\b-C\bC
_\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk] [-\b-c\bc _\bq_\bu_\ba_\bn_\bt_\bu_\bm] [_\ba_\br_\br_\ba_\by]
- Read lines from the standard input, or from file descriptor _\bf_\bd
- if the -\b-u\bu option is supplied, into the indexed array variable
- _\ba_\br_\br_\ba_\by. The variable M\bMA\bAP\bPF\bFI\bIL\bLE\bE is the default _\ba_\br_\br_\ba_\by. Options, if
+ Read lines from the standard input, or from file descriptor _\bf_\bd
+ if the -\b-u\bu option is supplied, into the indexed array variable
+ _\ba_\br_\br_\ba_\by. The variable M\bMA\bAP\bPF\bFI\bIL\bLE\bE is the default _\ba_\br_\br_\ba_\by. Options, if
supplied, have the following meanings:
- -\b-d\bd Use the first character of _\bd_\be_\bl_\bi_\bm to terminate each input
+ -\b-d\bd Use the first character of _\bd_\be_\bl_\bi_\bm to terminate each input
line, rather than newline. If _\bd_\be_\bl_\bi_\bm is the empty string,
m\bma\bap\bpf\bfi\bil\ble\be will terminate a line when it reads a NUL charac-
ter.
-\b-n\bn Copy at most _\bc_\bo_\bu_\bn_\bt lines. If _\bc_\bo_\bu_\bn_\bt is 0, copy all lines.
- -\b-O\bO Begin assigning to _\ba_\br_\br_\ba_\by at index _\bo_\br_\bi_\bg_\bi_\bn. The default
+ -\b-O\bO Begin assigning to _\ba_\br_\br_\ba_\by at index _\bo_\br_\bi_\bg_\bi_\bn. The default
index is 0.
-\b-s\bs Discard the first _\bc_\bo_\bu_\bn_\bt lines read.
- -\b-t\bt Remove a trailing _\bd_\be_\bl_\bi_\bm (default newline) from each line
+ -\b-t\bt Remove a trailing _\bd_\be_\bl_\bi_\bm (default newline) from each line
read.
- -\b-u\bu Read lines from file descriptor _\bf_\bd instead of the stan-
+ -\b-u\bu Read lines from file descriptor _\bf_\bd instead of the stan-
dard input.
- -\b-C\bC Evaluate _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk each time _\bq_\bu_\ba_\bn_\bt_\bu_\bm lines are read. The
+ -\b-C\bC Evaluate _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk each time _\bq_\bu_\ba_\bn_\bt_\bu_\bm lines are read. The
-\b-c\bc option specifies _\bq_\bu_\ba_\bn_\bt_\bu_\bm.
- -\b-c\bc Specify the number of lines read between each call to
+ -\b-c\bc Specify the number of lines read between each call to
_\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk.
- If -\b-C\bC is specified without -\b-c\bc, the default quantum is 5000.
+ If -\b-C\bC is specified without -\b-c\bc, the default quantum is 5000.
When _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk is evaluated, it is supplied the index of the next
array element to be assigned and the line to be assigned to that
- element as additional arguments. _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk is evaluated after
+ element as additional arguments. _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk is evaluated after
the line is read but before the array element is assigned.
- If not supplied with an explicit origin, m\bma\bap\bpf\bfi\bil\ble\be will clear _\ba_\br_\b-
+ If not supplied with an explicit origin, m\bma\bap\bpf\bfi\bil\ble\be will clear _\ba_\br_\b-
_\br_\ba_\by before assigning to it.
m\bma\bap\bpf\bfi\bil\ble\be returns zero unless an invalid option or option argument
- is supplied, _\ba_\br_\br_\ba_\by is invalid or unassignable, or if _\ba_\br_\br_\ba_\by is
+ is supplied, _\ba_\br_\br_\ba_\by is invalid or unassignable, or if _\ba_\br_\br_\ba_\by is
not an indexed array.
p\bpo\bop\bpd\bd [-n\bn] [+_\bn] [-_\bn]
- Remove entries from the directory stack. The elements are num-
- bered from 0 starting at the first directory listed by d\bdi\bir\brs\bs, so
- p\bpo\bop\bpd\bd is equivalent to "popd +0." With no arguments, p\bpo\bop\bpd\bd re-
- moves the top directory from the stack, and changes to the new
+ Remove entries from the directory stack. The elements are num-
+ bered from 0 starting at the first directory listed by d\bdi\bir\brs\bs, so
+ p\bpo\bop\bpd\bd is equivalent to "popd +0." With no arguments, p\bpo\bop\bpd\bd re-
+ moves the top directory from the stack, and changes to the new
top directory. Arguments, if supplied, have the following mean-
ings:
-\b-n\bn Suppress the normal change of directory when removing di-
rectories from the stack, only manipulate the stack.
- +\b+_\bn Remove the _\bnth entry counting from the left of the list
- shown by d\bdi\bir\brs\bs, starting with zero, from the stack. For
+ +\b+_\bn Remove the _\bnth entry counting from the left of the list
+ shown by d\bdi\bir\brs\bs, starting with zero, from the stack. For
example: "popd +0" removes the first directory, "popd +1"
the second.
- -\b-_\bn Remove the _\bnth entry counting from the right of the list
- shown by d\bdi\bir\brs\bs, starting with zero. For example: "popd
- -0" removes the last directory, "popd -1" the next to
+ -\b-_\bn Remove the _\bnth entry counting from the right of the list
+ shown by d\bdi\bir\brs\bs, starting with zero. For example: "popd
+ -0" removes the last directory, "popd -1" the next to
last.
- If the top element of the directory stack is modified, and the
- _\b-_\bn option was not supplied, p\bpo\bop\bpd\bd uses the c\bcd\bd builtin to change
+ If the top element of the directory stack is modified, and the
+ _\b-_\bn option was not supplied, p\bpo\bop\bpd\bd uses the c\bcd\bd builtin to change
to the directory at the top of the stack. If the c\bcd\bd fails, p\bpo\bop\bpd\bd
returns a non-zero value.
- Otherwise, p\bpo\bop\bpd\bd returns false if an invalid option is supplied,
- the directory stack is empty, or _\bn specifies a non-existent di-
+ Otherwise, p\bpo\bop\bpd\bd returns false if an invalid option is supplied,
+ the directory stack is empty, or _\bn specifies a non-existent di-
rectory stack entry.
- If the p\bpo\bop\bpd\bd command is successful, b\bba\bas\bsh\bh runs d\bdi\bir\brs\bs to show the
- final contents of the directory stack, and the return status is
+ If the p\bpo\bop\bpd\bd command is successful, b\bba\bas\bsh\bh runs d\bdi\bir\brs\bs to show the
+ final contents of the directory stack, and the return status is
0.
p\bpr\bri\bin\bnt\btf\bf [-\b-v\bv _\bv_\ba_\br] _\bf_\bo_\br_\bm_\ba_\bt [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
- Write the formatted _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs to the standard output under the
- control of the _\bf_\bo_\br_\bm_\ba_\bt. The -\b-v\bv option assigns the output to the
+ Write the formatted _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs to the standard output under the
+ control of the _\bf_\bo_\br_\bm_\ba_\bt. The -\b-v\bv option assigns the output to the
variable _\bv_\ba_\br rather than printing it to the standard output.
- The _\bf_\bo_\br_\bm_\ba_\bt is a character string which contains three types of
- objects: plain characters, which are simply copied to standard
- output, character escape sequences, which are converted and
- copied to the standard output, and format specifications, each
- of which causes printing of the next successive _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt. In
- addition to the standard _\bp_\br_\bi_\bn_\bt_\bf(3) format characters c\bcC\bCs\bsS\bS-\b-
+ The _\bf_\bo_\br_\bm_\ba_\bt is a character string which contains three types of
+ objects: plain characters, which are simply copied to standard
+ output, character escape sequences, which are converted and
+ copied to the standard output, and format specifications, each
+ of which causes printing of the next successive _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt. In
+ addition to the standard _\bp_\br_\bi_\bn_\bt_\bf(3) format characters c\bcC\bCs\bsS\bS-\b-
n\bnd\bdi\bio\bou\bux\bxX\bXe\beE\bEf\bfF\bFg\bgG\bGa\baA\bA, p\bpr\bri\bin\bnt\btf\bf interprets the following additional for-
mat specifiers:
%\b%b\bb causes p\bpr\bri\bin\bnt\btf\bf to expand backslash escape sequences in the
corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt in the same way as e\bec\bch\bho\bo -\b-e\be.
- %\b%q\bq causes p\bpr\bri\bin\bnt\btf\bf to output the corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt in a
- format that can be reused as shell input. %\b%q\bq and %\b%Q\bQ use
- the $\b$'\b''\b' quoting style if any characters in the argument
- string require it, and backslash quoting otherwise. If
- the format string uses the _\bp_\br_\bi_\bn_\bt_\bf alternate form, these
+ %\b%q\bq causes p\bpr\bri\bin\bnt\btf\bf to output the corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt in a
+ format that can be reused as shell input. %\b%q\bq and %\b%Q\bQ use
+ the $\b$'\b''\b' quoting style if any characters in the argument
+ string require it, and backslash quoting otherwise. If
+ the format string uses the _\bp_\br_\bi_\bn_\bt_\bf alternate form, these
two formats quote the argument string using single
quotes.
- %\b%Q\bQ like %\b%q\bq, but applies any supplied precision to the _\ba_\br_\bg_\bu_\b-
+ %\b%Q\bQ like %\b%q\bq, but applies any supplied precision to the _\ba_\br_\bg_\bu_\b-
_\bm_\be_\bn_\bt before quoting it.
%\b%(\b(_\bd_\ba_\bt_\be_\bf_\bm_\bt)\b)T\bT
- causes p\bpr\bri\bin\bnt\btf\bf to output the date-time string resulting
- from using _\bd_\ba_\bt_\be_\bf_\bm_\bt as a format string for _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3).
+ causes p\bpr\bri\bin\bnt\btf\bf to output the date-time string resulting
+ from using _\bd_\ba_\bt_\be_\bf_\bm_\bt as a format string for _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3).
The corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt is an integer representing the
number of seconds since the epoch. This format specifier
recognizes two special argument values: -1 represents the
- current time, and -2 represents the time the shell was
+ current time, and -2 represents the time the shell was
invoked. If no argument is specified, conversion behaves
- as if -1 had been supplied. This is an exception to the
+ as if -1 had been supplied. This is an exception to the
usual p\bpr\bri\bin\bnt\btf\bf behavior.
The %b, %q, and %T format specifiers all use the field width and
precision arguments from the format specification and write that
- many bytes from (or use that wide a field for) the expanded ar-
- gument, which usually contains more characters than the origi-
+ many bytes from (or use that wide a field for) the expanded ar-
+ gument, which usually contains more characters than the origi-
nal.
The %n format specifier accepts a corresponding argument that is
treated as a shell variable name.
- The %s and %c format specifiers accept an l (long) modifier,
+ The %s and %c format specifiers accept an l (long) modifier,
which forces them to convert the argument string to a wide-char-
acter string and apply any supplied field width and precision in
terms of characters, not bytes. The %S and %C format specifiers
are equivalent to %ls and %lc, respectively.
- Arguments to non-string format specifiers are treated as C con-
+ Arguments to non-string format specifiers are treated as C con-
stants, except that a leading plus or minus sign is allowed, and
- if the leading character is a single or double quote, the value
- is the numeric value of the following character, using the cur-
+ if the leading character is a single or double quote, the value
+ is the numeric value of the following character, using the cur-
rent locale.
- The _\bf_\bo_\br_\bm_\ba_\bt is reused as necessary to consume all of the _\ba_\br_\bg_\bu_\b-
+ The _\bf_\bo_\br_\bm_\ba_\bt is reused as necessary to consume all of the _\ba_\br_\bg_\bu_\b-
_\bm_\be_\bn_\bt_\bs. If the _\bf_\bo_\br_\bm_\ba_\bt requires more _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs than are supplied,
- the extra format specifications behave as if a zero value or
- null string, as appropriate, had been supplied. The return
- value is zero on success, non-zero if an invalid option is sup-
+ the extra format specifications behave as if a zero value or
+ null string, as appropriate, had been supplied. The return
+ value is zero on success, non-zero if an invalid option is sup-
plied or a write or assignment error occurs.
p\bpu\bus\bsh\bhd\bd [-\b-n\bn] [+_\bn] [-_\bn]
p\bpu\bus\bsh\bhd\bd [-\b-n\bn] [_\bd_\bi_\br]
Add a directory to the top of the directory stack, or rotate the
- stack, making the new top of the stack the current working di-
- rectory. With no arguments, p\bpu\bus\bsh\bhd\bd exchanges the top two ele-
- ments of the directory stack. Arguments, if supplied, have the
+ stack, making the new top of the stack the current working di-
+ rectory. With no arguments, p\bpu\bus\bsh\bhd\bd exchanges the top two ele-
+ ments of the directory stack. Arguments, if supplied, have the
following meanings:
- -\b-n\bn Suppress the normal change of directory when rotating or
- adding directories to the stack, only manipulate the
+ -\b-n\bn Suppress the normal change of directory when rotating or
+ adding directories to the stack, only manipulate the
stack.
+\b+_\bn Rotate the stack so that the _\bnth directory (counting from
- the left of the list shown by d\bdi\bir\brs\bs, starting with zero)
+ the left of the list shown by d\bdi\bir\brs\bs, starting with zero)
is at the top.
- -\b-_\bn Rotates the stack so that the _\bnth directory (counting
- from the right of the list shown by d\bdi\bir\brs\bs, starting with
+ -\b-_\bn Rotates the stack so that the _\bnth directory (counting
+ from the right of the list shown by d\bdi\bir\brs\bs, starting with
zero) is at the top.
_\bd_\bi_\br Adds _\bd_\bi_\br to the directory stack at the top.
After the stack has been modified, if the -\b-n\bn option was not sup-
- plied, p\bpu\bus\bsh\bhd\bd uses the c\bcd\bd builtin to change to the directory at
+ plied, p\bpu\bus\bsh\bhd\bd uses the c\bcd\bd builtin to change to the directory at
the top of the stack. If the c\bcd\bd fails, p\bpu\bus\bsh\bhd\bd returns a non-zero
value.
- Otherwise, if no arguments are supplied, p\bpu\bus\bsh\bhd\bd returns zero un-
- less the directory stack is empty. When rotating the directory
+ Otherwise, if no arguments are supplied, p\bpu\bus\bsh\bhd\bd returns zero un-
+ less the directory stack is empty. When rotating the directory
stack, p\bpu\bus\bsh\bhd\bd returns zero unless the directory stack is empty or
_\bn specifies a non-existent directory stack element.
- If the p\bpu\bus\bsh\bhd\bd command is successful, b\bba\bas\bsh\bh runs d\bdi\bir\brs\bs to show the
+ If the p\bpu\bus\bsh\bhd\bd command is successful, b\bba\bas\bsh\bh runs d\bdi\bir\brs\bs to show the
final contents of the directory stack.
p\bpw\bwd\bd [-\b-L\bLP\bP]
- Print the absolute pathname of the current working directory.
+ Print the absolute pathname of the current working directory.
The pathname printed contains no symbolic links if the -\b-P\bP option
is supplied or the -\b-o\bo p\bph\bhy\bys\bsi\bic\bca\bal\bl option to the s\bse\bet\bt builtin command
- is enabled. If the -\b-L\bL option is used, the pathname printed may
- contain symbolic links. The return status is 0 unless an error
+ is enabled. If the -\b-L\bL option is used, the pathname printed may
+ contain symbolic links. The return status is 0 unless an error
occurs while reading the name of the current directory or an in-
valid option is supplied.
r\bre\bea\bad\bd [-\b-E\bEe\ber\brs\bs] [-\b-a\ba _\ba_\bn_\ba_\bm_\be] [-\b-d\bd _\bd_\be_\bl_\bi_\bm] [-\b-i\bi _\bt_\be_\bx_\bt] [-\b-n\bn _\bn_\bc_\bh_\ba_\br_\bs] [-\b-N\bN _\bn_\bc_\bh_\ba_\br_\bs]
[-\b-p\bp _\bp_\br_\bo_\bm_\bp_\bt] [-\b-t\bt _\bt_\bi_\bm_\be_\bo_\bu_\bt] [-\b-u\bu _\bf_\bd] [_\bn_\ba_\bm_\be ...]
Read one line from the standard input, or from the file descrip-
- tor _\bf_\bd supplied as an argument to the -\b-u\bu option, split it into
- words as described above under W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg, and assign the
- first word to the first _\bn_\ba_\bm_\be, the second word to the second
- _\bn_\ba_\bm_\be, and so on. If there are more words than names, the re-
- maining words and their intervening delimiters are assigned to
- the last _\bn_\ba_\bm_\be. If there are fewer words read from the input
- stream than names, the remaining names are assigned empty val-
- ues. The characters in the value of the I\bIF\bFS\bS variable are used
+ tor _\bf_\bd supplied as an argument to the -\b-u\bu option, split it into
+ words as described above under W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg, and assign the
+ first word to the first _\bn_\ba_\bm_\be, the second word to the second
+ _\bn_\ba_\bm_\be, and so on. If there are more words than names, the re-
+ maining words and their intervening delimiters are assigned to
+ the last _\bn_\ba_\bm_\be. If there are fewer words read from the input
+ stream than names, the remaining names are assigned empty val-
+ ues. The characters in the value of the I\bIF\bFS\bS variable are used
to split the line into words using the same rules the shell uses
for expansion (described above under W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg). The back-
- slash character (\\b\) removes any special meaning for the next
+ slash character (\\b\) removes any special meaning for the next
character read and is used for line continuation.
Options, if supplied, have the following meanings:
-\b-a\ba _\ba_\bn_\ba_\bm_\be
The words are assigned to sequential indices of the array
variable _\ba_\bn_\ba_\bm_\be, starting at 0. _\ba_\bn_\ba_\bm_\be is unset before any
- new values are assigned. Other _\bn_\ba_\bm_\be arguments are ig-
+ new values are assigned. Other _\bn_\ba_\bm_\be arguments are ig-
nored.
-\b-d\bd _\bd_\be_\bl_\bi_\bm
- The first character of _\bd_\be_\bl_\bi_\bm terminates the input line,
- rather than newline. If _\bd_\be_\bl_\bi_\bm is the empty string, r\bre\bea\bad\bd
+ The first character of _\bd_\be_\bl_\bi_\bm terminates the input line,
+ rather than newline. If _\bd_\be_\bl_\bi_\bm is the empty string, r\bre\bea\bad\bd
will terminate a line when it reads a NUL character.
- -\b-e\be If the standard input is coming from a terminal, r\bre\bea\bad\bd
- uses r\bre\bea\bad\bdl\bli\bin\bne\be (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE above) to obtain the line.
- R\bRe\bea\bad\bdl\bli\bin\bne\be uses the current (or default, if line editing
- was not previously active) editing settings, but uses
+ -\b-e\be If the standard input is coming from a terminal, r\bre\bea\bad\bd
+ uses r\bre\bea\bad\bdl\bli\bin\bne\be (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE above) to obtain the line.
+ R\bRe\bea\bad\bdl\bli\bin\bne\be uses the current (or default, if line editing
+ was not previously active) editing settings, but uses
r\bre\bea\bad\bdl\bli\bin\bne\be's default filename completion.
- -\b-E\bE If the standard input is coming from a terminal, r\bre\bea\bad\bd
- uses r\bre\bea\bad\bdl\bli\bin\bne\be (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE above) to obtain the line.
- R\bRe\bea\bad\bdl\bli\bin\bne\be uses the current (or default, if line editing
- was not previously active) editing settings, but uses
+ -\b-E\bE If the standard input is coming from a terminal, r\bre\bea\bad\bd
+ uses r\bre\bea\bad\bdl\bli\bin\bne\be (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE above) to obtain the line.
+ R\bRe\bea\bad\bdl\bli\bin\bne\be uses the current (or default, if line editing
+ was not previously active) editing settings, but uses
bash's default completion, including programmable comple-
tion.
-\b-i\bi _\bt_\be_\bx_\bt
- If r\bre\bea\bad\bdl\bli\bin\bne\be is being used to read the line, r\bre\bea\bad\bd places
+ If r\bre\bea\bad\bdl\bli\bin\bne\be is being used to read the line, r\bre\bea\bad\bd places
_\bt_\be_\bx_\bt into the editing buffer before editing begins.
-\b-n\bn _\bn_\bc_\bh_\ba_\br_\bs
- r\bre\bea\bad\bd returns after reading _\bn_\bc_\bh_\ba_\br_\bs characters rather than
- waiting for a complete line of input, unless it encoun-
- ters EOF or r\bre\bea\bad\bd times out, but honors a delimiter if it
+ r\bre\bea\bad\bd returns after reading _\bn_\bc_\bh_\ba_\br_\bs characters rather than
+ waiting for a complete line of input, unless it encoun-
+ ters EOF or r\bre\bea\bad\bd times out, but honors a delimiter if it
reads fewer than _\bn_\bc_\bh_\ba_\br_\bs characters before the delimiter.
-\b-N\bN _\bn_\bc_\bh_\ba_\br_\bs
- r\bre\bea\bad\bd returns after reading exactly _\bn_\bc_\bh_\ba_\br_\bs characters
- rather than waiting for a complete line of input, unless
+ r\bre\bea\bad\bd returns after reading exactly _\bn_\bc_\bh_\ba_\br_\bs characters
+ rather than waiting for a complete line of input, unless
it encounters EOF or r\bre\bea\bad\bd times out. Any delimiter char-
- acters in the input are not treated specially and do not
+ acters in the input are not treated specially and do not
cause r\bre\bea\bad\bd to return until it has read _\bn_\bc_\bh_\ba_\br_\bs characters.
The result is not split on the characters in I\bIF\bFS\bS; the in-
tent is that the variable is assigned exactly the charac-
- ters read (with the exception of backslash; see the -\b-r\br
+ ters read (with the exception of backslash; see the -\b-r\br
option below).
-\b-p\bp _\bp_\br_\bo_\bm_\bp_\bt
Display _\bp_\br_\bo_\bm_\bp_\bt on standard error, without a trailing new-
- line, before attempting to read any input, but only if
+ line, before attempting to read any input, but only if
input is coming from a terminal.
-\b-r\br Backslash does not act as an escape character. The back-
- slash is considered to be part of the line. In particu-
- lar, a backslash-newline pair may not then be used as a
+ slash is considered to be part of the line. In particu-
+ lar, a backslash-newline pair may not then be used as a
line continuation.
-\b-s\bs Silent mode. If input is coming from a terminal, charac-
ters are not echoed.
-\b-t\bt _\bt_\bi_\bm_\be_\bo_\bu_\bt
- Cause r\bre\bea\bad\bd to time out and return failure if it does not
- read a complete line of input (or a specified number of
- characters) within _\bt_\bi_\bm_\be_\bo_\bu_\bt seconds. _\bt_\bi_\bm_\be_\bo_\bu_\bt may be a
- decimal number with a fractional portion following the
- decimal point. This option is only effective if r\bre\bea\bad\bd is
- reading input from a terminal, pipe, or other special
- file; it has no effect when reading from regular files.
- If r\bre\bea\bad\bd times out, it saves any partial input read into
- the specified variable _\bn_\ba_\bm_\be, and the exit status is
- greater than 128. If _\bt_\bi_\bm_\be_\bo_\bu_\bt is 0, r\bre\bea\bad\bd returns immedi-
- ately, without trying to read any data. In this case,
- the exit status is 0 if input is available on the speci-
- fied file descriptor, or the read will return EOF, non-
+ Cause r\bre\bea\bad\bd to time out and return failure if it does not
+ read a complete line of input (or a specified number of
+ characters) within _\bt_\bi_\bm_\be_\bo_\bu_\bt seconds. _\bt_\bi_\bm_\be_\bo_\bu_\bt may be a
+ decimal number with a fractional portion following the
+ decimal point. This option is only effective if r\bre\bea\bad\bd is
+ reading input from a terminal, pipe, or other special
+ file; it has no effect when reading from regular files.
+ If r\bre\bea\bad\bd times out, it saves any partial input read into
+ the specified variable _\bn_\ba_\bm_\be, and the exit status is
+ greater than 128. If _\bt_\bi_\bm_\be_\bo_\bu_\bt is 0, r\bre\bea\bad\bd returns immedi-
+ ately, without trying to read any data. In this case,
+ the exit status is 0 if input is available on the speci-
+ fied file descriptor, or the read will return EOF, non-
zero otherwise.
- -\b-u\bu _\bf_\bd Read input from file descriptor _\bf_\bd instead of the stan-
+ -\b-u\bu _\bf_\bd Read input from file descriptor _\bf_\bd instead of the stan-
dard input.
- Other than the case where _\bd_\be_\bl_\bi_\bm is the empty string, r\bre\bea\bad\bd ig-
+ Other than the case where _\bd_\be_\bl_\bi_\bm is the empty string, r\bre\bea\bad\bd ig-
nores any NUL characters in the input.
- If no _\bn_\ba_\bm_\be_\bs are supplied, r\bre\bea\bad\bd assigns the line read, without
- the ending delimiter but otherwise unmodified, to the variable
+ If no _\bn_\ba_\bm_\be_\bs are supplied, r\bre\bea\bad\bd assigns the line read, without
+ the ending delimiter but otherwise unmodified, to the variable
R\bRE\bEP\bPL\bLY\bY.
The exit status is zero, unless end-of-file is encountered, r\bre\bea\bad\bd
- times out (in which case the status is greater than 128), a
+ times out (in which case the status is greater than 128), a
variable assignment error (such as assigning to a readonly vari-
- able) occurs, or an invalid file descriptor is supplied as the
+ able) occurs, or an invalid file descriptor is supplied as the
argument to -\b-u\bu.
r\bre\bea\bad\bdo\bon\bnl\bly\by [-\b-a\baA\bAf\bf] [-\b-p\bp] [_\bn_\ba_\bm_\be[=_\bw_\bo_\br_\bd] ...]
- The given _\bn_\ba_\bm_\be_\bs are marked readonly; the values of these _\bn_\ba_\bm_\be_\bs
+ The given _\bn_\ba_\bm_\be_\bs are marked readonly; the values of these _\bn_\ba_\bm_\be_\bs
may not be changed by subsequent assignment or unset. If the -\b-f\bf
- option is supplied, each _\bn_\ba_\bm_\be refers to a shell function. The
- -\b-a\ba option restricts the variables to indexed arrays; the -\b-A\bA op-
+ option is supplied, each _\bn_\ba_\bm_\be refers to a shell function. The
+ -\b-a\ba option restricts the variables to indexed arrays; the -\b-A\bA op-
tion restricts the variables to associative arrays. If both op-
- tions are supplied, -\b-A\bA takes precedence. If no _\bn_\ba_\bm_\be arguments
- are supplied, or if the -\b-p\bp option is supplied, print a list of
- all readonly names. The other options may be used to restrict
+ tions are supplied, -\b-A\bA takes precedence. If no _\bn_\ba_\bm_\be arguments
+ are supplied, or if the -\b-p\bp option is supplied, print a list of
+ all readonly names. The other options may be used to restrict
the output to a subset of the set of readonly names. The -\b-p\bp op-
tion displays output in a format that may be reused as input.
- r\bre\bea\bad\bdo\bon\bnl\bly\by allows the value of a variable to be set at the same
+ r\bre\bea\bad\bdo\bon\bnl\bly\by allows the value of a variable to be set at the same
time the readonly attribute is changed by following the variable
- name with =_\bv_\ba_\bl_\bu_\be. This sets the value of the variable is to
+ name with =_\bv_\ba_\bl_\bu_\be. This sets the value of the variable is to
_\bv_\ba_\bl_\bu_\be while modifying the readonly attribute.
- The return status is 0 unless an invalid option is encountered,
- one of the _\bn_\ba_\bm_\be_\bs is not a valid shell variable name, or -\b-f\bf is
+ The return status is 0 unless an invalid option is encountered,
+ one of the _\bn_\ba_\bm_\be_\bs is not a valid shell variable name, or -\b-f\bf is
supplied with a _\bn_\ba_\bm_\be that is not a function.
r\bre\bet\btu\bur\brn\bn [_\bn]
- Stop executing a shell function or sourced file and return the
+ Stop executing a shell function or sourced file and return the
value specified by _\bn to its caller. If _\bn is omitted, the return
- status is that of the last command executed. If r\bre\bet\btu\bur\brn\bn is exe-
- cuted by a trap handler, the last command used to determine the
+ status is that of the last command executed. If r\bre\bet\btu\bur\brn\bn is exe-
+ cuted by a trap handler, the last command used to determine the
status is the last command executed before the trap handler. If
r\bre\bet\btu\bur\brn\bn is executed during a D\bDE\bEB\bBU\bUG\bG trap, the last command used to
- determine the status is the last command executed by the trap
+ determine the status is the last command executed by the trap
handler before r\bre\bet\btu\bur\brn\bn was invoked.
When r\bre\bet\btu\bur\brn\bn is used to terminate execution of a script being ex-
- ecuted by the .\b. (s\bso\bou\bur\brc\bce\be) command, it causes the shell to stop
- executing that script and return either _\bn or the exit status of
- the last command executed within the script as the exit status
- of the script. If _\bn is supplied, the return value is its least
+ ecuted by the .\b. (s\bso\bou\bur\brc\bce\be) command, it causes the shell to stop
+ executing that script and return either _\bn or the exit status of
+ the last command executed within the script as the exit status
+ of the script. If _\bn is supplied, the return value is its least
significant 8 bits.
- Any command associated with the R\bRE\bET\bTU\bUR\bRN\bN trap is executed before
+ Any command associated with the R\bRE\bET\bTU\bUR\bRN\bN trap is executed before
execution resumes after the function or script.
- The return status is non-zero if r\bre\bet\btu\bur\brn\bn is supplied a non-nu-
+ The return status is non-zero if r\bre\bet\btu\bur\brn\bn is supplied a non-nu-
meric argument, or is used outside a function and not during ex-
ecution of a script by .\b. or s\bso\bou\bur\brc\bce\be.
s\bse\bet\bt [-\b-a\bab\bbe\bef\bfh\bhk\bkm\bmn\bnp\bpt\btu\buv\bvx\bxB\bBC\bCE\bEH\bHP\bPT\bT] [-\b-o\bo _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be] [-\b--\b-] [-\b-] [_\ba_\br_\bg ...]
s\bse\bet\bt [+\b+a\bab\bbe\bef\bfh\bhk\bkm\bmn\bnp\bpt\btu\buv\bvx\bxB\bBC\bCE\bEH\bHP\bPT\bT] [+\b+o\bo _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be] [-\b--\b-] [-\b-] [_\ba_\br_\bg ...]
s\bse\bet\bt -\b-o\bo
- s\bse\bet\bt +\b+o\bo Without options, display the name and value of each shell vari-
- able in a format that can be reused as input for setting or re-
+ s\bse\bet\bt +\b+o\bo Without options, display the name and value of each shell vari-
+ able in a format that can be reused as input for setting or re-
setting the currently-set variables. Read-only variables cannot
- be reset. In posix mode, 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 argu-
- ments remaining after option processing are treated as values
+ be reset. In posix mode, 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 argu-
+ ments remaining after option processing are treated as values
for the positional parameters and are assigned, in order, to $\b$1\b1,
- $\b$2\b2, ..., $\b$_\bn. Options, if specified, have the following mean-
+ $\b$2\b2, ..., $\b$_\bn. Options, if specified, have the following mean-
ings:
-\b-a\ba Each variable or function that is created or modified is
- given the export attribute and marked for export to the
+ given the export attribute and marked for export to the
environment of subsequent commands.
- -\b-b\bb Report the status of terminated background jobs immedi-
+ -\b-b\bb Report the status of terminated background jobs immedi-
ately, rather than before the next primary prompt or af-
- ter a foreground command terminates. This is effective
+ ter a foreground command terminates. This is effective
only when job control is enabled.
- -\b-e\be Exit immediately if a _\bp_\bi_\bp_\be_\bl_\bi_\bn_\be (which may consist of a
- single _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd), a _\bl_\bi_\bs_\bt, or a _\bc_\bo_\bm_\bp_\bo_\bu_\bn_\bd _\bc_\bo_\bm_\bm_\ba_\bn_\bd
+ -\b-e\be Exit immediately if a _\bp_\bi_\bp_\be_\bl_\bi_\bn_\be (which may consist of a
+ single _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd), a _\bl_\bi_\bs_\bt, or a _\bc_\bo_\bm_\bp_\bo_\bu_\bn_\bd _\bc_\bo_\bm_\bm_\ba_\bn_\bd
(see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR above), exits with a non-zero status.
- The shell does not exit if the command that fails is
- part of the command list immediately following a w\bwh\bhi\bil\ble\be
- or u\bun\bnt\bti\bil\bl reserved word, part of the test following the
- i\bif\bf or e\bel\bli\bif\bf reserved words, part of any command executed
- in a &\b&&\b& or |\b||\b| list except the command following the fi-
- nal &\b&&\b& or |\b||\b|, any command in a pipeline but the last
- (subject to the state of the p\bpi\bip\bpe\bef\bfa\bai\bil\bl shell option), or
- if the command's return value is being inverted with !\b!.
- If a compound command other than a subshell returns a
- non-zero status because a command failed while -\b-e\be was
- being ignored, the shell does not exit. A trap on E\bER\bRR\bR,
+ The shell does not exit if the command that fails is
+ part of the command list immediately following a w\bwh\bhi\bil\ble\be
+ or u\bun\bnt\bti\bil\bl reserved word, part of the test following the
+ i\bif\bf or e\bel\bli\bif\bf reserved words, part of any command executed
+ in a &\b&&\b& or |\b||\b| list except the command following the fi-
+ nal &\b&&\b& or |\b||\b|, any command in a pipeline but the last
+ (subject to the state of the p\bpi\bip\bpe\bef\bfa\bai\bil\bl shell option), or
+ if the command's return value is being inverted with !\b!.
+ If a compound command other than a subshell returns a
+ non-zero status because a command failed while -\b-e\be was
+ being ignored, the shell does not exit. A trap on E\bER\bRR\bR,
if set, is executed before the shell exits. This option
applies to the shell environment and each subshell envi-
- ronment separately (see C\bCO\bOM\bMM\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
+ ronment separately (see C\bCO\bOM\bMM\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
above), and may cause subshells to exit before executing
all the commands in the subshell.
- If a compound command or shell function executes in a
- context where -\b-e\be is being ignored, none of the commands
- executed within the compound command or function body
- will be affected by the -\b-e\be setting, even if -\b-e\be is set
- and a command returns a failure status. If a compound
- command or shell function sets -\b-e\be while executing in a
- context where -\b-e\be is ignored, that setting will not have
- any effect until the compound command or the command
+ If a compound command or shell function executes in a
+ context where -\b-e\be is being ignored, none of the commands
+ executed within the compound command or function body
+ will be affected by the -\b-e\be setting, even if -\b-e\be is set
+ and a command returns a failure status. If a compound
+ command or shell function sets -\b-e\be while executing in a
+ context where -\b-e\be is ignored, that setting will not have
+ any effect until the compound command or the command
containing the function call completes.
-\b-f\bf Disable pathname expansion.
- -\b-h\bh Remember the location of commands as they are looked up
+ -\b-h\bh Remember the location of commands as they are looked up
for execution. This is enabled by default.
- -\b-k\bk All arguments in the form of assignment statements are
- placed in the environment for a command, not just those
+ -\b-k\bk All arguments in the form of assignment statements are
+ placed in the environment for a command, not just those
that precede the command name.
- -\b-m\bm Monitor mode. Job control is enabled. This option is
- on by default for interactive shells on systems that
- support it (see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL above). All processes run
+ -\b-m\bm Monitor mode. Job control is enabled. This option is
+ on by default for interactive shells on systems that
+ support it (see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL above). All processes run
in a separate process group. When a background job com-
pletes, the shell prints a line containing its exit sta-
tus.
-\b-n\bn Read commands but do not execute them. This may be used
- to check a shell script for syntax errors. This is ig-
+ to check a shell script for syntax errors. This is ig-
nored by interactive shells.
-\b-o\bo _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be
The _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be can be one of the following:
Same as -\b-a\ba.
b\bbr\bra\bac\bce\bee\bex\bxp\bpa\ban\bnd\bd
Same as -\b-B\bB.
- e\bem\bma\bac\bcs\bs Use an emacs-style command line editing inter-
+ e\bem\bma\bac\bcs\bs Use an emacs-style command line editing inter-
face. This is enabled by default when the shell
is interactive, unless the shell is started with
- the -\b--\b-n\bno\boe\bed\bdi\bit\bti\bin\bng\bg option. This also affects the
+ the -\b--\b-n\bno\boe\bed\bdi\bit\bti\bin\bng\bg option. This also affects the
editing interface used for r\bre\bea\bad\bd -\b-e\be.
e\ber\brr\bre\bex\bxi\bit\bt Same as -\b-e\be.
e\ber\brr\brt\btr\bra\bac\bce\be
H\bHI\bIS\bST\bTO\bOR\bRY\bY. This option is on by default in inter-
active shells.
i\big\bgn\bno\bor\bre\bee\beo\bof\bf
- The effect is as if the shell command
+ The effect is as if the shell command
"IGNOREEOF=10" had been executed (see S\bSh\bhe\bel\bll\bl
V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs above).
k\bke\bey\byw\bwo\bor\brd\bd Same as -\b-k\bk.
p\bph\bhy\bys\bsi\bic\bca\bal\bl
Same as -\b-P\bP.
p\bpi\bip\bpe\bef\bfa\bai\bil\bl
- If set, the return value of a pipeline is the
- value of the last (rightmost) command to exit
- with a non-zero status, or zero if all commands
- in the pipeline exit successfully. This option
+ If set, the return value of a pipeline is the
+ value of the last (rightmost) command to exit
+ with a non-zero status, or zero if all commands
+ in the pipeline exit successfully. This option
is disabled by default.
- p\bpo\bos\bsi\bix\bx Enable posix mode; change the behavior of b\bba\bas\bsh\bh
- where the default operation differs from the
- POSIX standard to match the standard. See S\bSE\bEE\bE
- A\bAL\bLS\bSO\bO below for a reference to a document that
+ p\bpo\bos\bsi\bix\bx Enable posix mode; change the behavior of b\bba\bas\bsh\bh
+ where the default operation differs from the
+ POSIX standard to match the standard. See S\bSE\bEE\bE
+ A\bAL\bLS\bSO\bO below for a reference to a document that
details how posix mode affects bash's behavior.
p\bpr\bri\biv\bvi\bil\ble\beg\bge\bed\bd
Same as -\b-p\bp.
v\bve\ber\brb\bbo\bos\bse\be Same as -\b-v\bv.
- v\bvi\bi Use a vi-style command line editing interface.
+ v\bvi\bi Use a vi-style command line editing interface.
This also affects the editing interface used for
r\bre\bea\bad\bd -\b-e\be.
x\bxt\btr\bra\bac\bce\be Same as -\b-x\bx.
- If -\b-o\bo is supplied with no _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be, s\bse\bet\bt prints the
- current shell option settings. If +\b+o\bo is supplied with
- no _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be, s\bse\bet\bt prints a series of s\bse\bet\bt commands to
- recreate the current option settings on the standard
+ If -\b-o\bo is supplied with no _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be, s\bse\bet\bt prints the
+ current shell option settings. If +\b+o\bo is supplied with
+ no _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be, s\bse\bet\bt prints a series of s\bse\bet\bt commands to
+ recreate the current option settings on the standard
output.
- -\b-p\bp Turn on _\bp_\br_\bi_\bv_\bi_\bl_\be_\bg_\be_\bd mode. In this mode, the shell does
- not read the $\b$E\bEN\bNV\bV and $\b$B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV files, shell functions
- are not inherited from the environment, and the S\bSH\bHE\bEL\bL-\b-
- L\bLO\bOP\bPT\bTS\bS, B\bBA\bAS\bSH\bHO\bOP\bPT\bTS\bS, C\bCD\bDP\bPA\bAT\bTH\bH, and G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE variables, if
- they appear in the environment, are ignored. If the
- shell is started with the effective user (group) id not
- equal to the real user (group) id, and the -\b-p\bp option is
- not supplied, these actions are taken and the effective
+ -\b-p\bp Turn on _\bp_\br_\bi_\bv_\bi_\bl_\be_\bg_\be_\bd mode. In this mode, the shell does
+ not read the $\b$E\bEN\bNV\bV and $\b$B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV files, shell functions
+ are not inherited from the environment, and the S\bSH\bHE\bEL\bL-\b-
+ L\bLO\bOP\bPT\bTS\bS, B\bBA\bAS\bSH\bHO\bOP\bPT\bTS\bS, C\bCD\bDP\bPA\bAT\bTH\bH, and G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE variables, if
+ they appear in the environment, are ignored. If the
+ shell is started with the effective user (group) id not
+ equal to the real user (group) id, and the -\b-p\bp option is
+ not supplied, these actions are taken and the effective
user id is set to the real user id. If the -\b-p\bp option is
supplied at startup, the effective user id is not reset.
- Turning this option off causes the effective user and
+ Turning this option off causes the effective user and
group ids to be set to the real user and group ids.
-\b-r\br Enable restricted shell mode. This option cannot be un-
set once it has been set.
-\b-t\bt Exit after reading and executing one command.
-\b-u\bu Treat unset variables and parameters other than the spe-
- cial parameters "@" and "*", or array variables sub-
- scripted with "@" or "*", as an error when performing
- parameter expansion. If expansion is attempted on an
- unset variable or parameter, the shell prints an error
- message, and, if not interactive, exits with a non-zero
+ cial parameters "@" and "*", or array variables sub-
+ scripted with "@" or "*", as an error when performing
+ parameter expansion. If expansion is attempted on an
+ unset variable or parameter, the shell prints an error
+ message, and, if not interactive, exits with a non-zero
status.
-\b-v\bv Print shell input lines as they are read.
- -\b-x\bx After expanding each _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd, f\bfo\bor\br command, c\bca\bas\bse\be
+ -\b-x\bx After expanding each _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd, f\bfo\bor\br command, c\bca\bas\bse\be
command, s\bse\bel\ble\bec\bct\bt command, or arithmetic f\bfo\bor\br command, dis-
- play the expanded value of P\bPS\bS4\b4, followed by the command
- and its expanded arguments or associated word list, to
+ play the expanded value of P\bPS\bS4\b4, followed by the command
+ and its expanded arguments or associated word list, to
the standard error.
- -\b-B\bB The shell performs brace expansion (see B\bBr\bra\bac\bce\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
+ -\b-B\bB The shell performs brace expansion (see B\bBr\bra\bac\bce\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
above). This is on by default.
- -\b-C\bC If set, b\bba\bas\bsh\bh does not overwrite an existing file with
- the >\b>, >\b>&\b&, and <\b<>\b> redirection operators. Using the
- redirection operator >\b>|\b| instead of >\b> will override this
+ -\b-C\bC If set, b\bba\bas\bsh\bh does not overwrite an existing file with
+ the >\b>, >\b>&\b&, and <\b<>\b> redirection operators. Using the
+ redirection operator >\b>|\b| instead of >\b> will override this
and force the creation of an output file.
-\b-E\bE If set, any trap on E\bER\bRR\bR is inherited by shell functions,
- command substitutions, and commands executed in a sub-
- shell environment. The E\bER\bRR\bR trap is normally not inher-
+ command substitutions, and commands executed in a sub-
+ shell environment. The E\bER\bRR\bR trap is normally not inher-
ited in such cases.
-\b-H\bH Enable !\b! style history substitution. This option is on
by default when the shell is interactive.
- -\b-P\bP If set, the shell does not resolve symbolic links when
- executing commands such as c\bcd\bd that change the current
+ -\b-P\bP If set, the shell does not resolve symbolic links when
+ executing commands such as c\bcd\bd that change the current
working directory. It uses the physical directory
structure instead. By default, b\bba\bas\bsh\bh follows the logical
- chain of directories when performing commands which
+ chain of directories when performing commands which
change the current directory.
- -\b-T\bT If set, any traps on D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN are inherited by
+ -\b-T\bT If set, any traps on D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN are inherited by
shell functions, command substitutions, and commands ex-
- ecuted in a subshell environment. The D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN
+ ecuted in a subshell environment. The D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN
traps are normally not inherited in such cases.
-\b--\b- If no arguments follow this option, unset the positional
parameters. Otherwise, set the positional parameters to
the _\ba_\br_\bgs, even if some of them begin with a -\b-.
-\b- Signal the end of options, and assign all remaining _\ba_\br_\bgs
to the positional parameters. The -\b-x\bx and -\b-v\bv options are
- turned off. If there are no _\ba_\br_\bgs, the positional para-
+ turned off. If there are no _\ba_\br_\bgs, the positional para-
meters remain unchanged.
- The options are off by default unless otherwise noted. Using +
- rather than - causes these options to be turned off. The op-
+ The options are off by default unless otherwise noted. Using +
+ rather than - causes these options to be turned off. The op-
tions can also be specified as arguments to an invocation of the
- shell. The current set of options may be found in $\b$-\b-. The re-
- turn status is always zero unless an invalid option is encoun-
+ shell. The current set of options may be found in $\b$-\b-. The re-
+ turn status is always zero unless an invalid option is encoun-
tered.
s\bsh\bhi\bif\bft\bt [_\bn]
Rename positional parameters from _\bn+1 ... to $\b$1\b1 .\b..\b..\b..\b. Parameters
- represented by the numbers $\b$#\b# down to $\b$#\b#-_\bn+1 are unset. _\bn must
- be a non-negative number less than or equal to $\b$#\b#. If _\bn is 0,
- no parameters are changed. If _\bn is not given, it is assumed to
- be 1. If _\bn is greater than $\b$#\b#, the positional parameters are
- not changed. The return status is greater than zero if _\bn is
+ represented by the numbers $\b$#\b# down to $\b$#\b#-_\bn+1 are unset. _\bn must
+ be a non-negative number less than or equal to $\b$#\b#. If _\bn is 0,
+ no parameters are changed. If _\bn is not given, it is assumed to
+ be 1. If _\bn is greater than $\b$#\b#, the positional parameters are
+ not changed. The return status is greater than zero if _\bn is
greater than $\b$#\b# or less than zero; otherwise 0.
s\bsh\bho\bop\bpt\bt [-\b-p\bpq\bqs\bsu\bu] [-\b-o\bo] [_\bo_\bp_\bt_\bn_\ba_\bm_\be ...]
- Toggle the values of settings controlling optional shell behav-
- ior. The settings can be either those listed below, or, if the
+ Toggle the values of settings controlling optional shell behav-
+ ior. The settings can be either those listed below, or, if the
-\b-o\bo option is used, those available with the -\b-o\bo option to the s\bse\bet\bt
builtin command.
- With no options, or with the -\b-p\bp option, display a list of all
- settable options, with an indication of whether or not each is
- set; if any _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs are supplied, the output is restricted to
+ With no options, or with the -\b-p\bp option, display a list of all
+ settable options, with an indication of whether or not each is
+ set; if any _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs are supplied, the output is restricted to
those options. The -\b-p\bp option displays output in a form that may
be reused as input.
Other options have the following meanings:
-\b-s\bs Enable (set) each _\bo_\bp_\bt_\bn_\ba_\bm_\be.
-\b-u\bu Disable (unset) each _\bo_\bp_\bt_\bn_\ba_\bm_\be.
- -\b-q\bq Suppresses normal output (quiet mode); the return status
+ -\b-q\bq Suppresses normal output (quiet mode); the return status
indicates whether the _\bo_\bp_\bt_\bn_\ba_\bm_\be is set or unset. If multi-
- ple _\bo_\bp_\bt_\bn_\ba_\bm_\be arguments are supplied with -\b-q\bq, the return
+ ple _\bo_\bp_\bt_\bn_\ba_\bm_\be arguments are supplied with -\b-q\bq, the return
status is zero if all _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs are enabled; non-zero oth-
erwise.
- -\b-o\bo Restricts the values of _\bo_\bp_\bt_\bn_\ba_\bm_\be to be those defined for
+ -\b-o\bo Restricts the values of _\bo_\bp_\bt_\bn_\ba_\bm_\be to be those defined for
the -\b-o\bo option to the s\bse\bet\bt builtin.
- If either -\b-s\bs or -\b-u\bu is used with no _\bo_\bp_\bt_\bn_\ba_\bm_\be arguments, s\bsh\bho\bop\bpt\bt
- shows only those options which are set or unset, respectively.
- Unless otherwise noted, the s\bsh\bho\bop\bpt\bt options are disabled (unset)
+ If either -\b-s\bs or -\b-u\bu is used with no _\bo_\bp_\bt_\bn_\ba_\bm_\be arguments, s\bsh\bho\bop\bpt\bt
+ shows only those options which are set or unset, respectively.
+ Unless otherwise noted, the s\bsh\bho\bop\bpt\bt options are disabled (unset)
by default.
- The return status when listing options is zero if all _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs
- are enabled, non-zero otherwise. When setting or unsetting op-
- tions, the return status is zero unless an _\bo_\bp_\bt_\bn_\ba_\bm_\be is not a
+ The return status when listing options is zero if all _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs
+ are enabled, non-zero otherwise. When setting or unsetting op-
+ tions, the return status is zero unless an _\bo_\bp_\bt_\bn_\ba_\bm_\be is not a
valid shell option.
The list of s\bsh\bho\bop\bpt\bt options is:
a\bar\brr\bra\bay\by_\b_e\bex\bxp\bpa\ban\bnd\bd_\b_o\bon\bnc\bce\be
- If set, the shell suppresses multiple evaluation of as-
+ If set, the shell suppresses multiple evaluation of as-
sociative and indexed array subscripts during arithmetic
expression evaluation, while executing builtins that can
- perform variable assignments, and while executing
+ perform variable assignments, and while executing
builtins that perform array dereferencing.
a\bas\bss\bso\boc\bc_\b_e\bex\bxp\bpa\ban\bnd\bd_\b_o\bon\bnc\bce\be
Deprecated; a synonym for a\bar\brr\bra\bay\by_\b_e\bex\bxp\bpa\ban\bnd\bd_\b_o\bon\bnc\bce\be.
- a\bau\but\bto\boc\bcd\bd If set, a command name that is the name of a directory
- is executed as if it were the argument to the c\bcd\bd com-
+ a\bau\but\bto\boc\bcd\bd If set, a command name that is the name of a directory
+ is executed as if it were the argument to the c\bcd\bd com-
mand. This option is only used by interactive shells.
b\bba\bas\bsh\bh_\b_s\bso\bou\bur\brc\bce\be_\b_f\bfu\bul\bll\blp\bpa\bat\bth\bh
- If set, filenames added to the B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE array vari-
- able are converted to full pathnames (see S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bi-\b-
+ If set, filenames added to the B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE array vari-
+ able are converted to full pathnames (see S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bi-\b-
a\bab\bbl\ble\bes\bs above).
c\bcd\bda\bab\bbl\ble\be_\b_v\bva\bar\brs\bs
- If set, an argument to the c\bcd\bd builtin command that is
- not a directory is assumed to be the name of a variable
+ If set, an argument to the c\bcd\bd builtin command that is
+ not a directory is assumed to be the name of a variable
whose value is the directory to change to.
- c\bcd\bds\bsp\bpe\bel\bll\bl If set, the c\bcd\bd command attempts to correct minor errors
- in the spelling of a directory component. Minor errors
- include transposed characters, a missing character, and
+ c\bcd\bds\bsp\bpe\bel\bll\bl If set, the c\bcd\bd command attempts to correct minor errors
+ in the spelling of a directory component. Minor errors
+ include transposed characters, a missing character, and
one extra character. If c\bcd\bd corrects the directory name,
- it prints the corrected filename, and the command pro-
+ it prints the corrected filename, and the command pro-
ceeds. This option is only used by interactive shells.
c\bch\bhe\bec\bck\bkh\bha\bas\bsh\bh
If set, b\bba\bas\bsh\bh checks that a command found in the hash ta-
- ble exists before trying to execute it. If a hashed
- command no longer exists, b\bba\bas\bsh\bh performs a normal path
+ ble exists before trying to execute it. If a hashed
+ command no longer exists, b\bba\bas\bsh\bh performs a normal path
search.
c\bch\bhe\bec\bck\bkj\bjo\bob\bbs\bs
If set, b\bba\bas\bsh\bh lists the status of any stopped and running
- jobs before exiting an interactive shell. If any jobs
+ jobs before exiting an interactive shell. If any jobs
are running, b\bba\bas\bsh\bh defers the exit until a second exit is
- attempted without an intervening command (see J\bJO\bOB\bB C\bCO\bON\bN-\b-
- T\bTR\bRO\bOL\bL above). The shell always postpones exiting if any
+ attempted without an intervening command (see J\bJO\bOB\bB C\bCO\bON\bN-\b-
+ T\bTR\bRO\bOL\bL above). The shell always postpones exiting if any
jobs are stopped.
c\bch\bhe\bec\bck\bkw\bwi\bin\bns\bsi\biz\bze\be
- If set, b\bba\bas\bsh\bh checks the window size after each external
- (non-builtin) command and, if necessary, updates the
- values of L\bLI\bIN\bNE\bES\bS and C\bCO\bOL\bLU\bUM\bMN\bNS\bS, using the file descriptor
- associated with the standard error if it is a terminal.
+ If set, b\bba\bas\bsh\bh checks the window size after each external
+ (non-builtin) command and, if necessary, updates the
+ values of L\bLI\bIN\bNE\bES\bS and C\bCO\bOL\bLU\bUM\bMN\bNS\bS, using the file descriptor
+ associated with the standard error if it is a terminal.
This option is enabled by default.
- c\bcm\bmd\bdh\bhi\bis\bst\bt If set, b\bba\bas\bsh\bh attempts to save all lines of a multiple-
- line command in the same history entry. This allows
- easy re-editing of multi-line commands. This option is
- enabled by default, but only has an effect if command
+ c\bcm\bmd\bdh\bhi\bis\bst\bt If set, b\bba\bas\bsh\bh attempts to save all lines of a multiple-
+ line command in the same history entry. This allows
+ easy re-editing of multi-line commands. This option is
+ enabled by default, but only has an effect if command
history is enabled, as described above under H\bHI\bIS\bST\bTO\bOR\bRY\bY.
c\bco\bom\bmp\bpa\bat\bt3\b31\b1
c\bco\bom\bmp\bpa\bat\bt3\b32\b2
c\bco\bom\bmp\bpa\bat\bt4\b42\b2
c\bco\bom\bmp\bpa\bat\bt4\b43\b3
c\bco\bom\bmp\bpa\bat\bt4\b44\b4
- These control aspects of the shell's compatibility mode
+ These control aspects of the shell's compatibility mode
(see S\bSH\bHE\bEL\bLL\bL C\bCO\bOM\bMP\bPA\bAT\bTI\bIB\bBI\bIL\bLI\bIT\bTY\bY M\bMO\bOD\bDE\bE below).
c\bco\bom\bmp\bpl\ble\bet\bte\be_\b_f\bfu\bul\bll\blq\bqu\buo\bot\bte\be
- If set, b\bba\bas\bsh\bh quotes all shell metacharacters in file-
- names and directory names when performing completion.
+ If set, b\bba\bas\bsh\bh quotes all shell metacharacters in file-
+ names and directory names when performing completion.
If not set, b\bba\bas\bsh\bh removes metacharacters such as the dol-
- lar sign from the set of characters that will be quoted
- in completed filenames when these metacharacters appear
- in shell variable references in words to be completed.
- This means that dollar signs in variable names that ex-
- pand to directories will not be quoted; however, any
- dollar signs appearing in filenames will not be quoted,
- either. This is active only when bash is using back-
- slashes to quote completed filenames. This variable is
- set by default, which is the default bash behavior in
+ lar sign from the set of characters that will be quoted
+ in completed filenames when these metacharacters appear
+ in shell variable references in words to be completed.
+ This means that dollar signs in variable names that ex-
+ pand to directories will not be quoted; however, any
+ dollar signs appearing in filenames will not be quoted,
+ either. This is active only when bash is using back-
+ slashes to quote completed filenames. This variable is
+ set by default, which is the default bash behavior in
versions through 4.2.
d\bdi\bir\bre\bex\bxp\bpa\ban\bnd\bd
- If set, b\bba\bas\bsh\bh replaces directory names with the results
- of word expansion when performing filename completion.
+ If set, b\bba\bas\bsh\bh replaces directory names with the results
+ of word expansion when performing filename completion.
This changes the contents of the r\bre\bea\bad\bdl\bli\bin\bne\be editing
- buffer. If not set, b\bba\bas\bsh\bh attempts to preserve what the
+ buffer. If not set, b\bba\bas\bsh\bh attempts to preserve what the
user typed.
d\bdi\bir\brs\bsp\bpe\bel\bll\bl
- If set, b\bba\bas\bsh\bh attempts spelling correction on directory
- names during word completion if the directory name ini-
+ If set, b\bba\bas\bsh\bh attempts spelling correction on directory
+ names during word completion if the directory name ini-
tially supplied does not exist.
- d\bdo\bot\btg\bgl\blo\bob\bb If set, b\bba\bas\bsh\bh includes filenames beginning with a "." in
- the results of pathname expansion. The filenames _\b. and
+ d\bdo\bot\btg\bgl\blo\bob\bb If set, b\bba\bas\bsh\bh includes filenames beginning with a "." in
+ the results of pathname expansion. The filenames _\b. and
_\b._\b. must always be matched explicitly, even if d\bdo\bot\btg\bgl\blo\bob\bb is
set.
e\bex\bxe\bec\bcf\bfa\bai\bil\bl
If set, a non-interactive shell will not exit if it can-
- not execute the file specified as an argument to the
- e\bex\bxe\bec\bc builtin. An interactive shell does not exit if
+ not execute the file specified as an argument to the
+ e\bex\bxe\bec\bc builtin. An interactive shell does not exit if
e\bex\bxe\bec\bc fails.
e\bex\bxp\bpa\ban\bnd\bd_\b_a\bal\bli\bia\bas\bse\bes\bs
- If set, aliases are expanded as described above under
+ If set, aliases are expanded as described above under
A\bAL\bLI\bIA\bAS\bSE\bES\bS. This option is enabled by default for interac-
tive shells.
e\bex\bxt\btd\bde\beb\bbu\bug\bg
- If set at shell invocation, or in a shell startup file,
+ If set at shell invocation, or in a shell startup file,
arrange to execute the debugger profile before the shell
- starts, identical to the -\b--\b-d\bde\beb\bbu\bug\bgg\bge\ber\br option. If set af-
- ter invocation, behavior intended for use by debuggers
+ starts, identical to the -\b--\b-d\bde\beb\bbu\bug\bgg\bge\ber\br option. If set af-
+ ter invocation, behavior intended for use by debuggers
is enabled:
1\b1.\b. The -\b-F\bF option to the d\bde\bec\bcl\bla\bar\bre\be builtin displays the
source file name and line number corresponding to
each function name supplied as an argument.
- 2\b2.\b. If the command run by the D\bDE\bEB\bBU\bUG\bG trap returns a
- non-zero value, the next command is skipped and
+ 2\b2.\b. If the command run by the D\bDE\bEB\bBU\bUG\bG trap returns a
+ non-zero value, the next command is skipped and
not executed.
- 3\b3.\b. If the command run by the D\bDE\bEB\bBU\bUG\bG trap returns a
- value of 2, and the shell is executing in a sub-
- routine (a shell function or a shell script exe-
- cuted by the .\b. or s\bso\bou\bur\brc\bce\be builtins), the shell
+ 3\b3.\b. If the command run by the D\bDE\bEB\bBU\bUG\bG trap returns a
+ value of 2, and the shell is executing in a sub-
+ routine (a shell function or a shell script exe-
+ cuted by the .\b. or s\bso\bou\bur\brc\bce\be builtins), the shell
simulates a call to r\bre\bet\btu\bur\brn\bn.
- 4\b4.\b. B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC and B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV are updated as described
+ 4\b4.\b. B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC and B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV are updated as described
in their descriptions above).
- 5\b5.\b. Function tracing is enabled: command substitu-
+ 5\b5.\b. Function tracing is enabled: command substitu-
tion, shell functions, and subshells invoked with
(\b( _\bc_\bo_\bm_\bm_\ba_\bn_\bd )\b) inherit the D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN traps.
- 6\b6.\b. Error tracing is enabled: command substitution,
- shell functions, and subshells invoked with (\b(
+ 6\b6.\b. Error tracing is enabled: command substitution,
+ shell functions, and subshells invoked with (\b(
_\bc_\bo_\bm_\bm_\ba_\bn_\bd )\b) inherit the E\bER\bRR\bR trap.
- e\bex\bxt\btg\bgl\blo\bob\bb If set, enable the extended pattern matching features
+ e\bex\bxt\btg\bgl\blo\bob\bb If set, enable the extended pattern matching features
described above under P\bPa\bat\bth\bhn\bna\bam\bme\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn.
e\bex\bxt\btq\bqu\buo\bot\bte\be
- If set, $\b$'_\bs_\bt_\br_\bi_\bn_\bg' and $\b$"_\bs_\bt_\br_\bi_\bn_\bg" quoting is performed
- within $\b${\b{_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br}\b} expansions enclosed in double
+ If set, $\b$'_\bs_\bt_\br_\bi_\bn_\bg' and $\b$"_\bs_\bt_\br_\bi_\bn_\bg" quoting is performed
+ within $\b${\b{_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br}\b} expansions enclosed in double
quotes. This option is enabled by default.
f\bfa\bai\bil\blg\bgl\blo\bob\bb
- If set, patterns which fail to match filenames during
+ If set, patterns which fail to match filenames during
pathname expansion result in an expansion error.
f\bfo\bor\brc\bce\be_\b_f\bfi\big\bgn\bno\bor\bre\be
- If set, the suffixes specified by the F\bFI\bIG\bGN\bNO\bOR\bRE\bE shell
- variable cause words to be ignored when performing word
+ If set, the suffixes specified by the F\bFI\bIG\bGN\bNO\bOR\bRE\bE shell
+ variable cause words to be ignored when performing word
completion even if the ignored words are the only possi-
- ble completions. See S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs above for a de-
- scription of F\bFI\bIG\bGN\bNO\bOR\bRE\bE. This option is enabled by de-
+ ble completions. See S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs above for a de-
+ scription of F\bFI\bIG\bGN\bNO\bOR\bRE\bE. This option is enabled by de-
fault.
g\bgl\blo\bob\bba\bas\bsc\bci\bii\bir\bra\ban\bng\bge\bes\bs
- If set, range expressions used in pattern matching
- bracket expressions (see P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg above) behave
- as if in the traditional C locale when performing com-
- parisons. That is, pattern matching does not take the
- current locale's collating sequence into account, so b\bb
- will not collate between A\bA and B\bB, and upper-case and
+ If set, range expressions used in pattern matching
+ bracket expressions (see P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg above) behave
+ as if in the traditional C locale when performing com-
+ parisons. That is, pattern matching does not take the
+ current locale's collating sequence into account, so b\bb
+ will not collate between A\bA and B\bB, and upper-case and
lower-case ASCII characters will collate together.
g\bgl\blo\bob\bbs\bsk\bki\bip\bpd\bdo\bot\bts\bs
- If set, pathname expansion will never match the file-
- names _\b. and _\b._\b., even if the pattern begins with a ".".
+ If set, pathname expansion will never match the file-
+ names _\b. and _\b._\b., even if the pattern begins with a ".".
This option is enabled by default.
g\bgl\blo\bob\bbs\bst\bta\bar\br
If set, the pattern *\b**\b* used in a pathname expansion con-
- text will match all files and zero or more directories
- and subdirectories. If the pattern is followed by a /\b/,
+ text will match all files and zero or more directories
+ and subdirectories. If the pattern is followed by a /\b/,
only directories and subdirectories match.
g\bgn\bnu\bu_\b_e\ber\brr\brf\bfm\bmt\bt
If set, shell error messages are written in the standard
GNU error message format.
h\bhi\bis\bst\bta\bap\bpp\bpe\ben\bnd\bd
- If set, the history list is appended to the file named
+ If set, the history list is appended to the file named
by the value of the H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE variable when the shell ex-
its, rather than overwriting the file.
h\bhi\bis\bst\btr\bre\bee\bed\bdi\bit\bt
- If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, the user is given
- the opportunity to re-edit a failed history substitu-
+ If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, the user is given
+ the opportunity to re-edit a failed history substitu-
tion.
h\bhi\bis\bst\btv\bve\ber\bri\bif\bfy\by
- If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, the results of his-
- tory substitution are not immediately passed to the
- shell parser. Instead, the resulting line is loaded
+ If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, the results of his-
+ tory substitution are not immediately passed to the
+ shell parser. Instead, the resulting line is loaded
into the r\bre\bea\bad\bdl\bli\bin\bne\be editing buffer, allowing further modi-
fication.
h\bho\bos\bst\btc\bco\bom\bmp\bpl\ble\bet\bte\be
If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, b\bba\bas\bsh\bh will attempt to
- perform hostname completion when a word containing a @\b@
- is being completed (see C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg under R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE
+ perform hostname completion when a word containing a @\b@
+ is being completed (see C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg under R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE
above). This is enabled by default.
h\bhu\bup\bpo\bon\bne\bex\bxi\bit\bt
If set, b\bba\bas\bsh\bh will send S\bSI\bIG\bGH\bHU\bUP\bP to all jobs when an inter-
active login shell exits.
i\bin\bnh\bhe\ber\bri\bit\bt_\b_e\ber\brr\bre\bex\bxi\bit\bt
- If set, command substitution inherits the value of the
- e\ber\brr\bre\bex\bxi\bit\bt option, instead of unsetting it in the subshell
- environment. This option is enabled when posix mode is
+ If set, command substitution inherits the value of the
+ e\ber\brr\bre\bex\bxi\bit\bt option, instead of unsetting it in the subshell
+ environment. This option is enabled when posix mode is
enabled.
i\bin\bnt\bte\ber\bra\bac\bct\bti\biv\bve\be_\b_c\bco\bom\bmm\bme\ben\bnt\bts\bs
- In an interactive shell, a word beginning with #\b# causes
- that word and all remaining characters on that line to
- be ignored, as in a non-interactive shell (see C\bCO\bOM\bMM\bME\bEN\bNT\bTS\bS
+ In an interactive shell, a word beginning with #\b# causes
+ that word and all remaining characters on that line to
+ be ignored, as in a non-interactive shell (see C\bCO\bOM\bMM\bME\bEN\bNT\bTS\bS
above). This option is enabled by default.
l\bla\bas\bst\btp\bpi\bip\bpe\be
- If set, and job control is not active, the shell runs
+ If set, and job control is not active, the shell runs
the last command of a pipeline not executed in the back-
ground in the current shell environment.
- l\bli\bit\bth\bhi\bis\bst\bt If set, and the c\bcm\bmd\bdh\bhi\bis\bst\bt option is enabled, multi-line
+ l\bli\bit\bth\bhi\bis\bst\bt If set, and the c\bcm\bmd\bdh\bhi\bis\bst\bt option is enabled, multi-line
commands are saved to the history with embedded newlines
rather than using semicolon separators where possible.
l\blo\boc\bca\bal\blv\bva\bar\br_\b_i\bin\bnh\bhe\ber\bri\bit\bt
scope before any new value is assigned. The nameref at-
tribute is not inherited.
l\blo\boc\bca\bal\blv\bva\bar\br_\b_u\bun\bns\bse\bet\bt
- If set, calling u\bun\bns\bse\bet\bt on local variables in previous
- function scopes marks them so subsequent lookups find
+ If set, calling u\bun\bns\bse\bet\bt on local variables in previous
+ function scopes marks them so subsequent lookups find
them unset until that function returns. This is identi-
- cal to the behavior of unsetting local variables at the
+ cal to the behavior of unsetting local variables at the
current function scope.
l\blo\bog\bgi\bin\bn_\b_s\bsh\bhe\bel\bll\bl
- The shell sets this option if it is started as a login
- shell (see I\bIN\bNV\bVO\bOC\bCA\bAT\bTI\bIO\bON\bN above). The value may not be
+ The shell sets this option if it is started as a login
+ shell (see I\bIN\bNV\bVO\bOC\bCA\bAT\bTI\bIO\bON\bN above). The value may not be
changed.
m\bma\bai\bil\blw\bwa\bar\brn\bn
- If set, and a file that b\bba\bas\bsh\bh is checking for mail has
- been accessed since the last time it was checked, b\bba\bas\bsh\bh
- displays the message "The mail in _\bm_\ba_\bi_\bl_\bf_\bi_\bl_\be has been
+ If set, and a file that b\bba\bas\bsh\bh is checking for mail has
+ been accessed since the last time it was checked, b\bba\bas\bsh\bh
+ displays the message "The mail in _\bm_\ba_\bi_\bl_\bf_\bi_\bl_\be has been
read".
n\bno\bo_\b_e\bem\bmp\bpt\bty\by_\b_c\bcm\bmd\bd_\b_c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn
If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, b\bba\bas\bsh\bh does not search
- P\bPA\bAT\bTH\bH for possible completions when completion is at-
+ P\bPA\bAT\bTH\bH for possible completions when completion is at-
tempted on an empty line.
n\bno\boc\bca\bas\bse\beg\bgl\blo\bob\bb
- If set, b\bba\bas\bsh\bh matches filenames in a case-insensitive
+ If set, b\bba\bas\bsh\bh matches filenames in a case-insensitive
fashion when performing pathname expansion (see P\bPa\bat\bth\bhn\bna\bam\bme\be
E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn above).
n\bno\boc\bca\bas\bse\bem\bma\bat\btc\bch\bh
- If set, b\bba\bas\bsh\bh matches patterns in a case-insensitive
+ If set, b\bba\bas\bsh\bh matches patterns in a case-insensitive
fashion when performing matching while executing c\bca\bas\bse\be or
[\b[[\b[ conditional commands, when performing pattern substi-
- tution word expansions, or when filtering possible com-
+ tution word expansions, or when filtering possible com-
pletions as part of programmable completion.
n\bno\boe\bex\bxp\bpa\ban\bnd\bd_\b_t\btr\bra\ban\bns\bsl\bla\bat\bti\bio\bon\bn
- If set, b\bba\bas\bsh\bh encloses the translated results of $\b$"\b"..."\b"
- quoting in single quotes instead of double quotes. If
+ If set, b\bba\bas\bsh\bh encloses the translated results of $\b$"\b"..."\b"
+ quoting in single quotes instead of double quotes. If
the string is not translated, this has no effect.
n\bnu\bul\bll\blg\bgl\blo\bob\bb
If set, pathname expansion patterns which match no files
removed, rather than expanding to themselves.
p\bpa\bat\bts\bsu\bub\bb_\b_r\bre\bep\bpl\bla\bac\bce\bem\bme\ben\bnt\bt
If set, b\bba\bas\bsh\bh expands occurrences of &\b& in the replacement
- string of pattern substitution to the text matched by
- the pattern, as described under P\bPa\bar\bra\bam\bme\bet\bte\ber\br E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
+ string of pattern substitution to the text matched by
+ the pattern, as described under P\bPa\bar\bra\bam\bme\bet\bte\ber\br E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
above. This option is enabled by default.
p\bpr\bro\bog\bgc\bco\bom\bmp\bp
- If set, enable the programmable completion facilities
+ If set, enable the programmable completion facilities
(see P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn above). This option is en-
abled by default.
p\bpr\bro\bog\bgc\bco\bom\bmp\bp_\b_a\bal\bli\bia\bas\bs
- If set, and programmable completion is enabled, b\bba\bas\bsh\bh
- treats a command name that doesn't have any completions
+ If set, and programmable completion is enabled, b\bba\bas\bsh\bh
+ treats a command name that doesn't have any completions
as a possible alias and attempts alias expansion. If it
- has an alias, b\bba\bas\bsh\bh attempts programmable completion us-
+ has an alias, b\bba\bas\bsh\bh attempts programmable completion us-
ing the command word resulting from the expanded alias.
p\bpr\bro\bom\bmp\bpt\btv\bva\bar\brs\bs
If set, prompt strings undergo parameter expansion, com-
- mand substitution, arithmetic expansion, and quote re-
- moval after being expanded as described in P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG
+ mand substitution, arithmetic expansion, and quote re-
+ moval after being expanded as described in P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG
above. This option is enabled by default.
r\bre\bes\bst\btr\bri\bic\bct\bte\bed\bd_\b_s\bsh\bhe\bel\bll\bl
- The shell sets this option if it is started in re-
- stricted mode (see R\bRE\bES\bST\bTR\bRI\bIC\bCT\bTE\bED\bD S\bSH\bHE\bEL\bLL\bL below). The value
- may not be changed. This is not reset when the startup
- files are executed, allowing the startup files to dis-
+ The shell sets this option if it is started in re-
+ stricted mode (see R\bRE\bES\bST\bTR\bRI\bIC\bCT\bTE\bED\bD S\bSH\bHE\bEL\bLL\bL below). The value
+ may not be changed. This is not reset when the startup
+ files are executed, allowing the startup files to dis-
cover whether or not a shell is restricted.
s\bsh\bhi\bif\bft\bt_\b_v\bve\ber\brb\bbo\bos\bse\be
- If set, the s\bsh\bhi\bif\bft\bt builtin prints an error message when
+ If set, the s\bsh\bhi\bif\bft\bt builtin prints an error message when
the shift count exceeds the number of positional parame-
ters.
s\bso\bou\bur\brc\bce\bep\bpa\bat\bth\bh
If set, the .\b. (s\bso\bou\bur\brc\bce\be) builtin uses the value of P\bPA\bAT\bTH\bH to
- find the directory containing the file supplied as an
- argument when the -\b-p\bp option is not supplied. This op-
+ find the directory containing the file supplied as an
+ argument when the -\b-p\bp option is not supplied. This op-
tion is enabled by default.
v\bva\bar\brr\bre\bed\bdi\bir\br_\b_c\bcl\blo\bos\bse\be
- If set, the shell automatically closes file descriptors
- assigned using the _\b{_\bv_\ba_\br_\bn_\ba_\bm_\be_\b} redirection syntax (see
+ If set, the shell automatically closes file descriptors
+ assigned using the _\b{_\bv_\ba_\br_\bn_\ba_\bm_\be_\b} redirection syntax (see
R\bRE\bED\bDI\bIR\bRE\bEC\bCT\bTI\bIO\bON\bN above) instead of leaving them open when the
command completes.
x\bxp\bpg\bg_\b_e\bec\bch\bho\bo
- If set, the e\bec\bch\bho\bo builtin expands backslash-escape se-
- quences by default. If the p\bpo\bos\bsi\bix\bx shell option is also
+ If set, the e\bec\bch\bho\bo builtin expands backslash-escape se-
+ quences by default. If the p\bpo\bos\bsi\bix\bx shell option is also
enabled, e\bec\bch\bho\bo does not interpret any options.
s\bsu\bus\bsp\bpe\ben\bnd\bd [-\b-f\bf]
- Suspend the execution of this shell until it receives a S\bSI\bIG\bGC\bCO\bON\bNT\bT
- signal. A login shell, or a shell without job control enabled,
- cannot be suspended; the -\b-f\bf option will override this and force
- the suspension. The return status is 0 unless the shell is a
- login shell or job control is not enabled and -\b-f\bf is not sup-
+ Suspend the execution of this shell until it receives a S\bSI\bIG\bGC\bCO\bON\bNT\bT
+ signal. A login shell, or a shell without job control enabled,
+ cannot be suspended; the -\b-f\bf option will override this and force
+ the suspension. The return status is 0 unless the shell is a
+ login shell or job control is not enabled and -\b-f\bf is not sup-
plied.
t\bte\bes\bst\bt _\be_\bx_\bp_\br
[\b[ _\be_\bx_\bp_\br ]\b]
Return a status of 0 (true) or 1 (false) depending on the evalu-
- ation of the conditional expression _\be_\bx_\bp_\br. Each operator and
- operand must be a separate argument. Expressions are composed
- of the primaries described above under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS.
- t\bte\bes\bst\bt does not accept any options, nor does it accept and ignore
+ ation of the conditional expression _\be_\bx_\bp_\br. Each operator and
+ operand must be a separate argument. Expressions are composed
+ of the primaries described above under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS.
+ t\bte\bes\bst\bt does not accept any options, nor does it accept and ignore
an argument of -\b--\b- as signifying the end of options.
- Expressions may be combined using the following operators,
- listed in decreasing order of precedence. The evaluation de-
+ Expressions may be combined using the following operators,
+ listed in decreasing order of precedence. The evaluation de-
pends on the number of arguments; see below. t\bte\bes\bst\bt uses operator
precedence when there are five or more arguments.
!\b! _\be_\bx_\bp_\br True if _\be_\bx_\bp_\br is false.
(\b( _\be_\bx_\bp_\br )\b)
- Returns the value of _\be_\bx_\bp_\br. This may be used to override
+ Returns the value of _\be_\bx_\bp_\br. This may be used to override
normal operator precedence.
_\be_\bx_\bp_\br_\b1 -a\ba _\be_\bx_\bp_\br_\b2
True if both _\be_\bx_\bp_\br_\b1 and _\be_\bx_\bp_\br_\b2 are true.
null.
2 arguments
If the first argument is !\b!, the expression is true if and
- only if the second argument is null. If the first argu-
- ment is one of the unary conditional operators listed
- above under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS, the expression is
+ only if the second argument is null. If the first argu-
+ ment is one of the unary conditional operators listed
+ above under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS, the expression is
true if the unary test is true. If the first argument is
not a valid unary conditional operator, the expression is
false.
3 arguments
The following conditions are applied in the order listed.
- If the second argument is one of the binary conditional
+ If the second argument is one of the binary conditional
operators listed above under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS, the
result of the expression is the result of the binary test
- using the first and third arguments as operands. The -\b-a\ba
- and -\b-o\bo operators are considered binary operators when
- there are three arguments. If the first argument is !\b!,
- the value is the negation of the two-argument test using
+ using the first and third arguments as operands. The -\b-a\ba
+ and -\b-o\bo operators are considered binary operators when
+ there are three arguments. If the first argument is !\b!,
+ the value is the negation of the two-argument test using
the second and third arguments. If the first argument is
exactly (\b( and the third argument is exactly )\b), the result
- is the one-argument test of the second argument. Other-
+ is the one-argument test of the second argument. Other-
wise, the expression is false.
4 arguments
The following conditions are applied in the order listed.
If the first argument is !\b!, the result is the negation of
- the three-argument expression composed of the remaining
- arguments. If the first argument is exactly (\b( and the
+ the three-argument expression composed of the remaining
+ arguments. If the first argument is exactly (\b( and the
fourth argument is exactly )\b), the result is the two-argu-
- ment test of the second and third arguments. Otherwise,
- the expression is parsed and evaluated according to
+ ment test of the second and third arguments. Otherwise,
+ the expression is parsed and evaluated according to
precedence using the rules listed above.
5 or more arguments
- The expression is parsed and evaluated according to
+ The expression is parsed and evaluated according to
precedence using the rules listed above.
When the shell is in posix mode, or if the expression is part of
the [\b[[\b[ command, the <\b< and >\b> operators sort using the current lo-
- cale. If the shell is not in posix mode, the t\bte\bes\bst\bt and [\b[ com-
+ cale. If the shell is not in posix mode, the t\bte\bes\bst\bt and [\b[ com-
mands sort lexicographically using ASCII ordering.
- The historical operator-precedence parsing with 4 or more argu-
- ments can lead to ambiguities when it encounters strings that
- look like primaries. The POSIX standard has deprecated the -\b-a\ba
- and -\b-o\bo primaries and enclosing expressions within parentheses.
- Scripts should no longer use them. It's much more reliable to
- restrict test invocations to a single primary, and to replace
+ The historical operator-precedence parsing with 4 or more argu-
+ ments can lead to ambiguities when it encounters strings that
+ look like primaries. The POSIX standard has deprecated the -\b-a\ba
+ and -\b-o\bo primaries and enclosing expressions within parentheses.
+ Scripts should no longer use them. It's much more reliable to
+ restrict test invocations to a single primary, and to replace
uses of -\b-a\ba and -\b-o\bo with the shell's &\b&&\b& and |\b||\b| list operators.
- t\bti\bim\bme\bes\bs Print the accumulated user and system times for the shell and
+ t\bti\bim\bme\bes\bs Print the accumulated user and system times for the shell and
for processes run from the shell. The return status is 0.
t\btr\bra\bap\bp [-\b-l\blp\bpP\bP] [[_\ba_\bc_\bt_\bi_\bo_\bn] _\bs_\bi_\bg_\bs_\bp_\be_\bc ...]
The _\ba_\bc_\bt_\bi_\bo_\bn is a command that is read and executed when the shell
- receives any of the signals _\bs_\bi_\bg_\bs_\bp_\be_\bc. If _\ba_\bc_\bt_\bi_\bo_\bn is absent (and
+ receives any of the signals _\bs_\bi_\bg_\bs_\bp_\be_\bc. If _\ba_\bc_\bt_\bi_\bo_\bn is absent (and
there is a single _\bs_\bi_\bg_\bs_\bp_\be_\bc) or -\b-, each specified _\bs_\bi_\bg_\bs_\bp_\be_\bc is reset
- to the value it had when the shell was started. If _\ba_\bc_\bt_\bi_\bo_\bn is
- the null string the signal specified by each _\bs_\bi_\bg_\bs_\bp_\be_\bc is ignored
+ to the value it had when the shell was started. If _\ba_\bc_\bt_\bi_\bo_\bn is
+ the null string the signal specified by each _\bs_\bi_\bg_\bs_\bp_\be_\bc is ignored
by the shell and by the commands it invokes.
- If no arguments are supplied, t\btr\bra\bap\bp displays the actions associ-
+ If no arguments are supplied, t\btr\bra\bap\bp displays the actions associ-
ated with each trapped signal as a set of t\btr\bra\bap\bp commands that can
- be reused as shell input to restore the current signal disposi-
- tions. If -\b-p\bp is given, and _\ba_\bc_\bt_\bi_\bo_\bn is not present, then t\btr\bra\bap\bp
- displays the actions associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc or, if none
+ be reused as shell input to restore the current signal disposi-
+ tions. If -\b-p\bp is given, and _\ba_\bc_\bt_\bi_\bo_\bn is not present, then t\btr\bra\bap\bp
+ displays the actions associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc or, if none
are supplied, for all trapped signals, as a set of t\btr\bra\bap\bp commands
- that can be reused as shell input to restore the current signal
- dispositions. The -\b-P\bP option behaves similarly, but displays
- only the actions associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc argument. -\b-P\bP re-
- quires at least one _\bs_\bi_\bg_\bs_\bp_\be_\bc argument. The -\b-P\bP or -\b-p\bp options may
- be used in a subshell environment (e.g., command substitution)
- and, as long as they are used before t\btr\bra\bap\bp is used to change a
+ that can be reused as shell input to restore the current signal
+ dispositions. The -\b-P\bP option behaves similarly, but displays
+ only the actions associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc argument. -\b-P\bP re-
+ quires at least one _\bs_\bi_\bg_\bs_\bp_\be_\bc argument. The -\b-P\bP or -\b-p\bp options may
+ be used in a subshell environment (e.g., command substitution)
+ and, as long as they are used before t\btr\bra\bap\bp is used to change a
signal's handling, will display the state of its parent's traps.
- The -\b-l\bl option prints a list of signal names and their corre-
- sponding numbers. Each _\bs_\bi_\bg_\bs_\bp_\be_\bc is either a signal name defined
+ The -\b-l\bl option prints a list of signal names and their corre-
+ sponding numbers. Each _\bs_\bi_\bg_\bs_\bp_\be_\bc is either a signal name defined
in <_\bs_\bi_\bg_\bn_\ba_\bl_\b._\bh>, or a signal number. Signal names are case insen-
- sitive and the S\bSI\bIG\bG prefix is optional. If -\b-l\bl is supplied with
+ sitive and the S\bSI\bIG\bG prefix is optional. If -\b-l\bl is supplied with
no _\bs_\bi_\bg_\bs_\bp_\be_\bc arguments, it prints a list of valid signal names.
- If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bEX\bXI\bIT\bT (0), _\ba_\bc_\bt_\bi_\bo_\bn is executed on exit from the
- shell. If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is D\bDE\bEB\bBU\bUG\bG, _\ba_\bc_\bt_\bi_\bo_\bn is executed before every
- _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd, _\bf_\bo_\br command, _\bc_\ba_\bs_\be command, _\bs_\be_\bl_\be_\bc_\bt command, ((
- arithmetic command, [[ conditional command, arithmetic _\bf_\bo_\br com-
- mand, and before the first command executes in a shell function
- (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR above). Refer to the description of the
- e\bex\bxt\btd\bde\beb\bbu\bug\bg shell option (see s\bsh\bho\bop\bpt\bt above) for details of its ef-
- fect on the D\bDE\bEB\bBU\bUG\bG trap. If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is R\bRE\bET\bTU\bUR\bRN\bN, _\ba_\bc_\bt_\bi_\bo_\bn is exe-
+ If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bEX\bXI\bIT\bT (0), _\ba_\bc_\bt_\bi_\bo_\bn is executed on exit from the
+ shell. If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is D\bDE\bEB\bBU\bUG\bG, _\ba_\bc_\bt_\bi_\bo_\bn is executed before every
+ _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd, _\bf_\bo_\br command, _\bc_\ba_\bs_\be command, _\bs_\be_\bl_\be_\bc_\bt command, ((
+ arithmetic command, [[ conditional command, arithmetic _\bf_\bo_\br com-
+ mand, and before the first command executes in a shell function
+ (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR above). Refer to the description of the
+ e\bex\bxt\btd\bde\beb\bbu\bug\bg shell option (see s\bsh\bho\bop\bpt\bt above) for details of its ef-
+ fect on the D\bDE\bEB\bBU\bUG\bG trap. If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is R\bRE\bET\bTU\bUR\bRN\bN, _\ba_\bc_\bt_\bi_\bo_\bn is exe-
cuted each time a shell function or a script executed with the .\b.
or s\bso\bou\bur\brc\bce\be builtins finishes executing.
- If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bER\bRR\bR, _\ba_\bc_\bt_\bi_\bo_\bn is executed whenever a pipeline
- (which may consist of a single simple command), a list, or a
- compound command returns a non-zero exit status, subject to the
- following conditions. The E\bER\bRR\bR trap is not executed if the
+ If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bER\bRR\bR, _\ba_\bc_\bt_\bi_\bo_\bn is executed whenever a pipeline
+ (which may consist of a single simple command), a list, or a
+ compound command returns a non-zero exit status, subject to the
+ following conditions. The E\bER\bRR\bR trap is not executed if the
failed command is part of the command list immediately following
a w\bwh\bhi\bil\ble\be or u\bun\bnt\bti\bil\bl reserved word, part of the test in an _\bi_\bf state-
- ment, part of a command executed in a &\b&&\b& or |\b||\b| list except the
- command following the final &\b&&\b& or |\b||\b|, any command in a pipeline
- but the last (subject to the state of the p\bpi\bip\bpe\bef\bfa\bai\bil\bl shell op-
- tion), or if the command's return value is being inverted using
+ ment, part of a command executed in a &\b&&\b& or |\b||\b| list except the
+ command following the final &\b&&\b& or |\b||\b|, any command in a pipeline
+ but the last (subject to the state of the p\bpi\bip\bpe\bef\bfa\bai\bil\bl shell op-
+ tion), or if the command's return value is being inverted using
!\b!. These are the same conditions obeyed by the e\ber\brr\bre\bex\bxi\bit\bt (-\b-e\be) op-
tion.
When the shell is not interactive, signals ignored upon entry to
the shell cannot be trapped or reset. Interactive shells permit
trapping signals ignored on entry. Trapped signals that are not
- being ignored are reset to their original values in a subshell
- or subshell environment when one is created. The return status
+ being ignored are reset to their original values in a subshell
+ or subshell environment when one is created. The return status
is false if any _\bs_\bi_\bg_\bs_\bp_\be_\bc is invalid; otherwise t\btr\bra\bap\bp returns true.
t\btr\bru\bue\be Does nothing, returns a 0 status.
Indicate how each _\bn_\ba_\bm_\be would be interpreted if used as a command
name.
- If the -\b-t\bt option is used, t\bty\byp\bpe\be prints a string which is one of
- _\ba_\bl_\bi_\ba_\bs, _\bk_\be_\by_\bw_\bo_\br_\bd, _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn, _\bb_\bu_\bi_\bl_\bt_\bi_\bn, or _\bf_\bi_\bl_\be if _\bn_\ba_\bm_\be is an alias,
- shell reserved word, function, builtin, or executable file, re-
- spectively. If the _\bn_\ba_\bm_\be is not found, t\bty\byp\bpe\be prints nothing and
+ If the -\b-t\bt option is used, t\bty\byp\bpe\be prints a string which is one of
+ _\ba_\bl_\bi_\ba_\bs, _\bk_\be_\by_\bw_\bo_\br_\bd, _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn, _\bb_\bu_\bi_\bl_\bt_\bi_\bn, or _\bf_\bi_\bl_\be if _\bn_\ba_\bm_\be is an alias,
+ shell reserved word, function, builtin, or executable file, re-
+ spectively. If the _\bn_\ba_\bm_\be is not found, t\bty\byp\bpe\be prints nothing and
returns a non-zero exit status.
- If the -\b-p\bp option is used, t\bty\byp\bpe\be either returns the pathname of
- the executable file that would be found by searching $\b$P\bPA\bAT\bTH\bH for
+ If the -\b-p\bp option is used, t\bty\byp\bpe\be either returns the pathname of
+ the executable file that would be found by searching $\b$P\bPA\bAT\bTH\bH for
_\bn_\ba_\bm_\be or nothing if "type -t name" would not return _\bf_\bi_\bl_\be. The -\b-P\bP
- option forces a P\bPA\bAT\bTH\bH search for each _\bn_\ba_\bm_\be, even if "type -t
+ option forces a P\bPA\bAT\bTH\bH search for each _\bn_\ba_\bm_\be, even if "type -t
name" would not return _\bf_\bi_\bl_\be. If _\bn_\ba_\bm_\be is present in the table of
- hashed commands, -\b-p\bp and -\b-P\bP print the hashed value, which is not
+ hashed commands, -\b-p\bp and -\b-P\bP print the hashed value, which is not
necessarily the file that appears first in P\bPA\bAT\bTH\bH.
- If the -\b-a\ba option is used, t\bty\byp\bpe\be prints all of the places that
- contain a command named _\bn_\ba_\bm_\be. This includes aliases, reserved
- words, functions, and builtins, but the path search options (-\b-p\bp
- and -\b-P\bP) can be supplied to restrict the output to executable
- files. t\bty\byp\bpe\be does not consult the table of hashed commands when
+ If the -\b-a\ba option is used, t\bty\byp\bpe\be prints all of the places that
+ contain a command named _\bn_\ba_\bm_\be. This includes aliases, reserved
+ words, functions, and builtins, but the path search options (-\b-p\bp
+ and -\b-P\bP) can be supplied to restrict the output to executable
+ files. t\bty\byp\bpe\be does not consult the table of hashed commands when
using -\b-a\ba with -\b-p\bp, and only performs a P\bPA\bAT\bTH\bH search for _\bn_\ba_\bm_\be.
The -\b-f\bf option suppresses shell function lookup, as with the c\bco\bom\bm-\b-
- m\bma\ban\bnd\bd builtin. t\bty\byp\bpe\be returns true if all of the arguments are
+ m\bma\ban\bnd\bd builtin. t\bty\byp\bpe\be returns true if all of the arguments are
found, false if any are not found.
u\bul\bli\bim\bmi\bit\bt [-\b-H\bHS\bS] -\b-a\ba
u\bul\bli\bim\bmi\bit\bt [-\b-H\bHS\bS] [-\b-b\bbc\bcd\bde\bef\bfi\bik\bkl\blm\bmn\bnp\bpq\bqr\brs\bst\btu\buv\bvx\bxP\bPR\bRT\bT [_\bl_\bi_\bm_\bi_\bt]]
- Provides control over the resources available to the shell and
+ Provides control over the resources available to the shell and
to processes it starts, on systems that allow such control.
- The -\b-H\bH and -\b-S\bS options specify whether the hard or soft limit is
+ The -\b-H\bH and -\b-S\bS options specify whether the hard or soft limit is
set for the given resource. A hard limit cannot be increased by
a non-root user once it is set; a soft limit may be increased up
- to the value of the hard limit. If neither -\b-H\bH nor -\b-S\bS is speci-
+ to the value of the hard limit. If neither -\b-H\bH nor -\b-S\bS is speci-
fied, u\bul\bli\bim\bmi\bit\bt sets both the soft and hard limits.
The value of _\bl_\bi_\bm_\bi_\bt can be a number in the unit specified for the
- resource or one of the special values h\bha\bar\brd\bd, s\bso\bof\bft\bt, or u\bun\bnl\bli\bim\bmi\bit\bte\bed\bd,
- which stand for the current hard limit, the current soft limit,
- and no limit, respectively. If _\bl_\bi_\bm_\bi_\bt is omitted, u\bul\bli\bim\bmi\bit\bt prints
- the current value of the soft limit of the resource, unless the
- -\b-H\bH option is given. When more than one resource is specified,
- the limit name and unit, if appropriate, are printed before the
+ resource or one of the special values h\bha\bar\brd\bd, s\bso\bof\bft\bt, or u\bun\bnl\bli\bim\bmi\bit\bte\bed\bd,
+ which stand for the current hard limit, the current soft limit,
+ and no limit, respectively. If _\bl_\bi_\bm_\bi_\bt is omitted, u\bul\bli\bim\bmi\bit\bt prints
+ the current value of the soft limit of the resource, unless the
+ -\b-H\bH option is given. When more than one resource is specified,
+ the limit name and unit, if appropriate, are printed before the
value. Other options are interpreted as follows:
-\b-a\ba Report all current limits; no limits are set.
-\b-b\bb The maximum socket buffer size.
-\b-c\bc The maximum size of core files created.
-\b-d\bd The maximum size of a process's data segment.
-\b-e\be The maximum scheduling priority ("nice").
- -\b-f\bf The maximum size of files written by the shell and its
+ -\b-f\bf The maximum size of files written by the shell and its
children.
-\b-i\bi The maximum number of pending signals.
-\b-k\bk The maximum number of kqueues that may be allocated.
-\b-l\bl The maximum size that may be locked into memory.
- -\b-m\bm The maximum resident set size (many systems do not honor
+ -\b-m\bm The maximum resident set size (many systems do not honor
this limit).
-\b-n\bn The maximum number of open file descriptors (most systems
do not allow this value to be set).
-\b-r\br The maximum real-time scheduling priority.
-\b-s\bs The maximum stack size.
-\b-t\bt The maximum amount of cpu time in seconds.
- -\b-u\bu The maximum number of processes available to a single
+ -\b-u\bu The maximum number of processes available to a single
user.
- -\b-v\bv The maximum amount of virtual memory available to the
+ -\b-v\bv The maximum amount of virtual memory available to the
shell and, on some systems, to its children.
-\b-x\bx The maximum number of file locks.
-\b-P\bP The maximum number of pseudoterminals.
- -\b-R\bR The maximum time a real-time process can run before
+ -\b-R\bR The maximum time a real-time process can run before
blocking, in microseconds.
-\b-T\bT The maximum number of threads.
- If _\bl_\bi_\bm_\bi_\bt is supplied, and the -\b-a\ba option is not used, _\bl_\bi_\bm_\bi_\bt is
- the new value of the specified resource. If no option is sup-
+ If _\bl_\bi_\bm_\bi_\bt is supplied, and the -\b-a\ba option is not used, _\bl_\bi_\bm_\bi_\bt is
+ the new value of the specified resource. If no option is sup-
plied, then -\b-f\bf is assumed.
- Values are in 1024-byte increments, except for -\b-t\bt, which is in
- seconds; -\b-R\bR, which is in microseconds; -\b-p\bp, which is in units of
- 512-byte blocks; -\b-P\bP, -\b-T\bT, -\b-b\bb, -\b-k\bk, -\b-n\bn, and -\b-u\bu, which are unscaled
- values; and, when in posix mode, -\b-c\bc and -\b-f\bf, which are in
- 512-byte increments. The return status is 0 unless an invalid
+ Values are in 1024-byte increments, except for -\b-t\bt, which is in
+ seconds; -\b-R\bR, which is in microseconds; -\b-p\bp, which is in units of
+ 512-byte blocks; -\b-P\bP, -\b-T\bT, -\b-b\bb, -\b-k\bk, -\b-n\bn, and -\b-u\bu, which are unscaled
+ values; and, when in posix mode, -\b-c\bc and -\b-f\bf, which are in
+ 512-byte increments. The return status is 0 unless an invalid
option or argument is supplied, or an error occurs while setting
a new limit.
u\bum\bma\bas\bsk\bk [-\b-p\bp] [-\b-S\bS] [_\bm_\bo_\bd_\be]
- Set the user file-creation mask to _\bm_\bo_\bd_\be. If _\bm_\bo_\bd_\be begins with a
+ Set the user file-creation mask to _\bm_\bo_\bd_\be. If _\bm_\bo_\bd_\be begins with a
digit, it is interpreted as an octal number; otherwise it is in-
- terpreted as a symbolic mode mask similar to that accepted by
+ terpreted as a symbolic mode mask similar to that accepted by
_\bc_\bh_\bm_\bo_\bd(1). If _\bm_\bo_\bd_\be is omitted, u\bum\bma\bas\bsk\bk prints the current value of
the mask. The -\b-S\bS option without a _\bm_\bo_\bd_\be argument prints the mask
in a symbolic format; the default output is an octal number. If
the -\b-p\bp option is supplied, and _\bm_\bo_\bd_\be is omitted, the output is in
- a form that may be reused as input. The return status is zero
- if the mode was successfully changed or if no _\bm_\bo_\bd_\be argument was
+ a form that may be reused as input. The return status is zero
+ if the mode was successfully changed or if no _\bm_\bo_\bd_\be argument was
supplied, and non-zero otherwise.
u\bun\bna\bal\bli\bia\bas\bs [-a\ba] [_\bn_\ba_\bm_\be ...]
- Remove each _\bn_\ba_\bm_\be from the list of defined aliases. If -\b-a\ba is
- supplied, remove all alias definitions. The return value is
+ Remove each _\bn_\ba_\bm_\be from the list of defined aliases. If -\b-a\ba is
+ supplied, remove all alias definitions. The return value is
true unless a supplied _\bn_\ba_\bm_\be is not a defined alias.
u\bun\bns\bse\bet\bt [-f\bfv\bv] [-n\bn] [_\bn_\ba_\bm_\be ...]
- For each _\bn_\ba_\bm_\be, remove the corresponding variable or function.
+ For each _\bn_\ba_\bm_\be, remove the corresponding variable or function.
If the -\b-v\bv option is given, each _\bn_\ba_\bm_\be refers to a shell variable,
- and that variable is removed. If -\b-f\bf is specified, each _\bn_\ba_\bm_\be
- refers to a shell function, and the function definition is re-
- moved. If the -\b-n\bn option is supplied, and _\bn_\ba_\bm_\be is a variable
- with the _\bn_\ba_\bm_\be_\br_\be_\bf attribute, _\bn_\ba_\bm_\be will be unset rather than the
- variable it references. -\b-n\bn has no effect if the -\b-f\bf option is
- supplied. Read-only variables and functions may not be unset.
- When variables or functions are removed, they are also removed
- from the environment passed to subsequent commands. If no op-
- tions are supplied, each _\bn_\ba_\bm_\be refers to a variable; if there is
- no variable by that name, a function with that name, if any, is
- unset. Some shell variables may not be unset. If any of
+ and that variable is removed. If -\b-f\bf is specified, each _\bn_\ba_\bm_\be
+ refers to a shell function, and the function definition is re-
+ moved. If the -\b-n\bn option is supplied, and _\bn_\ba_\bm_\be is a variable
+ with the _\bn_\ba_\bm_\be_\br_\be_\bf attribute, _\bn_\ba_\bm_\be will be unset rather than the
+ variable it references. -\b-n\bn has no effect if the -\b-f\bf option is
+ supplied. Read-only variables and functions may not be unset.
+ When variables or functions are removed, they are also removed
+ from the environment passed to subsequent commands. If no op-
+ tions are supplied, each _\bn_\ba_\bm_\be refers to a variable; if there is
+ no variable by that name, a function with that name, if any, is
+ unset. Some shell variables may not be unset. If any of
B\bBA\bAS\bSH\bH_\b_A\bAL\bLI\bIA\bAS\bSE\bES\bS, B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV0\b0, B\bBA\bAS\bSH\bH_\b_C\bCM\bMD\bDS\bS, B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMM\bMA\bAN\bND\bD, B\bBA\bAS\bSH\bH_\b_S\bSU\bUB\bB-\b-
- S\bSH\bHE\bEL\bLL\bL, B\bBA\bAS\bSH\bHP\bPI\bID\bD, C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS, D\bDI\bIR\bRS\bST\bTA\bAC\bCK\bK, E\bEP\bPO\bOC\bCH\bHR\bRE\bEA\bAL\bLT\bTI\bIM\bME\bE,
- E\bEP\bPO\bOC\bCH\bHS\bSE\bEC\bCO\bON\bND\bDS\bS, F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE, G\bGR\bRO\bOU\bUP\bPS\bS, H\bHI\bIS\bST\bTC\bCM\bMD\bD, L\bLI\bIN\bNE\bEN\bNO\bO, R\bRA\bAN\bND\bDO\bOM\bM, S\bSE\bEC\bC-\b-
- O\bON\bND\bDS\bS, or S\bSR\bRA\bAN\bND\bDO\bOM\bM are unset, they lose their special properties,
- even if they are subsequently reset. The exit status is true
+ S\bSH\bHE\bEL\bLL\bL, B\bBA\bAS\bSH\bHP\bPI\bID\bD, C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS, D\bDI\bIR\bRS\bST\bTA\bAC\bCK\bK, E\bEP\bPO\bOC\bCH\bHR\bRE\bEA\bAL\bLT\bTI\bIM\bME\bE,
+ E\bEP\bPO\bOC\bCH\bHS\bSE\bEC\bCO\bON\bND\bDS\bS, F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE, G\bGR\bRO\bOU\bUP\bPS\bS, H\bHI\bIS\bST\bTC\bCM\bMD\bD, L\bLI\bIN\bNE\bEN\bNO\bO, R\bRA\bAN\bND\bDO\bOM\bM, S\bSE\bEC\bC-\b-
+ O\bON\bND\bDS\bS, or S\bSR\bRA\bAN\bND\bDO\bOM\bM are unset, they lose their special properties,
+ even if they are subsequently reset. The exit status is true
unless a _\bn_\ba_\bm_\be is readonly or may not be unset.
w\bwa\bai\bit\bt [-\b-f\bfn\bn] [-\b-p\bp _\bv_\ba_\br_\bn_\ba_\bm_\be] [_\bi_\bd ...]
Wait for each specified child process _\bi_\bd and return the termina-
- tion status of the last _\bi_\bd. Each _\bi_\bd may be a process ID _\bp_\bi_\bd or
- a job specification _\bj_\bo_\bb_\bs_\bp_\be_\bc; if a jobspec is supplied, w\bwa\bai\bit\bt
+ tion status of the last _\bi_\bd. Each _\bi_\bd may be a process ID _\bp_\bi_\bd or
+ a job specification _\bj_\bo_\bb_\bs_\bp_\be_\bc; if a jobspec is supplied, w\bwa\bai\bit\bt
waits for all processes in the job.
- If no options or _\bi_\bds are supplied, w\bwa\bai\bit\bt waits for all running
- background jobs and the last-executed process substitution, if
+ If no options or _\bi_\bds are supplied, w\bwa\bai\bit\bt waits for all running
+ background jobs and the last-executed process substitution, if
its process id is the same as $\b$!\b!, and the return status is zero.
- If the -\b-n\bn option is supplied, w\bwa\bai\bit\bt waits for any one of the
+ If the -\b-n\bn option is supplied, w\bwa\bai\bit\bt waits for any one of the
given _\bi_\bds or, if no _\bi_\bds are supplied, any job or process substi-
tution, to complete and returns its exit status. If none of the
- supplied _\bi_\bds is a child of the shell, or if no _\bi_\bds are supplied
- and the shell has no unwaited-for children, the exit status is
+ supplied _\bi_\bds is a child of the shell, or if no _\bi_\bds are supplied
+ and the shell has no unwaited-for children, the exit status is
127.
- If the -\b-p\bp option is supplied, w\bwa\bai\bit\bt assigns the process or job
- identifier of the job for which the exit status is returned to
- the variable _\bv_\ba_\br_\bn_\ba_\bm_\be named by the option argument. The vari-
- able, which cannot be readonly, will be unset initially, before
- any assignment. This is useful only when used with the -\b-n\bn op-
+ If the -\b-p\bp option is supplied, w\bwa\bai\bit\bt assigns the process or job
+ identifier of the job for which the exit status is returned to
+ the variable _\bv_\ba_\br_\bn_\ba_\bm_\be named by the option argument. The vari-
+ able, which cannot be readonly, will be unset initially, before
+ any assignment. This is useful only when used with the -\b-n\bn op-
tion.
- Supplying the -\b-f\bf option, when job control is enabled, forces
- w\bwa\bai\bit\bt to wait for each _\bi_\bd to terminate before returning its sta-
+ Supplying the -\b-f\bf option, when job control is enabled, forces
+ w\bwa\bai\bit\bt to wait for each _\bi_\bd to terminate before returning its sta-
tus, instead of returning when it changes status.
- If none of the _\bi_\bds specify one of the shell's active child
- processes, the return status is 127. If w\bwa\bai\bit\bt is interrupted by
- a signal, any _\bv_\ba_\br_\bn_\ba_\bm_\be will remain unset, and the return status
- will be greater than 128, as described under S\bSI\bIG\bGN\bNA\bAL\bLS\bS above.
+ If none of the _\bi_\bds specify one of the shell's active child
+ processes, the return status is 127. If w\bwa\bai\bit\bt is interrupted by
+ a signal, any _\bv_\ba_\br_\bn_\ba_\bm_\be will remain unset, and the return status
+ will be greater than 128, as described under S\bSI\bIG\bGN\bNA\bAL\bLS\bS above.
Otherwise, the return status is the exit status of the last _\bi_\bd.
S\bSH\bHE\bEL\bLL\bL C\bCO\bOM\bMP\bPA\bAT\bTI\bIB\bBI\bIL\bLI\bIT\bTY\bY M\bMO\bOD\bDE\bE
- Bash-4.0 introduced the concept of a _\bs_\bh_\be_\bl_\bl _\bc_\bo_\bm_\bp_\ba_\bt_\bi_\bb_\bi_\bl_\bi_\bt_\by _\bl_\be_\bv_\be_\bl, speci-
+ Bash-4.0 introduced the concept of a _\bs_\bh_\be_\bl_\bl _\bc_\bo_\bm_\bp_\ba_\bt_\bi_\bb_\bi_\bl_\bi_\bt_\by _\bl_\be_\bv_\be_\bl, speci-
fied as a set of options to the shopt builtin (c\bco\bom\bmp\bpa\bat\bt3\b31\b1, c\bco\bom\bmp\bpa\bat\bt3\b32\b2, c\bco\bom\bm-\b-
- p\bpa\bat\bt4\b40\b0, c\bco\bom\bmp\bpa\bat\bt4\b41\b1, and so on). There is only one current compatibility
+ p\bpa\bat\bt4\b40\b0, c\bco\bom\bmp\bpa\bat\bt4\b41\b1, and so on). There is only one current compatibility
level -- each option is mutually exclusive. The compatibility level is
- intended to allow users to select behavior from previous versions that
- is incompatible with newer versions while they migrate scripts to use
- current features and behavior. It's intended to be a temporary solu-
+ intended to allow users to select behavior from previous versions that
+ is incompatible with newer versions while they migrate scripts to use
+ current features and behavior. It's intended to be a temporary solu-
tion.
- This section does not mention behavior that is standard for a particu-
- lar version (e.g., setting c\bco\bom\bmp\bpa\bat\bt3\b32\b2 means that quoting the right hand
- side of the regexp matching operator quotes special regexp characters
- in the word, which is default behavior in bash-3.2 and subsequent ver-
+ This section does not mention behavior that is standard for a particu-
+ lar version (e.g., setting c\bco\bom\bmp\bpa\bat\bt3\b32\b2 means that quoting the right hand
+ side of the regexp matching operator quotes special regexp characters
+ in the word, which is default behavior in bash-3.2 and subsequent ver-
sions).
- If a user enables, say, c\bco\bom\bmp\bpa\bat\bt3\b32\b2, it may affect the behavior of other
- compatibility levels up to and including the current compatibility
- level. The idea is that each compatibility level controls behavior
- that changed in that version of b\bba\bas\bsh\bh, but that behavior may have been
- present in earlier versions. For instance, the change to use locale-
- based comparisons with the [\b[[\b[ command came in bash-4.1, and earlier
+ If a user enables, say, c\bco\bom\bmp\bpa\bat\bt3\b32\b2, it may affect the behavior of other
+ compatibility levels up to and including the current compatibility
+ level. The idea is that each compatibility level controls behavior
+ that changed in that version of b\bba\bas\bsh\bh, but that behavior may have been
+ present in earlier versions. For instance, the change to use locale-
+ based comparisons with the [\b[[\b[ command came in bash-4.1, and earlier
versions used ASCII-based comparisons, so enabling c\bco\bom\bmp\bpa\bat\bt3\b32\b2 will enable
- ASCII-based comparisons as well. That granularity may not be suffi-
- cient for all uses, and as a result users should employ compatibility
- levels carefully. Read the documentation for a particular feature to
+ ASCII-based comparisons as well. That granularity may not be suffi-
+ cient for all uses, and as a result users should employ compatibility
+ levels carefully. Read the documentation for a particular feature to
find out the current behavior.
- Bash-4.3 introduced a new shell variable: B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT. The value as-
+ Bash-4.3 introduced a new shell variable: B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT. The value as-
signed to this variable (a decimal version number like 4.2, or an inte-
- ger corresponding to the c\bco\bom\bmp\bpa\bat\bt_\bN_\bN option, like 42) determines the com-
+ ger corresponding to the c\bco\bom\bmp\bpa\bat\bt_\bN_\bN option, like 42) determines the com-
patibility level.
Starting with bash-4.4, b\bba\bas\bsh\bh began deprecating older compatibility lev-
els. Eventually, the options will be removed in favor of B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT.
- Bash-5.0 was the final version for which there was an individual shopt
- option for the previous version. B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT is the only mechanism to
+ Bash-5.0 was the final version for which there was an individual shopt
+ option for the previous version. B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT is the only mechanism to
control the compatibility level in versions newer than bash-5.0.
- The following table describes the behavior changes controlled by each
+ The following table describes the behavior changes controlled by each
compatibility level setting. The c\bco\bom\bmp\bpa\bat\bt_\bN_\bN tag is used as shorthand for
setting the compatibility level to _\bN_\bN using one of the following mecha-
- nisms. For versions prior to bash-5.0, the compatibility level may be
- set using the corresponding c\bco\bom\bmp\bpa\bat\bt_\bN_\bN shopt option. For bash-4.3 and
- later versions, the B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT variable is preferred, and it is re-
+ nisms. For versions prior to bash-5.0, the compatibility level may be
+ set using the corresponding c\bco\bom\bmp\bpa\bat\bt_\bN_\bN shopt option. For bash-4.3 and
+ later versions, the B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT variable is preferred, and it is re-
quired for bash-5.1 and later versions.
c\bco\bom\bmp\bpa\bat\bt3\b31\b1
ator (=~) has no special effect.
c\bco\bom\bmp\bpa\bat\bt3\b32\b2
- +\bo The <\b< and >\b> operators to the [\b[[\b[ command do not consider
+ +\bo The <\b< and >\b> operators to the [\b[[\b[ command do not consider
the current locale when comparing strings; they use ASCII
ordering.
c\bco\bom\bmp\bpa\bat\bt4\b40\b0
- +\bo The <\b< and >\b> operators to the [\b[[\b[ command do not consider
+ +\bo The <\b< and >\b> operators to the [\b[[\b[ command do not consider
the current locale when comparing strings; they use ASCII
ordering. B\bBa\bas\bsh\bh versions prior to bash-4.1 use ASCII col-
- lation and _\bs_\bt_\br_\bc_\bm_\bp(3); bash-4.1 and later use the current
+ lation and _\bs_\bt_\br_\bc_\bm_\bp(3); bash-4.1 and later use the current
locale's collation sequence and _\bs_\bt_\br_\bc_\bo_\bl_\bl(3).
c\bco\bom\bmp\bpa\bat\bt4\b41\b1
- +\bo In posix mode, t\bti\bim\bme\be may be followed by options and still
+ +\bo In posix mode, t\bti\bim\bme\be may be followed by options and still
be recognized as a reserved word (this is POSIX interpre-
tation 267).
+\bo In _\bp_\bo_\bs_\bi_\bx mode, the parser requires that an even number of
- single quotes occur in the _\bw_\bo_\br_\bd portion of a double-
- quoted parameter expansion and treats them specially, so
- that characters within the single quotes are considered
+ single quotes occur in the _\bw_\bo_\br_\bd portion of a double-
+ quoted parameter expansion and treats them specially, so
+ that characters within the single quotes are considered
quoted (this is POSIX interpretation 221).
c\bco\bom\bmp\bpa\bat\bt4\b42\b2
+\bo The replacement string in double-quoted pattern substitu-
- tion does not undergo quote removal, as it does in ver-
+ tion does not undergo quote removal, as it does in ver-
sions after bash-4.2.
- +\bo In posix mode, single quotes are considered special when
- expanding the _\bw_\bo_\br_\bd portion of a double-quoted parameter
- expansion and can be used to quote a closing brace or
- other special character (this is part of POSIX interpre-
- tation 221); in later versions, single quotes are not
+ +\bo In posix mode, single quotes are considered special when
+ expanding the _\bw_\bo_\br_\bd portion of a double-quoted parameter
+ expansion and can be used to quote a closing brace or
+ other special character (this is part of POSIX interpre-
+ tation 221); in later versions, single quotes are not
special within double-quoted word expansions.
c\bco\bom\bmp\bpa\bat\bt4\b43\b3
- +\bo Word expansion errors are considered non-fatal errors
- that cause the current command to fail, even in posix
- mode (the default behavior is to make them fatal errors
+ +\bo Word expansion errors are considered non-fatal errors
+ that cause the current command to fail, even in posix
+ mode (the default behavior is to make them fatal errors
that cause the shell to exit).
- +\bo When executing a shell function, the loop state
+ +\bo When executing a shell function, the loop state
(while/until/etc.) is not reset, so b\bbr\bre\bea\bak\bk or c\bco\bon\bnt\bti\bin\bnu\bue\be in
that function will break or continue loops in the calling
context. Bash-4.4 and later reset the loop state to pre-
vent this.
c\bco\bom\bmp\bpa\bat\bt4\b44\b4
- +\bo The shell sets up the values used by B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV and
- B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC so they can expand to the shell's positional
- parameters even if extended debugging mode is not en-
+ +\bo The shell sets up the values used by B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV and
+ B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC so they can expand to the shell's positional
+ parameters even if extended debugging mode is not en-
abled.
- +\bo A subshell inherits loops from its parent context, so
- b\bbr\bre\bea\bak\bk or c\bco\bon\bnt\bti\bin\bnu\bue\be will cause the subshell to exit.
- Bash-5.0 and later reset the loop state to prevent the
+ +\bo A subshell inherits loops from its parent context, so
+ b\bbr\bre\bea\bak\bk or c\bco\bon\bnt\bti\bin\bnu\bue\be will cause the subshell to exit.
+ Bash-5.0 and later reset the loop state to prevent the
exit
- +\bo Variable assignments preceding builtins like e\bex\bxp\bpo\bor\brt\bt and
+ +\bo Variable assignments preceding builtins like e\bex\bxp\bpo\bor\brt\bt and
r\bre\bea\bad\bdo\bon\bnl\bly\by that set attributes continue to affect variables
with the same name in the calling environment even if the
shell is not in posix mode.
c\bco\bom\bmp\bpa\bat\bt5\b50\b0
- +\bo Bash-5.1 changed the way $\b$R\bRA\bAN\bND\bDO\bOM\bM is generated to intro-
- duce slightly more randomness. If the shell compatibil-
+ +\bo Bash-5.1 changed the way $\b$R\bRA\bAN\bND\bDO\bOM\bM is generated to intro-
+ duce slightly more randomness. If the shell compatibil-
ity level is set to 50 or lower, it reverts to the method
- from bash-5.0 and previous versions, so seeding the ran-
- dom number generator by assigning a value to R\bRA\bAN\bND\bDO\bOM\bM will
+ from bash-5.0 and previous versions, so seeding the ran-
+ dom number generator by assigning a value to R\bRA\bAN\bND\bDO\bOM\bM will
produce the same sequence as in bash-5.0.
- +\bo If the command hash table is empty, bash versions prior
- to bash-5.1 printed an informational message to that ef-
- fect, even when producing output that can be reused as
- input. Bash-5.1 suppresses that message when the -\b-l\bl op-
+ +\bo If the command hash table is empty, bash versions prior
+ to bash-5.1 printed an informational message to that ef-
+ fect, even when producing output that can be reused as
+ input. Bash-5.1 suppresses that message when the -\b-l\bl op-
tion is supplied.
c\bco\bom\bmp\bpa\bat\bt5\b51\b1
- +\bo The u\bun\bns\bse\bet\bt builtin treats attempts to unset array sub-
- scripts @\b@ and *\b* differently depending on whether the ar-
- ray is indexed or associative, and differently than in
+ +\bo The u\bun\bns\bse\bet\bt builtin treats attempts to unset array sub-
+ scripts @\b@ and *\b* differently depending on whether the ar-
+ ray is indexed or associative, and differently than in
previous versions.
+\bo Arithmetic commands ( (\b((\b(...)\b))\b) ) and the expressions in an
arithmetic for statement can be expanded more than once.
- +\bo Expressions used as arguments to arithmetic operators in
- the [\b[[\b[ conditional command can be expanded more than
+ +\bo Expressions used as arguments to arithmetic operators in
+ the [\b[[\b[ conditional command can be expanded more than
once.
- +\bo The expressions in substring parameter brace expansion
+ +\bo The expressions in substring parameter brace expansion
can be expanded more than once.
+\bo The expressions in the $\b$(\b((\b(...)\b))\b) word expansion can be ex-
panded more than once.
- +\bo Arithmetic expressions used as indexed array subscripts
+ +\bo Arithmetic expressions used as indexed array subscripts
can be expanded more than once.
- +\bo t\bte\bes\bst\bt -\b-v\bv, when given an argument of A\bA[\b[@\b@]\b], where A\bA is an
+ +\bo t\bte\bes\bst\bt -\b-v\bv, when given an argument of A\bA[\b[@\b@]\b], where A\bA is an
existing associative array, will return true if the array
- has any set elements. Bash-5.2 will look for and report
+ has any set elements. Bash-5.2 will look for and report
on a key named @\b@.
+\bo The ${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br[\b[:\b:]\b]=\b=_\bv_\ba_\bl_\bu_\be} word expansion will return
- _\bv_\ba_\bl_\bu_\be, before any variable-specific transformations have
+ _\bv_\ba_\bl_\bu_\be, before any variable-specific transformations have
been performed (e.g., converting to lowercase). Bash-5.2
will return the final value assigned to the variable.
- +\bo Parsing command substitutions will behave as if extended
+ +\bo Parsing command substitutions will behave as if extended
globbing (see the description of the s\bsh\bho\bop\bpt\bt builtin above)
- is enabled, so that parsing a command substitution con-
+ is enabled, so that parsing a command substitution con-
taining an extglob pattern (say, as part of a shell func-
- tion) will not fail. This assumes the intent is to en-
- able extglob before the command is executed and word ex-
- pansions are performed. It will fail at word expansion
- time if extglob hasn't been enabled by the time the com-
+ tion) will not fail. This assumes the intent is to en-
+ able extglob before the command is executed and word ex-
+ pansions are performed. It will fail at word expansion
+ time if extglob hasn't been enabled by the time the com-
mand is executed.
c\bco\bom\bmp\bpa\bat\bt5\b52\b2
- +\bo The t\bte\bes\bst\bt builtin uses its historical algorithm to parse
- parenthesized subexpressions when given five or more ar-
+ +\bo The t\bte\bes\bst\bt builtin uses its historical algorithm to parse
+ parenthesized subexpressions when given five or more ar-
guments.
- +\bo If the -\b-p\bp or -\b-P\bP option is supplied to the b\bbi\bin\bnd\bd builtin,
+ +\bo If the -\b-p\bp or -\b-P\bP option is supplied to the b\bbi\bin\bnd\bd builtin,
b\bbi\bin\bnd\bd treats any arguments remaining after option process-
- ing as bindable command names, and displays any key se-
- quences bound to those commands, instead of treating the
+ ing as bindable command names, and displays any key se-
+ quences bound to those commands, instead of treating the
arguments as key sequences to bind.
R\bRE\bES\bST\bTR\bRI\bIC\bCT\bTE\bED\bD S\bSH\bHE\bEL\bLL\bL
If b\bba\bas\bsh\bh is started with the name r\brb\bba\bas\bsh\bh, or the -\b-r\br option is supplied at
- invocation, the shell becomes _\br_\be_\bs_\bt_\br_\bi_\bc_\bt_\be_\bd. A restricted shell is used
- to set up an environment more controlled than the standard shell. It
- behaves identically to b\bba\bas\bsh\bh with the exception that the following are
+ invocation, the shell becomes _\br_\be_\bs_\bt_\br_\bi_\bc_\bt_\be_\bd. A restricted shell is used
+ to set up an environment more controlled than the standard shell. It
+ behaves identically to b\bba\bas\bsh\bh with the exception that the following are
disallowed or not performed:
+\bo Changing directories with c\bcd\bd.
- +\bo Setting or unsetting the values of S\bSH\bHE\bEL\bLL\bL, P\bPA\bAT\bTH\bH, H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE, E\bEN\bNV\bV,
+ +\bo Setting or unsetting the values of S\bSH\bHE\bEL\bLL\bL, P\bPA\bAT\bTH\bH, H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE, E\bEN\bNV\bV,
or B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV.
+\bo Specifying command names containing /\b/.
- +\bo Specifying a filename containing a /\b/ as an argument to the .\b.
+ +\bo Specifying a filename containing a /\b/ as an argument to the .\b.
builtin command.
- +\bo Using the -\b-p\bp option to the .\b. builtin command to specify a
+ +\bo Using the -\b-p\bp option to the .\b. builtin command to specify a
search path.
- +\bo Specifying a filename containing a slash as an argument to the
+ +\bo Specifying a filename containing a slash as an argument to the
h\bhi\bis\bst\bto\bor\bry\by builtin command.
- +\bo Specifying a filename containing a slash as an argument to the
+ +\bo Specifying a filename containing a slash as an argument to the
-\b-p\bp option to the h\bha\bas\bsh\bh builtin command.
- +\bo Importing function definitions from the shell environment at
+ +\bo Importing function definitions from the shell environment at
startup.
- +\bo Parsing the values of B\bBA\bAS\bSH\bHO\bOP\bPT\bTS\bS and S\bSH\bHE\bEL\bLL\bLO\bOP\bPT\bTS\bS from the shell en-
+ +\bo Parsing the values of B\bBA\bAS\bSH\bHO\bOP\bPT\bTS\bS and S\bSH\bHE\bEL\bLL\bLO\bOP\bPT\bTS\bS from the shell en-
vironment at startup.
- +\bo Redirecting output using the >, >|, <>, >&, &>, and >> redirec-
+ +\bo Redirecting output using the >, >|, <>, >&, &>, and >> redirec-
tion operators.
+\bo Using the e\bex\bxe\bec\bc builtin command to replace the shell with another
command.
- +\bo Adding or deleting builtin commands with the -\b-f\bf and -\b-d\bd options
+ +\bo Adding or deleting builtin commands with the -\b-f\bf and -\b-d\bd options
to the e\ben\bna\bab\bbl\ble\be builtin command.
- +\bo Using the e\ben\bna\bab\bbl\ble\be builtin command to enable disabled shell
+ +\bo Using the e\ben\bna\bab\bbl\ble\be builtin command to enable disabled shell
builtins.
+\bo Specifying the -\b-p\bp option to the c\bco\bom\bmm\bma\ban\bnd\bd builtin command.
- +\bo Turning off restricted mode with s\bse\bet\bt +\b+r\br or s\bsh\bho\bop\bpt\bt -\b-u\bu r\bre\be-\b-
+ +\bo Turning off restricted mode with s\bse\bet\bt +\b+r\br or s\bsh\bho\bop\bpt\bt -\b-u\bu r\bre\be-\b-
s\bst\btr\bri\bic\bct\bte\bed\bd_\b_s\bsh\bhe\bel\bll\bl.
These restrictions are enforced after any startup files are read.
When a command that is found to be a shell script is executed (see C\bCO\bOM\bM-\b-
- M\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN above), r\brb\bba\bas\bsh\bh turns off any restrictions in the shell
+ M\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN above), r\brb\bba\bas\bsh\bh turns off any restrictions in the shell
spawned to execute the script.
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
_\b~_\b/_\b._\bb_\ba_\bs_\bh_\br_\bc
The individual per-interactive-shell startup file
_\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bl_\bo_\bg_\bo_\bu_\bt
- The individual login shell cleanup file, executed when a login
+ The individual login shell cleanup file, executed when a login
shell exits
_\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bh_\bi_\bs_\bt_\bo_\br_\by
- The default value of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE, the file in which bash saves the
+ The default value of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE, the file in which bash saves the
command history
_\b~_\b/_\b._\bi_\bn_\bp_\bu_\bt_\br_\bc
Individual _\br_\be_\ba_\bd_\bl_\bi_\bn_\be initialization file
B\bBU\bUG\bG R\bRE\bEP\bPO\bOR\bRT\bTS\bS
If you find a bug in b\bba\bas\bsh\bh, you should report it. But first, you should
- make sure that it really is a bug, and that it appears in the latest
- version of b\bba\bas\bsh\bh. The latest version is always available from
+ make sure that it really is a bug, and that it appears in the latest
+ version of b\bba\bas\bsh\bh. The latest version is always available from
_\bf_\bt_\bp_\b:_\b/_\b/_\bf_\bt_\bp_\b._\bg_\bn_\bu_\b._\bo_\br_\bg_\b/_\bp_\bu_\bb_\b/_\bg_\bn_\bu_\b/_\bb_\ba_\bs_\bh_\b/ and _\bh_\bt_\bt_\bp_\b:_\b/_\b/_\bg_\bi_\bt_\b._\bs_\ba_\bv_\ba_\bn_\b-
_\bn_\ba_\bh_\b._\bg_\bn_\bu_\b._\bo_\br_\bg_\b/_\bc_\bg_\bi_\bt_\b/_\bb_\ba_\bs_\bh_\b._\bg_\bi_\bt_\b/_\bs_\bn_\ba_\bp_\bs_\bh_\bo_\bt_\b/_\bb_\ba_\bs_\bh_\b-_\bm_\ba_\bs_\bt_\be_\br_\b._\bt_\ba_\br_\b._\bg_\bz.
- Once you have determined that a bug actually exists, use the _\bb_\ba_\bs_\bh_\bb_\bu_\bg
- command to submit a bug report. If you have a fix, you are encouraged
+ Once you have determined that a bug actually exists, use the _\bb_\ba_\bs_\bh_\bb_\bu_\bg
+ command to submit a bug report. If you have a fix, you are encouraged
to mail that as well! You may send suggestions and "philosophical" bug
- reports to _\bb_\bu_\bg_\b-_\bb_\ba_\bs_\bh_\b@_\bg_\bn_\bu_\b._\bo_\br_\bg or post them to the Usenet newsgroup
+ reports to _\bb_\bu_\bg_\b-_\bb_\ba_\bs_\bh_\b@_\bg_\bn_\bu_\b._\bo_\br_\bg or post them to the Usenet newsgroup
g\bgn\bnu\bu.\b.b\bba\bas\bsh\bh.\b.b\bbu\bug\bg.
ALL bug reports should include:
A description of the bug behavior
A short script or "recipe" which exercises the bug
- _\bb_\ba_\bs_\bh_\bb_\bu_\bg inserts the first three items automatically into the template
+ _\bb_\ba_\bs_\bh_\bb_\bu_\bg inserts the first three items automatically into the template
it provides for filing a bug report.
Comments and bug reports concerning this manual page should be directed
Shell builtin commands and functions are not stoppable/restartable.
- Compound commands and command lists of the form "a ; b ; c" are not
- handled gracefully when combined with process suspension. When a
- process is stopped, the shell immediately executes the next command in
- the list or breaks out of any existing loops. It suffices to enclose
- the command in parentheses to force it into a subshell, which may be
- stopped as a unit, or to start the command in the background and imme-
+ Compound commands and command lists of the form "a ; b ; c" are not
+ handled gracefully when combined with process suspension. When a
+ process is stopped, the shell immediately executes the next command in
+ the list or breaks out of any existing loops. It suffices to enclose
+ the command in parentheses to force it into a subshell, which may be
+ stopped as a unit, or to start the command in the background and imme-
diately bring it into the foreground.
Array variables may not (yet) be exported.
-GNU Bash 5.3 2025 April 7 _\bB_\bA_\bS_\bH(1)
+GNU Bash 5.3 2025 July 30 _\bB_\bA_\bS_\bH(1)