commit bash-20150821 snapshot

This commit is contained in:
Chet Ramey
2015-09-01 14:44:52 -04:00
parent f2d7e1a3bc
commit d7935593ab
56 changed files with 8050 additions and 7726 deletions
+243 -237
View File
@@ -221,7 +221,7 @@ DDEEFFIINNIITTIIOONNSS
mmeettaacchhaarraacctteerr
A character that, when unquoted, separates words. One of the
following:
|| && ;; (( )) << >> ssppaaccee ttaabb
|| && ;; (( )) << >> ssppaaccee ttaabb nneewwlliinnee
ccoonnttrrooll ooppeerraattoorr
A _t_o_k_e_n that performs a control function. It is one of the fol-
lowing symbols:
@@ -824,6 +824,10 @@ PPAARRAAMMEETTEERRSS
($${{BBAASSHH__SSOOUURRCCEE[[_$_i_+_1]]}}) where $${{FFUUNNCCNNAAMMEE[[_$_i]]}} was called (or
$${{BBAASSHH__LLIINNEENNOO[[_$_i_-_1]]}} if referenced within another shell func-
tion). Use LLIINNEENNOO to obtain the current line number.
BBAASSHH__LLOOAADDAABBLLEESS__PPAATTHH
A colon-separated list of directories in which the shell looks
for dynamically loadable builtins specified by the eennaabbllee com-
mand.
BBAASSHH__RREEMMAATTCCHH
An array variable whose members are assigned by the ==~~ binary
operator to the [[[[ conditional command. The element with index
@@ -915,9 +919,9 @@ PPAARRAAMMEETTEERRSS
is the name of any currently-executing shell function. The bot-
tom-most element (the one with the highest index) is "main".
This variable exists only when a shell function is executing.
Assignments to FFUUNNCCNNAAMMEE have no effect and return an error sta-
tus. If FFUUNNCCNNAAMMEE is unset, it loses its special properties,
even if it is subsequently reset.
Assignments to FFUUNNCCNNAAMMEE have no effect. If FFUUNNCCNNAAMMEE is unset,
it loses its special properties, even if it is subsequently
reset.
This variable can be used with BBAASSHH__LLIINNEENNOO and BBAASSHH__SSOOUURRCCEE.
Each element of FFUUNNCCNNAAMMEE has corresponding elements in
@@ -927,9 +931,9 @@ PPAARRAAMMEETTEERRSS
ccaalllleerr builtin displays the current call stack using this infor-
mation.
GGRROOUUPPSS An array variable containing the list of groups of which the
current user is a member. Assignments to GGRROOUUPPSS have no effect
and return an error status. If GGRROOUUPPSS is unset, it loses its
special properties, even if it is subsequently reset.
current user is a member. Assignments to GGRROOUUPPSS have no effect.
If GGRROOUUPPSS is unset, it loses its special properties, even if it
is subsequently reset.
HHIISSTTCCMMDD
The history number, or index in the history list, of the current
command. If HHIISSTTCCMMDD is unset, it loses its special properties,
@@ -3979,55 +3983,56 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
Unless otherwise noted, each builtin command documented in this section
as accepting options preceded by -- accepts ---- to signify the end of the
options. The ::, ttrruuee, ffaallssee, and tteesstt builtins do not accept options
and do not treat ---- specially. The eexxiitt, llooggoouutt, bbrreeaakk, ccoonnttiinnuuee, lleett,
and sshhiifftt builtins accept and process arguments beginning with -- with-
out requiring ----. Other builtins that accept arguments but are not
specified as accepting options interpret arguments beginning with -- as
invalid options and require ---- to prevent this interpretation.
and do not treat ---- specially. The eexxiitt, llooggoouutt, rreettuurrnn, bbrreeaakk, ccoonn--
ttiinnuuee, lleett, and sshhiifftt builtins accept and process arguments beginning
with -- without requiring ----. Other builtins that accept arguments but
are not specified as accepting options interpret arguments beginning
with -- as invalid options and require ---- to prevent this interpreta-
tion.
:: [_a_r_g_u_m_e_n_t_s]
No effect; the command does nothing beyond expanding _a_r_g_u_m_e_n_t_s
No effect; the command does nothing beyond expanding _a_r_g_u_m_e_n_t_s
and performing any specified redirections. The return status is
zero.
.. _f_i_l_e_n_a_m_e [_a_r_g_u_m_e_n_t_s]
ssoouurrccee _f_i_l_e_n_a_m_e [_a_r_g_u_m_e_n_t_s]
Read and execute commands from _f_i_l_e_n_a_m_e in the current shell
environment and return the exit status of the last command exe-
cuted from _f_i_l_e_n_a_m_e. If _f_i_l_e_n_a_m_e does not contain a slash,
filenames in PPAATTHH are used to find the directory containing
Read and execute commands from _f_i_l_e_n_a_m_e in the current shell
environment and return the exit status of the last command exe-
cuted from _f_i_l_e_n_a_m_e. If _f_i_l_e_n_a_m_e does not contain a slash,
filenames in PPAATTHH are used to find the directory containing
_f_i_l_e_n_a_m_e. The file searched for in PPAATTHH need not be executable.
When bbaasshh is not in _p_o_s_i_x _m_o_d_e, the current directory is
searched if no file is found in PPAATTHH. If the ssoouurrcceeppaatthh option
to the sshhoopptt builtin command is turned off, the PPAATTHH is not
searched. If any _a_r_g_u_m_e_n_t_s are supplied, they become the posi-
tional parameters when _f_i_l_e_n_a_m_e is executed. Otherwise the
positional parameters are unchanged. If the --TT option is
enabled, ssoouurrccee inherits any trap on DDEEBBUUGG; if it is not, any
DDEEBBUUGG trap string is saved and restored around the call to
ssoouurrccee, and ssoouurrccee unsets the DDEEBBUUGG trap while it executes. If
--TT is not set, and the sourced file changes the DDEEBBUUGG trap, the
new value is retained when ssoouurrccee completes. The return status
When bbaasshh is not in _p_o_s_i_x _m_o_d_e, the current directory is
searched if no file is found in PPAATTHH. If the ssoouurrcceeppaatthh option
to the sshhoopptt builtin command is turned off, the PPAATTHH is not
searched. If any _a_r_g_u_m_e_n_t_s are supplied, they become the posi-
tional parameters when _f_i_l_e_n_a_m_e is executed. Otherwise the
positional parameters are unchanged. If the --TT option is
enabled, ssoouurrccee inherits any trap on DDEEBBUUGG; if it is not, any
DDEEBBUUGG trap string is saved and restored around the call to
ssoouurrccee, and ssoouurrccee unsets the DDEEBBUUGG trap while it executes. If
--TT is not set, and the sourced file changes the DDEEBBUUGG trap, the
new value is retained when ssoouurrccee completes. The return status
is the status of the last command exited within the script (0 if
no commands are executed), and false if _f_i_l_e_n_a_m_e is not found or
cannot be read.
aalliiaass [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
AAlliiaass with no arguments or with the --pp option prints the list of
aliases in the form aalliiaass _n_a_m_e=_v_a_l_u_e on standard output. When
arguments are supplied, an alias is defined for each _n_a_m_e whose
_v_a_l_u_e is given. A trailing space in _v_a_l_u_e causes the next word
aliases in the form aalliiaass _n_a_m_e=_v_a_l_u_e on standard output. When
arguments are supplied, an alias is defined for each _n_a_m_e whose
_v_a_l_u_e is given. A trailing space in _v_a_l_u_e causes the next word
to be checked for alias substitution when the alias is expanded.
For each _n_a_m_e in the argument list for which no _v_a_l_u_e is sup-
plied, the name and value of the alias is printed. AAlliiaass
returns true unless a _n_a_m_e is given for which no alias has been
For each _n_a_m_e in the argument list for which no _v_a_l_u_e is sup-
plied, the name and value of the alias is printed. AAlliiaass
returns true unless a _n_a_m_e is given for which no alias has been
defined.
bbgg [_j_o_b_s_p_e_c ...]
Resume each suspended job _j_o_b_s_p_e_c in the background, as if it
Resume each suspended job _j_o_b_s_p_e_c in the background, as if it
had been started with &&. If _j_o_b_s_p_e_c is not present, the shell's
notion of the _c_u_r_r_e_n_t _j_o_b is used. bbgg _j_o_b_s_p_e_c returns 0 unless
run when job control is disabled or, when run with job control
enabled, any specified _j_o_b_s_p_e_c was not found or was started
notion of the _c_u_r_r_e_n_t _j_o_b is used. bbgg _j_o_b_s_p_e_c returns 0 unless
run when job control is disabled or, when run with job control
enabled, any specified _j_o_b_s_p_e_c was not found or was started
without job control.
bbiinndd [--mm _k_e_y_m_a_p] [--llppssvvPPSSVVXX]
@@ -4036,28 +4041,28 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
bbiinndd [--mm _k_e_y_m_a_p] --xx _k_e_y_s_e_q:_s_h_e_l_l_-_c_o_m_m_a_n_d
bbiinndd [--mm _k_e_y_m_a_p] _k_e_y_s_e_q:_f_u_n_c_t_i_o_n_-_n_a_m_e
bbiinndd [--mm _k_e_y_m_a_p] _k_e_y_s_e_q:_r_e_a_d_l_i_n_e_-_c_o_m_m_a_n_d
Display current rreeaaddlliinnee key and function bindings, bind a key
sequence to a rreeaaddlliinnee function or macro, or set a rreeaaddlliinnee
variable. Each non-option argument is a command as it would
appear in _._i_n_p_u_t_r_c, but each binding or command must be passed
as a separate argument; e.g., '"\C-x\C-r": re-read-init-file'.
Display current rreeaaddlliinnee key and function bindings, bind a key
sequence to a rreeaaddlliinnee function or macro, or set a rreeaaddlliinnee
variable. Each non-option argument is a command as it would
appear in _._i_n_p_u_t_r_c, but each binding or command must be passed
as a separate argument; e.g., '"\C-x\C-r": re-read-init-file'.
Options, if supplied, have the following meanings:
--mm _k_e_y_m_a_p
Use _k_e_y_m_a_p as the keymap to be affected by the subsequent
bindings. Acceptable _k_e_y_m_a_p names are _e_m_a_c_s_, _e_m_a_c_s_-_s_t_a_n_-
_d_a_r_d_, _e_m_a_c_s_-_m_e_t_a_, _e_m_a_c_s_-_c_t_l_x_, _v_i_, _v_i_-_m_o_v_e_, _v_i_-_c_o_m_m_a_n_d,
and _v_i_-_i_n_s_e_r_t. _v_i is equivalent to _v_i_-_c_o_m_m_a_n_d; _e_m_a_c_s is
_d_a_r_d_, _e_m_a_c_s_-_m_e_t_a_, _e_m_a_c_s_-_c_t_l_x_, _v_i_, _v_i_-_m_o_v_e_, _v_i_-_c_o_m_m_a_n_d,
and _v_i_-_i_n_s_e_r_t. _v_i is equivalent to _v_i_-_c_o_m_m_a_n_d; _e_m_a_c_s is
equivalent to _e_m_a_c_s_-_s_t_a_n_d_a_r_d.
--ll List the names of all rreeaaddlliinnee functions.
--pp Display rreeaaddlliinnee function names and bindings in such a
--pp Display rreeaaddlliinnee function names and bindings in such a
way that they can be re-read.
--PP List current rreeaaddlliinnee function names and bindings.
--ss Display rreeaaddlliinnee key sequences bound to macros and the
strings they output in such a way that they can be re-
--ss Display rreeaaddlliinnee key sequences bound to macros and the
strings they output in such a way that they can be re-
read.
--SS Display rreeaaddlliinnee key sequences bound to macros and the
--SS Display rreeaaddlliinnee key sequences bound to macros and the
strings they output.
--vv Display rreeaaddlliinnee variable names and values in such a way
--vv Display rreeaaddlliinnee variable names and values in such a way
that they can be re-read.
--VV List current rreeaaddlliinnee variable names and values.
--ff _f_i_l_e_n_a_m_e
@@ -4069,174 +4074,174 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
--rr _k_e_y_s_e_q
Remove any current binding for _k_e_y_s_e_q.
--xx _k_e_y_s_e_q::_s_h_e_l_l_-_c_o_m_m_a_n_d
Cause _s_h_e_l_l_-_c_o_m_m_a_n_d to be executed whenever _k_e_y_s_e_q is
entered. When _s_h_e_l_l_-_c_o_m_m_a_n_d is executed, the shell sets
the RREEAADDLLIINNEE__LLIINNEE variable to the contents of the rreeaadd--
lliinnee line buffer and the RREEAADDLLIINNEE__PPOOIINNTT variable to the
Cause _s_h_e_l_l_-_c_o_m_m_a_n_d to be executed whenever _k_e_y_s_e_q is
entered. When _s_h_e_l_l_-_c_o_m_m_a_n_d is executed, the shell sets
the RREEAADDLLIINNEE__LLIINNEE variable to the contents of the rreeaadd--
lliinnee line buffer and the RREEAADDLLIINNEE__PPOOIINNTT variable to the
current location of the insertion point. If the executed
command changes the value of RREEAADDLLIINNEE__LLIINNEE or RREEAADD--
LLIINNEE__PPOOIINNTT, those new values will be reflected in the
command changes the value of RREEAADDLLIINNEE__LLIINNEE or RREEAADD--
LLIINNEE__PPOOIINNTT, those new values will be reflected in the
editing state.
--XX List all key sequences bound to shell commands and the
associated commands in a format that can be reused as
--XX List all key sequences bound to shell commands and the
associated commands in a format that can be reused as
input.
The return value is 0 unless an unrecognized option is given or
The return value is 0 unless an unrecognized option is given or
an error occurred.
bbrreeaakk [_n]
Exit from within a ffoorr, wwhhiillee, uunnttiill, or sseelleecctt loop. If _n is
specified, break _n levels. _n must be >= 1. If _n is greater
than the number of enclosing loops, all enclosing loops are
exited. The return value is 0 unless _n is not greater than or
Exit from within a ffoorr, wwhhiillee, uunnttiill, or sseelleecctt loop. If _n is
specified, break _n levels. _n must be >= 1. If _n is greater
than the number of enclosing loops, all enclosing loops are
exited. The return value is 0 unless _n is not greater than or
equal to 1.
bbuuiillttiinn _s_h_e_l_l_-_b_u_i_l_t_i_n [_a_r_g_u_m_e_n_t_s]
Execute the specified shell builtin, passing it _a_r_g_u_m_e_n_t_s, and
Execute the specified shell builtin, passing it _a_r_g_u_m_e_n_t_s, and
return its exit status. This is useful when defining a function
whose name is the same as a shell builtin, retaining the func-
whose name is the same as a shell builtin, retaining the func-
tionality of the builtin within the function. The ccdd builtin is
commonly redefined this way. The return status is false if
commonly redefined this way. The return status is false if
_s_h_e_l_l_-_b_u_i_l_t_i_n is not a shell builtin command.
ccaalllleerr [_e_x_p_r]
Returns the context of any active subroutine call (a shell func-
tion or a script executed with the .. or ssoouurrccee builtins). With-
out _e_x_p_r, ccaalllleerr displays the line number and source filename of
the current subroutine call. If a non-negative integer is sup-
the current subroutine call. If a non-negative integer is sup-
plied as _e_x_p_r, ccaalllleerr displays the line number, subroutine name,
and source file corresponding to that position in the current
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 _e_x_p_r does not correspond to a valid position in
and source file corresponding to that position in the current
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 _e_x_p_r does not correspond to a valid position in
the call stack.
ccdd [--LL|[--PP [--ee]] [-@]] [_d_i_r]
Change the current directory to _d_i_r. if _d_i_r is not supplied,
the value of the HHOOMMEE shell variable is the default. Any addi-
Change the current directory to _d_i_r. if _d_i_r is not supplied,
the value of the HHOOMMEE shell variable is the default. Any addi-
tional arguments following _d_i_r are ignored. The variable CCDDPPAATTHH
defines the search path for the directory containing _d_i_r: each
directory name in CCDDPPAATTHH is searched for _d_i_r. Alternative
directory names in CCDDPPAATTHH are separated by a colon (:). A null
directory name in CCDDPPAATTHH is the same as the current directory,
defines the search path for the directory containing _d_i_r: each
directory name in CCDDPPAATTHH is searched for _d_i_r. Alternative
directory names in CCDDPPAATTHH are separated by a colon (:). A null
directory name in CCDDPPAATTHH is the same as the current directory,
i.e., ``..''. If _d_i_r begins with a slash (/), then CCDDPPAATTHH is not
used. The --PP option causes ccdd to use the physical directory
structure by resolving symbolic links while traversing _d_i_r and
used. The --PP option causes ccdd to use the physical directory
structure by resolving symbolic links while traversing _d_i_r and
before processing instances of _._. in _d_i_r (see also the --PP option
to the sseett builtin command); the --LL option forces symbolic links
to be followed by resolving the link after processing instances
to be followed by resolving the link after processing instances
of _._. in _d_i_r. If _._. appears in _d_i_r, it is processed by removing
the immediately previous pathname component from _d_i_r, back to a
slash or the beginning of _d_i_r. If the --ee option is supplied
with --PP, and the current working directory cannot be success-
fully determined after a successful directory change, ccdd will
return an unsuccessful status. On systems that support it, the
--@@ option presents the extended attributes associated with a
file as a directory. An argument of -- is converted to $$OOLLDDPPWWDD
the immediately previous pathname component from _d_i_r, back to a
slash or the beginning of _d_i_r. If the --ee option is supplied
with --PP, and the current working directory cannot be success-
fully determined after a successful directory change, ccdd will
return an unsuccessful status. On systems that support it, the
--@@ option presents the extended attributes associated with a
file as a directory. An argument of -- is converted to $$OOLLDDPPWWDD
before the directory change is attempted. If a non-empty direc-
tory name from CCDDPPAATTHH is used, or if -- is the first argument,
tory name from CCDDPPAATTHH is used, or if -- is the first argument,
and the directory change is successful, the absolute pathname of
the new working directory is written to the standard output.
The return value is true if the directory was successfully
the new working directory is written to the standard output.
The return value is true if the directory was successfully
changed; false otherwise.
ccoommmmaanndd [--ppVVvv] _c_o_m_m_a_n_d [_a_r_g ...]
Run _c_o_m_m_a_n_d with _a_r_g_s suppressing the normal shell function
Run _c_o_m_m_a_n_d with _a_r_g_s suppressing the normal shell function
lookup. Only builtin commands or commands found in the PPAATTHH are
executed. If the --pp option is given, the search for _c_o_m_m_a_n_d is
performed using a default value for PPAATTHH that is guaranteed to
find all of the standard utilities. If either the --VV or --vv
executed. If the --pp option is given, the search for _c_o_m_m_a_n_d is
performed using a default value for PPAATTHH that is guaranteed to
find all of the standard utilities. If either the --VV or --vv
option is supplied, a description of _c_o_m_m_a_n_d is printed. The --vv
option causes a single word indicating the command or filename
option causes a single word indicating the command or filename
used to invoke _c_o_m_m_a_n_d to be displayed; the --VV option produces a
more verbose description. If the --VV or --vv option is supplied,
the exit status is 0 if _c_o_m_m_a_n_d was found, and 1 if not. If
more verbose description. If the --VV or --vv option is supplied,
the exit status is 0 if _c_o_m_m_a_n_d was found, and 1 if not. If
neither option is supplied and an error occurred or _c_o_m_m_a_n_d can-
not be found, the exit status is 127. Otherwise, the exit sta-
not be found, the exit status is 127. Otherwise, the exit sta-
tus of the ccoommmmaanndd builtin is the exit status of _c_o_m_m_a_n_d.
ccoommppggeenn [_o_p_t_i_o_n] [_w_o_r_d]
Generate possible completion matches for _w_o_r_d according to the
_o_p_t_i_o_ns, which may be any option accepted by the ccoommpplleettee
builtin with the exception of --pp and --rr, and write the matches
to the standard output. When using the --FF or --CC options, the
various shell variables set by the programmable completion
Generate possible completion matches for _w_o_r_d according to the
_o_p_t_i_o_ns, which may be any option accepted by the ccoommpplleettee
builtin with the exception of --pp and --rr, and write the matches
to the standard output. When using the --FF or --CC options, the
various shell variables set by the programmable completion
facilities, while available, will not have useful values.
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 _w_o_r_d is specified,
tion specification with the same flags. If _w_o_r_d is specified,
only those completions matching _w_o_r_d will be displayed.
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.
ccoommpplleettee [--aabbccddeeffggjjkkssuuvv] [--oo _c_o_m_p_-_o_p_t_i_o_n] [--DDEE] [--AA _a_c_t_i_o_n] [--GG _g_l_o_b_-
ccoommpplleettee [--aabbccddeeffggjjkkssuuvv] [--oo _c_o_m_p_-_o_p_t_i_o_n] [--DDEE] [--AA _a_c_t_i_o_n] [--GG _g_l_o_b_-
_p_a_t] [--WW _w_o_r_d_l_i_s_t] [--FF _f_u_n_c_t_i_o_n] [--CC _c_o_m_m_a_n_d]
[--XX _f_i_l_t_e_r_p_a_t] [--PP _p_r_e_f_i_x] [--SS _s_u_f_f_i_x] _n_a_m_e [_n_a_m_e _._._.]
ccoommpplleettee --pprr [--DDEE] [_n_a_m_e ...]
Specify how arguments to each _n_a_m_e should be completed. If the
--pp option is supplied, or if no options are supplied, existing
completion specifications are printed in a way that allows them
Specify how arguments to each _n_a_m_e should be completed. If the
--pp option is supplied, or if no options are supplied, existing
completion specifications are printed in a way that allows them
to be reused as input. The --rr option removes a completion spec-
ification for each _n_a_m_e, or, if no _n_a_m_es are supplied, all com-
ification for each _n_a_m_e, or, if no _n_a_m_es are supplied, all com-
pletion specifications. The --DD option indicates that the
remaining options and actions should apply to the ``default''
command completion; that is, completion attempted on a command
for which no completion has previously been defined. The --EE
option indicates that the remaining options and actions should
apply to ``empty'' command completion; that is, completion
remaining options and actions should apply to the ``default''
command completion; that is, completion attempted on a command
for which no completion has previously been defined. The --EE
option indicates that the remaining options and actions should
apply to ``empty'' command completion; that is, completion
attempted on a blank line.
The process of applying these completion specifications when
word completion is attempted is described above under PPrrooggrraamm--
The process of applying these completion specifications when
word completion is attempted is described above under PPrrooggrraamm--
mmaabbllee CCoommpplleettiioonn.
Other options, if specified, have the following meanings. The
arguments to the --GG, --WW, and --XX options (and, if necessary, the
--PP and --SS options) should be quoted to protect them from expan-
Other options, if specified, have the following meanings. The
arguments to the --GG, --WW, and --XX options (and, if necessary, the
--PP and --SS options) should be quoted to protect them from expan-
sion before the ccoommpplleettee builtin is invoked.
--oo _c_o_m_p_-_o_p_t_i_o_n
The _c_o_m_p_-_o_p_t_i_o_n controls several aspects of the comp-
spec's behavior beyond the simple generation of comple-
The _c_o_m_p_-_o_p_t_i_o_n controls several aspects of the comp-
spec's behavior beyond the simple generation of comple-
tions. _c_o_m_p_-_o_p_t_i_o_n may be one of:
bbaasshhddeeffaauulltt
Perform the rest of the default bbaasshh completions
if the compspec generates no matches.
ddeeffaauulltt Use readline's default filename completion if
ddeeffaauulltt Use readline's default filename completion if
the compspec generates no matches.
ddiirrnnaammeess
Perform directory name completion if the comp-
Perform directory name completion if the comp-
spec generates no matches.
ffiilleennaammeess
Tell readline that the compspec generates file-
names, so it can perform any filename-specific
processing (like adding a slash to directory
names, quoting special characters, or suppress-
ing trailing spaces). Intended to be used with
Tell readline that the compspec generates file-
names, so it can perform any filename-specific
processing (like adding a slash to directory
names, quoting special characters, or suppress-
ing trailing spaces). Intended to be used with
shell functions.
nnooqquuoottee Tell readline not to quote the completed words
if they are filenames (quoting filenames is the
nnooqquuoottee Tell readline not to quote the completed words
if they are filenames (quoting filenames is the
default).
nnoossoorrtt Tell readline not to sort the list of possible
nnoossoorrtt Tell readline not to sort the list of possible
completions alphabetically.
nnoossppaaccee Tell readline not to append a space (the
default) to words completed at the end of the
nnoossppaaccee Tell readline not to append a space (the
default) to words completed at the end of the
line.
pplluussddiirrss
After any matches defined by the compspec are
generated, directory name completion is
attempted and any matches are added to the
After any matches defined by the compspec are
generated, directory name completion is
attempted and any matches are added to the
results of the other actions.
--AA _a_c_t_i_o_n
The _a_c_t_i_o_n may be one of the following to generate a
The _a_c_t_i_o_n may be one of the following to generate a
list of possible completions:
aalliiaass Alias names. May also be specified as --aa.
aarrrraayyvvaarr
Array variable names.
bbiinnddiinngg RReeaaddlliinnee key binding names.
bbuuiillttiinn Names of shell builtin commands. May also be
bbuuiillttiinn Names of shell builtin commands. May also be
specified as --bb.
ccoommmmaanndd Command names. May also be specified as --cc.
ddiirreeccttoorryy
@@ -4244,7 +4249,7 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
ddiissaabblleedd
Names of disabled shell builtins.
eennaabblleedd Names of enabled shell builtins.
eexxppoorrtt Names of exported shell variables. May also be
eexxppoorrtt Names of exported shell variables. May also be
specified as --ee.
ffiillee File names. May also be specified as --ff.
ffuunnccttiioonn
@@ -4253,17 +4258,17 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
hheellppttooppiicc
Help topics as accepted by the hheellpp builtin.
hhoossttnnaammee
Hostnames, as taken from the file specified by
Hostnames, as taken from the file specified by
the HHOOSSTTFFIILLEE shell variable.
jjoobb Job names, if job control is active. May also
jjoobb Job names, if job control is active. May also
be specified as --jj.
kkeeyywwoorrdd Shell reserved words. May also be specified as
kkeeyywwoorrdd Shell reserved words. May also be specified as
--kk.
rruunnnniinngg Names of running jobs, if job control is active.
sseerrvviiccee Service names. May also be specified as --ss.
sseettoopptt Valid arguments for the --oo option to the sseett
sseettoopptt Valid arguments for the --oo option to the sseett
builtin.
sshhoopptt Shell option names as accepted by the sshhoopptt
sshhoopptt Shell option names as accepted by the sshhoopptt
builtin.
ssiiggnnaall Signal names.
ssttooppppeedd Names of stopped jobs, if job control is active.
@@ -4272,148 +4277,149 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
Names of all shell variables. May also be spec-
ified as --vv.
--CC _c_o_m_m_a_n_d
_c_o_m_m_a_n_d is executed in a subshell environment, and its
_c_o_m_m_a_n_d is executed in a subshell environment, and its
output is used as the possible completions.
--FF _f_u_n_c_t_i_o_n
The shell function _f_u_n_c_t_i_o_n is executed in the current
shell environment. When the function is executed, the
first argument ($$11) is the name of the command whose
arguments are being completed, the second argument ($$22)
The shell function _f_u_n_c_t_i_o_n is executed in the current
shell environment. When the function is executed, the
first argument ($$11) is the name of the command whose
arguments are being completed, the second argument ($$22)
is the word being completed, and the third argument ($$33)
is the word preceding the word being completed on the
current command line. When it finishes, the possible
completions are retrieved from the value of the CCOOMMPPRREE--
is the word preceding the word being completed on the
current command line. When it finishes, the possible
completions are retrieved from the value of the CCOOMMPPRREE--
PPLLYY array variable.
--GG _g_l_o_b_p_a_t
The pathname expansion pattern _g_l_o_b_p_a_t is expanded to
The pathname expansion pattern _g_l_o_b_p_a_t is expanded to
generate the possible completions.
--PP _p_r_e_f_i_x
_p_r_e_f_i_x is added at the beginning of each possible com-
_p_r_e_f_i_x is added at the beginning of each possible com-
pletion after all other options have been applied.
--SS _s_u_f_f_i_x
_s_u_f_f_i_x is appended to each possible completion after all
other options have been applied.
--WW _w_o_r_d_l_i_s_t
The _w_o_r_d_l_i_s_t is split using the characters in the IIFFSS
special variable as delimiters, and each resultant word
is expanded. The possible completions are the members
of the resultant list which match the word being com-
The _w_o_r_d_l_i_s_t is split using the characters in the IIFFSS
special variable as delimiters, and each resultant word
is expanded. The possible completions are the members
of the resultant list which match the word being com-
pleted.
--XX _f_i_l_t_e_r_p_a_t
_f_i_l_t_e_r_p_a_t is a pattern as used for pathname expansion.
_f_i_l_t_e_r_p_a_t 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 _f_i_l_t_e_r_p_a_t is removed from the list.
A leading !! in _f_i_l_t_e_r_p_a_t negates the pattern; in this
ated by the preceding options and arguments, and each
completion matching _f_i_l_t_e_r_p_a_t is removed from the list.
A leading !! in _f_i_l_t_e_r_p_a_t negates the pattern; in this
case, any completion not matching _f_i_l_t_e_r_p_a_t is removed.
The return value is true unless an invalid option is supplied,
an option other than --pp or --rr is supplied without a _n_a_m_e argu-
ment, an attempt is made to remove a completion specification
The return value is true unless an invalid option is supplied,
an option other than --pp or --rr is supplied without a _n_a_m_e argu-
ment, an attempt is made to remove a completion specification
for a _n_a_m_e for which no specification exists, or an error occurs
adding a completion specification.
ccoommppoopptt [--oo _o_p_t_i_o_n] [--DDEE] [++oo _o_p_t_i_o_n] [_n_a_m_e]
Modify completion options for each _n_a_m_e according to the
_o_p_t_i_o_ns, or for the currently-executing completion if no _n_a_m_es
are supplied. If no _o_p_t_i_o_ns are given, display the completion
options for each _n_a_m_e or the current completion. The possible
values of _o_p_t_i_o_n are those valid for the ccoommpplleettee builtin
described above. The --DD option indicates that the remaining
_o_p_t_i_o_ns, or for the currently-executing completion if no _n_a_m_es
are supplied. If no _o_p_t_i_o_ns are given, display the completion
options for each _n_a_m_e or the current completion. The possible
values of _o_p_t_i_o_n are those valid for the ccoommpplleettee builtin
described above. The --DD option indicates that the remaining
options should apply to the ``default'' command completion; that
is, completion attempted on a command for which no completion
has previously been defined. The --EE option indicates that the
remaining options should apply to ``empty'' command completion;
is, completion attempted on a command for which no completion
has previously been defined. The --EE option indicates that the
remaining options should apply to ``empty'' command completion;
that is, completion attempted on a blank line.
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 _n_a_m_e for which no
completion specification exists, or an output error occurs.
ccoonnttiinnuuee [_n]
Resume the next iteration of the enclosing ffoorr, wwhhiillee, uunnttiill, or
sseelleecctt loop. If _n is specified, resume at the _nth enclosing
loop. _n must be >= 1. If _n is greater than the number of
enclosing loops, the last enclosing loop (the ``top-level''
sseelleecctt loop. If _n is specified, resume at the _nth enclosing
loop. _n must be >= 1. If _n is greater than the number of
enclosing loops, the last enclosing loop (the ``top-level''
loop) is resumed. The return value is 0 unless _n is not greater
than or equal to 1.
ddeeccllaarree [--aaAAffFFggiillnnrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
ttyyppeesseett [--aaAAffFFggiillnnrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
Declare variables and/or give them attributes. If no _n_a_m_es are
given then display the values of variables. The --pp option will
Declare variables and/or give them attributes. If no _n_a_m_es are
given then display the values of variables. The --pp option will
display the attributes and values of each _n_a_m_e. When --pp is used
with _n_a_m_e arguments, additional options, other than --ff and --FF,
are ignored. When --pp is supplied without _n_a_m_e arguments, it
will display the attributes and values of all variables having
with _n_a_m_e arguments, additional options, other than --ff and --FF,
are ignored. When --pp is supplied without _n_a_m_e arguments, it
will display the attributes and values of all variables having
the attributes specified by the additional options. If no other
options are supplied with --pp, ddeeccllaarree will display the
attributes and values of all shell variables. The --ff option
will restrict the display to shell functions. The --FF option
inhibits the display of function definitions; only the function
name and attributes are printed. If the eexxttddeebbuugg shell option
is enabled using sshhoopptt, the source file name and line number
where the function is defined are displayed as well. The --FF
option implies --ff. The --gg option forces variables to be created
or modified at the global scope, even when ddeeccllaarree is executed
in a shell function. It is ignored in all other cases. The
following options can be used to restrict output to variables
with the specified attribute or to give variables attributes:
--aa Each _n_a_m_e is an indexed array variable (see AArrrraayyss
options are supplied with --pp, ddeeccllaarree will display the
attributes and values of all shell variables. The --ff option
will restrict the display to shell functions. The --FF option
inhibits the display of function definitions; only the function
name and attributes are printed. If the eexxttddeebbuugg shell option
is enabled using sshhoopptt, the source file name and line number
where each _n_a_m_e is defined are displayed as well. The --FF option
implies --ff. The --gg option forces variables to be created or
modified at the global scope, even when ddeeccllaarree is executed in a
shell function. It is ignored in all other cases. The follow-
ing options can be used to restrict output to variables with the
specified attribute or to give variables attributes:
--aa Each _n_a_m_e is an indexed array variable (see AArrrraayyss
above).
--AA Each _n_a_m_e is an associative array variable (see AArrrraayyss
--AA Each _n_a_m_e is an associative array variable (see AArrrraayyss
above).
--ff Use function names only.
--ii The variable is treated as an integer; arithmetic evalua-
tion (see AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN above) is performed when
tion (see AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN above) is performed when
the variable is assigned a value.
--ll When the variable is assigned a value, all upper-case
characters are converted to lower-case. The upper-case
--ll When the variable is assigned a value, all upper-case
characters are converted to lower-case. The upper-case
attribute is disabled.
--nn Give each _n_a_m_e the _n_a_m_e_r_e_f attribute, making it a name
reference to another variable. That other variable is
defined by the value of _n_a_m_e. All references, assign-
ments, and attribute modifications to _n_a_m_e, except for
changing the --nn attribute itself, are performed on the
variable referenced by _n_a_m_e's value. The nameref
--nn Give each _n_a_m_e the _n_a_m_e_r_e_f attribute, making it a name
reference to another variable. That other variable is
defined by the value of _n_a_m_e. All references, assign-
ments, and attribute modifications to _n_a_m_e, except for
changing the --nn attribute itself, are performed on the
variable referenced by _n_a_m_e's value. The nameref
attribute cannot be applied to array variables.
--rr Make _n_a_m_es readonly. These names cannot then be assigned
values by subsequent assignment statements or unset.
--tt Give each _n_a_m_e the _t_r_a_c_e attribute. Traced functions
inherit the DDEEBBUUGG and RREETTUURRNN traps from the calling
shell. The trace attribute has no special meaning for
--tt Give each _n_a_m_e the _t_r_a_c_e attribute. Traced functions
inherit the DDEEBBUUGG and RREETTUURRNN traps from the calling
shell. The trace attribute has no special meaning for
variables.
--uu When the variable is assigned a value, all lower-case
characters are converted to upper-case. The lower-case
--uu When the variable is assigned a value, all lower-case
characters are converted to upper-case. The lower-case
attribute is disabled.
--xx Mark _n_a_m_es for export to subsequent commands via the
--xx Mark _n_a_m_es for export to subsequent commands via the
environment.
Using `+' instead of `-' turns off the attribute instead, with
Using `+' instead of `-' turns off the attribute instead, with
the exceptions that ++aa may not be used to destroy an array vari-
able and ++rr will not remove the readonly attribute. When used
able and ++rr will not remove the readonly attribute. When used
in a function, ddeeccllaarree and ttyyppeesseett make each _n_a_m_e local, as with
the llooccaall command, unless the --gg option is supplied. If a vari-
able name is followed by =_v_a_l_u_e, the value of the variable is
set to _v_a_l_u_e. When using --aa or --AA and the compound assignment
syntax to create array variables, additional attributes do not
able name is followed by =_v_a_l_u_e, the value of the variable is
set to _v_a_l_u_e. When using --aa or --AA and the compound 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 attempt is made to
assign a value to a readonly variable, an attempt is made to
assign a value to an array variable without using the compound
assignment syntax (see AArrrraayyss above), one of the _n_a_m_e_s is not a
valid shell variable name, an attempt is made to turn off read-
only status for a readonly variable, an attempt is made to turn
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 attempt is made to
assign a value to an array variable without using the compound
assignment syntax (see AArrrraayyss above), one of the _n_a_m_e_s is not a
valid shell variable name, an attempt is made to turn off read-
only 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 --ff.
ddiirrss [[--ccllppvv]] [[++_n]] [[--_n]]
Without options, displays the list of currently remembered
directories. The default display is on a single line with
directory names separated by spaces. Directories are added to
the list with the ppuusshhdd command; the ppooppdd command removes
entries from the list.
Without options, displays the list of currently remembered
directories. The default display is on a single line with
directory names separated by spaces. Directories are added to
the list with the ppuusshhdd command; the ppooppdd command removes
entries from the list. The current directory is always the
first directory in the stack.
--cc Clears the directory stack by deleting all of the
entries.
--ll Produces a listing using full pathnames; the default
@@ -4867,12 +4873,12 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
ppuusshhdd [--nn] [_d_i_r]
Adds a directory to the top of the directory stack, or rotates
the stack, making the new top of the stack the current working
directory. With no arguments, exchanges the top two directories
and returns 0, unless the directory stack is empty. Arguments,
if supplied, have the following meanings:
--nn Suppresses the normal change of directory when adding
directories to the stack, so that only the stack is
manipulated.
directory. With no arguments, ppuusshhdd exchanges the top two
directories and returns 0, unless the directory stack is empty.
Arguments, if supplied, have the following meanings:
--nn Suppresses the normal change of directory when rotating
or adding directories to the stack, so that only the
stack is manipulated.
++_n Rotates the stack so that the _nth directory (counting
from the left of the list shown by ddiirrss, starting with
zero) is at the top.
@@ -5848,4 +5854,4 @@ BBUUGGSS
GNU Bash 4.4 2015 June 11 BASH(1)
GNU Bash 4.4 2015 August 15 BASH(1)