diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog index 08812fcf..bfcd1dcd 100644 --- a/CWRU/CWRU.chlog +++ b/CWRU/CWRU.chlog @@ -13548,3 +13548,52 @@ lib/readline/util.c,lib/readline/rlprivate.h - _rl_abort_internal: now a void function with noreturn attribute; changed callers to accommodate + 11/06 + ----- +variables.c,builtins/hash.def + - in a restricted shell, disallow `hash -p' and assigning to BASH_CMDS. + Report from https://savannah.gnu.org/bugs/index.php?68870 + + 11/9 + ---- +subst.h + - SX_SKIPDQ: new flag value for string_extract_double_quoted, means to + leave unescaped double quotes intact in the returned string for the + caller to handle + +subst.c + - string_extract_double_quoted: if (FLAGS & SX_SKIPDQ), treat unescaped + double quotes in the string the same as SX_STRIPDQ, but leave them + in the returned string + - expand_word_internal: if we have an unescaped double quote in a + double-quoted string, add it only if FLAGS does not include + W_EXPANDRHS, indicating that we're expanding the rhs of a parameter + expansion and the caller will deal with them + - parameter_brace_expand_rhs: if processing a double-quoted string, + call string_extract_double_quoted with SX_SKIPDQ to leave unescaped + double quotes in place for a subsequent expand_string_for_rhs to + deal with. Fixes bug with double-quoted variable expansions on the + rhs potentially expanding the wrong variable name + Report from https://savannah.gnu.org/bugs/index.php?68886 + + 11/10 + ----- +execute_cmd.c + - execute_subshell_builtin_or_function: if we're not going to be running + an exit trap, don't bother trying to make redirections undoable + Report from Koichi Murase + + 11/11 + ----- +execute_cmd.c + - parameter_brace_expand_rhs: make the use of SX_STRIPDQ/SX_SKIPDQ + dependent on the compatibility level; if <= 53, use the same + SX_STRIPDQ flag as in previous versions + +builtins/evalstring.c + - parse_and_execute: when encountering an error while executing a + shell function with errexit enabled, we should only discard the + most recent `pe_dispose' unwind-protect if COMMAND is non-null, + since that is when we set it and we don't want to stomp on a + previous unwind-protect frame + Report from Константин Адзер diff --git a/builtins/evalstring.c b/builtins/evalstring.c index 4b1cc9ee..a8ba3648 100644 --- a/builtins/evalstring.c +++ b/builtins/evalstring.c @@ -386,10 +386,11 @@ parse_and_execute (char *string, const char *from_file, int flags) XXX - change that if we want the function context to be unwound. */ if (exit_immediately_on_error && variable_context) - { - discard_unwind_frame ("pe_dispose"); - reset_local_contexts (); /* not in a function */ - } + { + if (command) + discard_unwind_frame ("pe_dispose"); + reset_local_contexts (); /* not in a function */ + } should_jump_to_top_level = 1; goto out; case FORCE_EOF: diff --git a/builtins/hash.def b/builtins/hash.def index 57c3bb7f..28a59090 100644 --- a/builtins/hash.def +++ b/builtins/hash.def @@ -156,27 +156,11 @@ hash_builtin (WORD_LIST *list) #if defined (RESTRICTED_SHELL) if (restricted && pathname) { - if (absolute_program (pathname)) - { - newfn = printable_filename (pathname, 0); - sh_restricted (newfn); - if (newfn != pathname) - free (newfn); - return (EXECUTION_FAILURE); - } - /* If we are changing the hash table in a restricted shell, make sure the - target pathname can be found using a $PATH search. */ - w = find_user_command (pathname); - if (w == 0 || *w == 0 || executable_file (w) == 0) - { - newfn = printable_filename (pathname, 0); - sh_notfound (newfn); - if (newfn != pathname) - free (newfn); - free (w); - return (EXECUTION_FAILURE); - } - free (w); + newfn = printable_filename (pathname, 0); + sh_restricted (newfn); + if (newfn != pathname) + free (newfn); + return (EXECUTION_FAILURE); } #endif diff --git a/doc/bash.0 b/doc/bash.0 index 359f699d..320d09b4 100644 --- a/doc/bash.0 +++ b/doc/bash.0 @@ -4878,7 +4878,7 @@ HHIISSTTOORRYY EEXXPPAANNSSIIOONN acter. Several shell options settable with the sshhoopptt builtin will modify history - expansion behavior (see the description of the sshhoopptt builtin below).and If + expansion behavior (see the description of the sshhoopptt builtin below). If the hhiissttvveerriiffyy shell option is enabled, and rreeaaddlliinnee is being used, history substitutions are not immediately passed to the shell parser. Instead, the expanded line is reloaded into the rreeaaddlliinnee editing buffer for further mod- @@ -5823,7 +5823,7 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS The return status is zero unless a _n_a_m_e is not found or an invalid option is supplied. - hheellpp [--ddmmss] [_p_a_t_t_e_r_n] + hheellpp [--ddmmssLL] [_p_a_t_t_e_r_n] Display helpful information about builtin commands. If _p_a_t_t_e_r_n is specified, hheellpp gives detailed help on all commands matching _p_a_t_t_e_r_n as described below; otherwise it displays a list of all the builtins @@ -5835,13 +5835,16 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS --mm Display the description of each _p_a_t_t_e_r_n in a manpage-like format --ss Display only a short usage synopsis for each _p_a_t_t_e_r_n + --LL When displaying a list of all the builtins and shell compound + commands, display each item using a single column instead of + using multiple columns. - If _p_a_t_t_e_r_n contains pattern matching characters (see PPaatttteerrnn MMaattcchh-- - iinngg above) it's treated as a shell pattern and hheellpp prints the de- + If _p_a_t_t_e_r_n contains pattern matching characters (see PPaatttteerrnn MMaattcchh-- + iinngg above) it's treated as a shell pattern and hheellpp prints the de- scription of each help topic matching _p_a_t_t_e_r_n. - If not, and _p_a_t_t_e_r_n exactly matches the name of a help topic, hheellpp - prints the description associated with that topic. Otherwise, hheellpp + If not, and _p_a_t_t_e_r_n exactly matches the name of a help topic, hheellpp + prints the description associated with that topic. Otherwise, hheellpp performs prefix matching and prints the descriptions of all matching help topics. @@ -5853,142 +5856,142 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS hhiissttoorryy --aannrrww [_f_i_l_e_n_a_m_e] hhiissttoorryy --pp _a_r_g [_a_r_g ...] hhiissttoorryy --ss _a_r_g [_a_r_g ...] - With no options, or with the --HH option, display the portion of the - command history list specified by _r_a_n_g_e, as described below. If - _r_a_n_g_e is not specified, display the entire history list. Without - --HH, display the list with command numbers, prefixing entries that + With no options, or with the --HH option, display the portion of the + command history list specified by _r_a_n_g_e, as described below. If + _r_a_n_g_e is not specified, display the entire history list. Without + --HH, display the list with command numbers, prefixing entries that have been modified with a "*". - A _r_a_n_g_e argument is specified in the form of a number _o_f_f_s_e_t or a - range _s_t_a_r_t-_e_n_d. If _o_f_f_s_e_t is supplied, it references the history + A _r_a_n_g_e argument is specified in the form of a number _o_f_f_s_e_t or a + range _s_t_a_r_t-_e_n_d. If _o_f_f_s_e_t is supplied, it references the history entry at position _o_f_f_s_e_t in the history list; when listing this dis- - plays the last _o_f_f_s_e_t entries. A negative _o_f_f_s_e_t counts back from - the end of the history list, relative to one greater than the last - history position. When listing, negative and positive _o_f_f_s_e_t_s have - identical results. _s_t_a_r_t and _e_n_d, if supplied, reference the por- - tion of the history list beginning at position _s_t_a_r_t through posi- - tion _e_n_d. If _s_t_a_r_t or _e_n_d are negative, they count back from the - end of the history list. When listing, if _s_t_a_r_t is greater than - _e_n_d, the history entries are displayed in reverse order from _e_n_d to + plays the last _o_f_f_s_e_t entries. A negative _o_f_f_s_e_t counts back from + the end of the history list, relative to one greater than the last + history position. When listing, negative and positive _o_f_f_s_e_t_s have + identical results. _s_t_a_r_t and _e_n_d, if supplied, reference the por- + tion of the history list beginning at position _s_t_a_r_t through posi- + tion _e_n_d. If _s_t_a_r_t or _e_n_d are negative, they count back from the + end of the history list. When listing, if _s_t_a_r_t is greater than + _e_n_d, the history entries are displayed in reverse order from _e_n_d to _s_t_a_r_t. If the shell variable HHIISSTTTTIIMMEEFFOORRMMAATT is set and not null, it is used as a format string for _s_t_r_f_t_i_m_e(3) to display the time stamp associ- - ated with each displayed history entry. If hhiissttoorryy uses HHIISSTTTTIIMMEE-- + ated with each displayed history entry. If hhiissttoorryy uses HHIISSTTTTIIMMEE-- FFOORRMMAATT, it does not print an intervening space between the formatted time stamp and the history entry. - If _f_i_l_e_n_a_m_e is supplied, hhiissttoorryy uses it as the name of the history - file; if not, it uses the value of HHIISSTTFFIILLEE. If _f_i_l_e_n_a_m_e is not - supplied and HHIISSTTFFIILLEE is unset or null, the --aa,, --nn,, --rr,, and --ww op- + If _f_i_l_e_n_a_m_e is supplied, hhiissttoorryy uses it as the name of the history + file; if not, it uses the value of HHIISSTTFFIILLEE. If _f_i_l_e_n_a_m_e is not + supplied and HHIISSTTFFIILLEE is unset or null, the --aa,, --nn,, --rr,, and --ww op- tions have no effect. Options, if supplied, have the following meanings: --cc Clear the history list by deleting all the entries. This can be used with the other options to replace the history list. --dd _r_a_n_g_e - Delete the history entries specified by _r_a_n_g_e, as described - above. An index of -1 refers to the current hhiissttoorryy --dd com- + Delete the history entries specified by _r_a_n_g_e, as described + above. An index of -1 refers to the current hhiissttoorryy --dd com- mand. --HH Display the selected history entries in the format that would - be written to the history file, including any time stamp in- - formation as described below, without prefixing the entry + be written to the history file, including any time stamp in- + formation as described below, without prefixing the entry with any line number or "*". - --aa Append the "new" history lines to the history file. These - are history lines entered since the beginning of the current + --aa Append the "new" history lines to the history file. These + are history lines entered since the beginning of the current bbaasshh session, but not already appended to the history file. --nn 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 cur- + and add them to the current history list. These are lines + appended to the history file since the beginning of the cur- rent bbaasshh session. - --rr Read the history file and append its contents to the current + --rr Read the history file and append its contents to the current history list. --ww Write the current history list to the history file, overwrit- ing the history file. - --pp Perform history substitution on the following _a_r_g_s and dis- - play the result on the standard output, without storing the + --pp Perform history substitution on the following _a_r_g_s and dis- + play the result on the standard output, without storing the results in the history list. Each _a_r_g must be quoted to dis- able normal history expansion. - --ss Store the _a_r_g_s in the history list as a single entry. The + --ss Store the _a_r_g_s in the history list as a single entry. The last command in the history list is removed before adding the _a_r_g_s. If the HHIISSTTTTIIMMEEFFOORRMMAATT variable is set, hhiissttoorryy writes the time stamp - information associated with each history entry to the history file, - marked with the history comment character as described above. When - the history file is read, lines beginning with the history comment - character followed immediately by a digit are interpreted as time- + information associated with each history entry to the history file, + marked with the history comment character as described above. When + the history file is read, lines beginning with the history comment + character followed immediately by a digit are interpreted as time- stamps 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 invalid + The return value is 0 unless an invalid option is encountered, an + error occurs while reading or writing the history file, an invalid _o_f_f_s_e_t or range is supplied as an argument to --dd, or the history ex- pansion supplied as an argument to --pp fails. jjoobbss [--llnnpprrss] [ _j_o_b_s_p_e_c ... ] jjoobbss --xx _c_o_m_m_a_n_d [ _a_r_g_s ... ] - The first form lists the active jobs. The options have the follow- + The first form lists the active jobs. The options have the follow- ing meanings: --ll List process IDs in addition to the normal information. - --nn Display information only about jobs that have changed status + --nn Display information only about jobs that have changed status since the user was last notified of their status. --pp List only the process ID of the job's process group leader. --rr Display only running jobs. --ss Display only stopped jobs. - If _j_o_b_s_p_e_c is supplied, jjoobbss restricts output to information about - that job. The return status is 0 unless an invalid option is en- + If _j_o_b_s_p_e_c is supplied, jjoobbss restricts output to information about + that job. The return status is 0 unless an invalid option is en- countered or an invalid _j_o_b_s_p_e_c is supplied. - If the --xx option is supplied, jjoobbss replaces any _j_o_b_s_p_e_c found in - _c_o_m_m_a_n_d or _a_r_g_s with the corresponding process group ID, and exe- + If the --xx option is supplied, jjoobbss replaces any _j_o_b_s_p_e_c found in + _c_o_m_m_a_n_d or _a_r_g_s with the corresponding process group ID, and exe- cutes _c_o_m_m_a_n_d, passing it _a_r_g_s, returning its exit status. kkiillll [--ss _s_i_g_s_p_e_c | --nn _s_i_g_n_u_m | --_s_i_g_s_p_e_c] _i_d [ ... ] kkiillll --ll|--LL [_s_i_g_s_p_e_c | _e_x_i_t___s_t_a_t_u_s] - Send the signal specified by _s_i_g_s_p_e_c or _s_i_g_n_u_m to the processes - named by each _i_d. Each _i_d may be a job specification _j_o_b_s_p_e_c or a - process ID _p_i_d. _s_i_g_s_p_e_c is either a case-insensitive signal name + Send the signal specified by _s_i_g_s_p_e_c or _s_i_g_n_u_m to the processes + named by each _i_d. Each _i_d may be a job specification _j_o_b_s_p_e_c or a + process ID _p_i_d. _s_i_g_s_p_e_c is either a case-insensitive signal name such as SSIIGGKKIILLLL (with or without the SSIIGG prefix) or a signal number; - _s_i_g_n_u_m is a signal number. If _s_i_g_s_p_e_c is not supplied, then kkiillll + _s_i_g_n_u_m is a signal number. If _s_i_g_s_p_e_c is not supplied, then kkiillll sends SSIIGGTTEERRMM. The --ll option lists the signal names. If any arguments are supplied - when --ll is given, kkiillll lists the names of the signals corresponding + when --ll is given, kkiillll lists the names of the signals corresponding to the arguments, and the return status is 0. The _e_x_i_t___s_t_a_t_u_s argu- ment to --ll is a number specifying either a signal number or the exit - status of a process terminated by a signal; if it is supplied, kkiillll - prints the name of the signal that caused the process to terminate. - kkiillll assumes that process exit statuses are greater than 128; any- - thing less than that is a signal number. The --LL option is equiva- + status of a process terminated by a signal; if it is supplied, kkiillll + prints the name of the signal that caused the process to terminate. + kkiillll assumes that process exit statuses are greater than 128; any- + thing less than that is a signal number. The --LL option is equiva- lent to --ll. - kkiillll returns true if at least one signal was successfully sent, or + kkiillll returns true if at least one signal was successfully sent, or false if an error occurs or an invalid option is encountered. lleett _a_r_g [_a_r_g ...] - Each _a_r_g is evaluated as an arithmetic expression (see AARRIITTHHMMEETTIICC - EEVVAALLUUAATTIIOONN above). If the last _a_r_g evaluates to 0, lleett returns 1; + Each _a_r_g is evaluated as an arithmetic expression (see AARRIITTHHMMEETTIICC + EEVVAALLUUAATTIIOONN above). If the last _a_r_g evaluates to 0, lleett returns 1; otherwise lleett returns 0. llooccaall [_o_p_t_i_o_n] [_n_a_m_e[=_v_a_l_u_e] ... | - ] - For each argument, create a local variable named _n_a_m_e and assign it - _v_a_l_u_e. The _o_p_t_i_o_n can be any of the options accepted by ddeeccllaarree. + For each argument, create a local variable named _n_a_m_e and assign it + _v_a_l_u_e. The _o_p_t_i_o_n can be any of the options accepted by ddeeccllaarree. When llooccaall is used within a function, it causes the variable _n_a_m_e to - have a visible scope restricted to that function and its children. + have a visible scope restricted to that function and its children. It is an error to use llooccaall when not within a function. - If _n_a_m_e is -, it makes the set of shell options local to the func- - tion in which llooccaall is invoked: any shell options changed using the + If _n_a_m_e is -, it makes the set of shell options local to the func- + tion in which llooccaall is invoked: any shell options changed using the sseett builtin inside the function after the call to llooccaall are restored - to their original values when the function returns. The restore is - performed as if a series of sseett commands were executed to restore + to their original values when the function returns. The restore is + performed as if a series of sseett commands were executed to restore the values that were in place before the function. - With no operands, llooccaall writes a list of local variables to the + With no operands, llooccaall writes a list of local variables to the standard output. - The return status is 0 unless llooccaall is used outside a function, an + The return status is 0 unless llooccaall is used outside a function, an invalid _n_a_m_e is supplied, or _n_a_m_e is a readonly variable. llooggoouutt [[_n]] @@ -5998,370 +6001,370 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS _b_a_c_k] [--cc _q_u_a_n_t_u_m] [_a_r_r_a_y] rreeaaddaarrrraayy [--dd _d_e_l_i_m] [--nn _c_o_u_n_t] [--OO _o_r_i_g_i_n] [--ss _c_o_u_n_t] [--tt] [--uu _f_d] [--CC _c_a_l_l_b_a_c_k] [--cc _q_u_a_n_t_u_m] [_a_r_r_a_y] - Read lines from the standard input, or from file descriptor _f_d if - the --uu option is supplied, into the indexed array variable _a_r_r_a_y. - The variable MMAAPPFFIILLEE is the default _a_r_r_a_y. Options, if supplied, + Read lines from the standard input, or from file descriptor _f_d if + the --uu option is supplied, into the indexed array variable _a_r_r_a_y. + The variable MMAAPPFFIILLEE is the default _a_r_r_a_y. Options, if supplied, have the following meanings: - --dd Use the first character of _d_e_l_i_m to terminate each input - line, rather than newline. If _d_e_l_i_m is the empty string, + --dd Use the first character of _d_e_l_i_m to terminate each input + line, rather than newline. If _d_e_l_i_m is the empty string, mmaappffiillee will terminate a line when it reads a NUL character. --nn Copy at most _c_o_u_n_t lines. If _c_o_u_n_t is 0, copy all lines. - --OO Begin assigning to _a_r_r_a_y at index _o_r_i_g_i_n. The default index + --OO Begin assigning to _a_r_r_a_y at index _o_r_i_g_i_n. The default index is 0. --ss Discard the first _c_o_u_n_t lines read. - --tt Remove a trailing _d_e_l_i_m (default newline) from each line + --tt Remove a trailing _d_e_l_i_m (default newline) from each line read. - --uu Read lines from file descriptor _f_d instead of the standard + --uu Read lines from file descriptor _f_d instead of the standard input. - --CC Evaluate _c_a_l_l_b_a_c_k each time _q_u_a_n_t_u_m lines are read. The --cc + --CC Evaluate _c_a_l_l_b_a_c_k each time _q_u_a_n_t_u_m lines are read. The --cc option specifies _q_u_a_n_t_u_m. - --cc Specify the number of lines read between each call to _c_a_l_l_- + --cc Specify the number of lines read between each call to _c_a_l_l_- _b_a_c_k. - If --CC is specified without --cc, the default quantum is 5000. When - _c_a_l_l_b_a_c_k 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. _c_a_l_l_b_a_c_k is evaluated after the line is + If --CC is specified without --cc, the default quantum is 5000. When + _c_a_l_l_b_a_c_k 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. _c_a_l_l_b_a_c_k is evaluated after the line is read but before the array element is assigned. - If not supplied with an explicit origin, mmaappffiillee will clear _a_r_r_a_y + If not supplied with an explicit origin, mmaappffiillee will clear _a_r_r_a_y before assigning to it. - mmaappffiillee returns zero unless an invalid option or option argument is - supplied, _a_r_r_a_y is invalid or unassignable, or if _a_r_r_a_y is not an + mmaappffiillee returns zero unless an invalid option or option argument is + supplied, _a_r_r_a_y is invalid or unassignable, or if _a_r_r_a_y is not an indexed array. ppooppdd [-nn] [+_n] [-_n] - Remove entries from the directory stack. The elements are numbered - from 0 starting at the first directory listed by ddiirrss, so ppooppdd is - equivalent to "popd +0." With no arguments, ppooppdd removes the top + Remove entries from the directory stack. The elements are numbered + from 0 starting at the first directory listed by ddiirrss, so ppooppdd is + equivalent to "popd +0." With no arguments, ppooppdd removes the top directory from the stack, and changes to the new top directory. Ar- guments, if supplied, have the following meanings: - --nn Suppress the normal change of directory when removing direc- + --nn Suppress the normal change of directory when removing direc- tories from the stack, only manipulate the stack. ++_n Remove the _nth entry counting from the left of the list shown - by ddiirrss, starting with zero, from the stack. For example: + by ddiirrss, starting with zero, from the stack. For example: "popd +0" removes the first directory, "popd +1" the second. - --_n Remove the _nth entry counting from the right of the list - shown by ddiirrss, starting with zero. For example: "popd -0" + --_n Remove the _nth entry counting from the right of the list + shown by ddiirrss, 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 --nn - option was not supplied, ppooppdd uses the ccdd builtin to change to the - directory at the top of the stack. If the ccdd fails, ppooppdd returns a + If the top element of the directory stack is modified, and the --nn + option was not supplied, ppooppdd uses the ccdd builtin to change to the + directory at the top of the stack. If the ccdd fails, ppooppdd returns a non-zero value. - Otherwise, ppooppdd returns false if an invalid option is supplied, the - directory stack is empty, or _n specifies a non-existent directory + Otherwise, ppooppdd returns false if an invalid option is supplied, the + directory stack is empty, or _n specifies a non-existent directory stack entry. - If the ppooppdd command is successful, bbaasshh runs ddiirrss to show the final + If the ppooppdd command is successful, bbaasshh runs ddiirrss to show the final contents of the directory stack, and the return status is 0. pprriinnttff [--vv _v_a_r] _f_o_r_m_a_t [_a_r_g_u_m_e_n_t_s] - Write the formatted _a_r_g_u_m_e_n_t_s to the standard output under the con- - trol of the _f_o_r_m_a_t. The --vv option assigns the output to the vari- + Write the formatted _a_r_g_u_m_e_n_t_s to the standard output under the con- + trol of the _f_o_r_m_a_t. The --vv option assigns the output to the vari- able _v_a_r rather than printing it to the standard output. - The _f_o_r_m_a_t is a character string which contains three types of ob- + The _f_o_r_m_a_t is a character string which contains three types of ob- jects: 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 _a_r_g_u_m_e_n_t. In addition to the stan- - dard _p_r_i_n_t_f(3) format characters ccCCssSSnnddiioouuxxXXeeEEffFFggGGaaAA, pprriinnttff inter- + character escape sequences, which are converted and copied to the + standard output, and format specifications, each of which causes + printing of the next successive _a_r_g_u_m_e_n_t. In addition to the stan- + dard _p_r_i_n_t_f(3) format characters ccCCssSSnnddiioouuxxXXeeEEffFFggGGaaAA, pprriinnttff inter- prets the following additional format specifiers: - %%bb causes pprriinnttff to expand backslash escape sequences in the + %%bb causes pprriinnttff to expand backslash escape sequences in the corresponding _a_r_g_u_m_e_n_t in the same way as eecchhoo --ee. - %%qq causes pprriinnttff to output the corresponding _a_r_g_u_m_e_n_t in a for- + %%qq causes pprriinnttff to output the corresponding _a_r_g_u_m_e_n_t in a for- mat that can be reused as shell input. %%qq and %%QQ use the $$'''' - quoting style if any characters in the argument string re- - quire it, and backslash quoting otherwise. If the format - string uses the _p_r_i_n_t_f alternate form, these two formats + quoting style if any characters in the argument string re- + quire it, and backslash quoting otherwise. If the format + string uses the _p_r_i_n_t_f alternate form, these two formats quote the argument string using single quotes. - %%QQ like %%qq, but applies any supplied precision to the _a_r_g_u_m_e_n_t + %%QQ like %%qq, but applies any supplied precision to the _a_r_g_u_m_e_n_t before quoting it. %%((_d_a_t_e_f_m_t))TT - causes pprriinnttff to output the date-time string resulting from + causes pprriinnttff to output the date-time string resulting from using _d_a_t_e_f_m_t as a format string for _s_t_r_f_t_i_m_e(3). The corre- - sponding _a_r_g_u_m_e_n_t 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 invoked. If no ar- - gument is specified, conversion behaves as if -1 had been + sponding _a_r_g_u_m_e_n_t 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 invoked. If no ar- + gument is specified, conversion behaves as if -1 had been supplied. This is an exception to the usual pprriinnttff 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 argu- + 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 argu- ment, which usually contains more characters than the original. - The %n format specifier accepts a corresponding argument that is + 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, which - forces them to convert the argument string to a wide-character - string and apply any supplied field width and precision in terms of - characters, not bytes. The %S and %C format specifiers are equiva- + The %s and %c format specifiers accept an l (long) modifier, which + forces them to convert the argument string to a wide-character + string and apply any supplied field width and precision in terms of + characters, not bytes. The %S and %C format specifiers are equiva- lent to %ls and %lc, respectively. - 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 + 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 current locale. Format specifiers may apply to the _nth argument rather than the next - sequential argument. In this case, the '%' in the format specifier - is replaced by the sequence "%_n$", where _n is a decimal integer - greater than 0, giving the argument number to use as the operand. - The format string should not mix numbered and unnumbered argument - specifiers, though this is allowed. Unnumbered argument specifiers - always refer to the next argument following the last argument con- + sequential argument. In this case, the '%' in the format specifier + is replaced by the sequence "%_n$", where _n is a decimal integer + greater than 0, giving the argument number to use as the operand. + The format string should not mix numbered and unnumbered argument + specifiers, though this is allowed. Unnumbered argument specifiers + always refer to the next argument following the last argument con- sumed by an unnumbered specifier; numbered argument specifiers refer to absolute positions in the argument list. - The _f_o_r_m_a_t is reused as necessary to consume all of the _a_r_g_u_m_e_n_t_s. - If the _f_o_r_m_a_t requires more _a_r_g_u_m_e_n_t_s than are supplied, the extra - format specifications behave as if a zero value or null string, as + The _f_o_r_m_a_t is reused as necessary to consume all of the _a_r_g_u_m_e_n_t_s. + If the _f_o_r_m_a_t requires more _a_r_g_u_m_e_n_t_s than are supplied, the extra + format specifications behave as if a zero value or null string, as appropriate, had been supplied. If _f_o_r_m_a_t is reused, a numbered ar- - gument specifier "%_n$" refers to the _nth argument following the + gument specifier "%_n$" refers to the _nth argument following the highest numbered argument consumed by the previous use of _f_o_r_m_a_t. - The return value is zero on success, non-zero if an invalid option + The return value is zero on success, non-zero if an invalid option is supplied or a write or assignment error occurs. ppuusshhdd [--nn] [+_n] [-_n] ppuusshhdd [--nn] [_d_i_r] - Add a directory to the top of the directory stack, or rotate the - stack, making the new top of the stack the current working direc- - tory. With no arguments, ppuusshhdd exchanges the top two elements of - the directory stack. Arguments, if supplied, have the following + Add a directory to the top of the directory stack, or rotate the + stack, making the new top of the stack the current working direc- + tory. With no arguments, ppuusshhdd exchanges the top two elements of + the directory stack. Arguments, if supplied, have the following meanings: - --nn Suppress the normal change of directory when rotating or + --nn Suppress the normal change of directory when rotating or adding directories to the stack, only manipulate the stack. ++_n Rotate the stack so that the _nth directory (counting from the left of the list shown by ddiirrss, starting with zero) is at the top. - --_n Rotates the stack so that the _nth directory (counting from - the right of the list shown by ddiirrss, starting with zero) is + --_n Rotates the stack so that the _nth directory (counting from + the right of the list shown by ddiirrss, starting with zero) is at the top. _d_i_r Adds _d_i_r to the directory stack at the top. - After the stack has been modified, if the --nn option was not sup- - plied, ppuusshhdd uses the ccdd builtin to change to the directory at the + After the stack has been modified, if the --nn option was not sup- + plied, ppuusshhdd uses the ccdd builtin to change to the directory at the top of the stack. If the ccdd fails, ppuusshhdd returns a non-zero value. - Otherwise, if no arguments are supplied, ppuusshhdd returns zero unless - the directory stack is empty. When rotating the directory stack, - ppuusshhdd returns zero unless the directory stack is empty or _n speci- + Otherwise, if no arguments are supplied, ppuusshhdd returns zero unless + the directory stack is empty. When rotating the directory stack, + ppuusshhdd returns zero unless the directory stack is empty or _n speci- fies a non-existent directory stack element. If the ppuusshhdd command is successful, bbaasshh runs ddiirrss to show the final contents of the directory stack. ppwwdd [--LLPP] - Print the absolute pathname of the current working directory. The + Print the absolute pathname of the current working directory. The pathname printed contains no symbolic links if the --PP option is sup- - plied or the --oo pphhyyssiiccaall option to the sseett builtin command is en- - abled. If the --LL option is used, the pathname printed may contain + plied or the --oo pphhyyssiiccaall option to the sseett builtin command is en- + abled. If the --LL 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 invalid option is + reading the name of the current directory or an invalid option is supplied. rreeaadd [--EEeerrss] [--aa _a_n_a_m_e] [--dd _d_e_l_i_m] [--ii _t_e_x_t] [--nn _n_c_h_a_r_s] [--NN _n_c_h_a_r_s] [--pp _p_r_o_m_p_t] [--tt _t_i_m_e_o_u_t] [--uu _f_d] [_n_a_m_e ...] - Read one line from the standard input, or from the file descriptor - _f_d supplied as an argument to the --uu option, split it into words as - described above under WWoorrdd SSpplliittttiinngg, and assign the first word to - the first _n_a_m_e, the second word to the second _n_a_m_e, and so on. If - there are more words than names, the remaining words and their in- - tervening delimiters are assigned to the last _n_a_m_e. If there are - fewer words read from the input stream than names, the remaining + Read one line from the standard input, or from the file descriptor + _f_d supplied as an argument to the --uu option, split it into words as + described above under WWoorrdd SSpplliittttiinngg, and assign the first word to + the first _n_a_m_e, the second word to the second _n_a_m_e, and so on. If + there are more words than names, the remaining words and their in- + tervening delimiters are assigned to the last _n_a_m_e. If there are + fewer words read from the input stream than names, the remaining names are assigned empty values. The characters in the value of the - IIFFSS variable are used to split the line into words using the same - rules the shell uses for expansion (described above under WWoorrdd + IIFFSS variable are used to split the line into words using the same + rules the shell uses for expansion (described above under WWoorrdd SSpplliittttiinngg). The backslash character (\\) removes any special meaning for the next character read and is used for line continuation. Options, if supplied, have the following meanings: --aa _a_n_a_m_e - The words are assigned to sequential indices of the array + The words are assigned to sequential indices of the array variable _a_n_a_m_e, starting at 0. _a_n_a_m_e is unset before any new values are assigned. Other _n_a_m_e arguments are ignored. --dd _d_e_l_i_m - The first character of _d_e_l_i_m terminates the input line, + The first character of _d_e_l_i_m terminates the input line, rather than newline. If _d_e_l_i_m is the empty string, rreeaadd will terminate a line when it reads a NUL character. - --ee If the standard input is coming from a terminal, rreeaadd uses - rreeaaddlliinnee (see RREEAADDLLIINNEE above) to obtain the line. RReeaaddlliinnee - uses the current (or default, if line editing was not previ- - ously active) editing settings, but uses rreeaaddlliinnee's default + --ee If the standard input is coming from a terminal, rreeaadd uses + rreeaaddlliinnee (see RREEAADDLLIINNEE above) to obtain the line. RReeaaddlliinnee + uses the current (or default, if line editing was not previ- + ously active) editing settings, but uses rreeaaddlliinnee's default filename completion. - --EE If the standard input is coming from a terminal, rreeaadd uses - rreeaaddlliinnee (see RREEAADDLLIINNEE above) to obtain the line. RReeaaddlliinnee - uses the current (or default, if line editing was not previ- - ously active) editing settings, but uses bash's default com- + --EE If the standard input is coming from a terminal, rreeaadd uses + rreeaaddlliinnee (see RREEAADDLLIINNEE above) to obtain the line. RReeaaddlliinnee + uses the current (or default, if line editing was not previ- + ously active) editing settings, but uses bash's default com- pletion, including programmable completion. --ii _t_e_x_t - If rreeaaddlliinnee is being used to read the line, rreeaadd places _t_e_x_t + If rreeaaddlliinnee is being used to read the line, rreeaadd places _t_e_x_t into the editing buffer before editing begins. --nn _n_c_h_a_r_s - rreeaadd returns after reading _n_c_h_a_r_s characters rather than - waiting for a complete line of input, unless it encounters - EOF or rreeaadd times out, but honors a delimiter if it reads + rreeaadd returns after reading _n_c_h_a_r_s characters rather than + waiting for a complete line of input, unless it encounters + EOF or rreeaadd times out, but honors a delimiter if it reads fewer than _n_c_h_a_r_s characters before the delimiter. --NN _n_c_h_a_r_s - rreeaadd returns after reading exactly _n_c_h_a_r_s characters rather - than waiting for a complete line of input, unless it encoun- - ters EOF or rreeaadd times out. Any delimiter characters in the - input are not treated specially and do not cause rreeaadd to re- - turn until it has read _n_c_h_a_r_s characters. The result is not - split on the characters in IIFFSS; the intent is that the vari- + rreeaadd returns after reading exactly _n_c_h_a_r_s characters rather + than waiting for a complete line of input, unless it encoun- + ters EOF or rreeaadd times out. Any delimiter characters in the + input are not treated specially and do not cause rreeaadd to re- + turn until it has read _n_c_h_a_r_s characters. The result is not + split on the characters in IIFFSS; the intent is that the vari- able is assigned exactly the characters read (with the excep- tion of backslash; see the --rr option below). --pp _p_r_o_m_p_t Display _p_r_o_m_p_t on standard error, without a trailing newline, - before attempting to read any input, but only if input is + before attempting to read any input, but only if input is coming from a terminal. --rr Backslash does not act as an escape character. The backslash is considered to be part of the line. In particular, a back- - slash-newline pair may not then be used as a line continua- + slash-newline pair may not then be used as a line continua- tion. - --ss Silent mode. If input is coming from a terminal, characters + --ss Silent mode. If input is coming from a terminal, characters are not echoed. --tt _t_i_m_e_o_u_t Cause rreeaadd to time out and return failure if it does not read - a complete line of input (or a specified number of charac- - ters) within _t_i_m_e_o_u_t seconds. _t_i_m_e_o_u_t may be a decimal num- - ber with a fractional portion following the decimal point. + a complete line of input (or a specified number of charac- + ters) within _t_i_m_e_o_u_t seconds. _t_i_m_e_o_u_t may be a decimal num- + ber with a fractional portion following the decimal point. This option is only effective if rreeaadd is reading input from a - terminal, pipe, or other special file; it has no effect when - reading from regular files. If rreeaadd times out, it saves any - partial input read into the specified variable _n_a_m_e, and the - exit status is greater than 128. If _t_i_m_e_o_u_t is 0, rreeaadd re- - turns immediately, without trying to read any data. In this + terminal, pipe, or other special file; it has no effect when + reading from regular files. If rreeaadd times out, it saves any + partial input read into the specified variable _n_a_m_e, and the + exit status is greater than 128. If _t_i_m_e_o_u_t is 0, rreeaadd re- + turns immediately, without trying to read any data. In this case, the exit status is 0 if input is available on the spec- - ified file descriptor, or the read will return EOF, non-zero + ified file descriptor, or the read will return EOF, non-zero otherwise. - --uu _f_d Read input from file descriptor _f_d instead of the standard + --uu _f_d Read input from file descriptor _f_d instead of the standard input. - Other than the case where _d_e_l_i_m is the empty string, rreeaadd ignores + Other than the case where _d_e_l_i_m is the empty string, rreeaadd ignores any NUL characters in the input. - If no _n_a_m_e_s are supplied, rreeaadd assigns the line read, without the + If no _n_a_m_e_s are supplied, rreeaadd assigns the line read, without the ending delimiter but otherwise unmodified, to the variable RREEPPLLYY. - The exit status is zero, unless end-of-file is encountered, rreeaadd + The exit status is zero, unless end-of-file is encountered, rreeaadd times out (in which case the status is greater than 128), a variable - assignment error (such as assigning to a readonly variable) occurs, + assignment error (such as assigning to a readonly variable) occurs, or an invalid file descriptor is supplied as the argument to --uu. rreeaaddoonnllyy [--aaAAff] [--pp] [_n_a_m_e[=_w_o_r_d] ...] - The given _n_a_m_e_s are marked readonly; the values of these _n_a_m_e_s may - not be changed by subsequent assignment or unset. If the --ff option - is supplied, each _n_a_m_e refers to a shell function. The --aa option - restricts the variables to indexed arrays; the --AA option restricts - the variables to associative arrays. If both options are supplied, - --AA takes precedence. If no _n_a_m_e arguments are supplied, or if the - --pp 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 --pp option displays output in a format + The given _n_a_m_e_s are marked readonly; the values of these _n_a_m_e_s may + not be changed by subsequent assignment or unset. If the --ff option + is supplied, each _n_a_m_e refers to a shell function. The --aa option + restricts the variables to indexed arrays; the --AA option restricts + the variables to associative arrays. If both options are supplied, + --AA takes precedence. If no _n_a_m_e arguments are supplied, or if the + --pp 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 --pp option displays output in a format that may be reused as input. - rreeaaddoonnllyy allows the value of a variable to be set at the same time - the readonly attribute is changed by following the variable name - with =_v_a_l_u_e. This sets the value of the variable to _v_a_l_u_e while + rreeaaddoonnllyy allows the value of a variable to be set at the same time + the readonly attribute is changed by following the variable name + with =_v_a_l_u_e. This sets the value of the variable to _v_a_l_u_e while modifying the readonly attribute. - The return status is 0 unless an invalid option is encountered, one - of the _n_a_m_e_s is not a valid shell variable name, or --ff is supplied + The return status is 0 unless an invalid option is encountered, one + of the _n_a_m_e_s is not a valid shell variable name, or --ff is supplied with a _n_a_m_e that is not a function. rreettuurrnn [_n] Stop executing a shell function or sourced file and return the value specified by _n to its caller. If _n is omitted, the return status is - that of the last command executed. If rreettuurrnn is executed by a trap - handler, the last command used to determine the status is the last - command executed before the trap handler. If rreettuurrnn is executed - during a DDEEBBUUGG trap, the last command used to determine the status - is the last command executed by the trap handler before rreettuurrnn was + that of the last command executed. If rreettuurrnn is executed by a trap + handler, the last command used to determine the status is the last + command executed before the trap handler. If rreettuurrnn is executed + during a DDEEBBUUGG trap, the last command used to determine the status + is the last command executed by the trap handler before rreettuurrnn was invoked. - When rreettuurrnn is used to terminate execution of a script being exe- - cuted by the .. (ssoouurrccee) command, it causes the shell to stop exe- - cuting that script and return either _n or the exit status of the - last command executed within the script as the exit status of the + When rreettuurrnn is used to terminate execution of a script being exe- + cuted by the .. (ssoouurrccee) command, it causes the shell to stop exe- + cuting that script and return either _n or the exit status of the + last command executed within the script as the exit status of the script. If _n is supplied, the return value is its least significant 8 bits. - Any command associated with the RREETTUURRNN trap is executed before exe- + Any command associated with the RREETTUURRNN trap is executed before exe- cution resumes after the function or script. - The return status is non-zero if rreettuurrnn is supplied a non-numeric - argument, or is used outside a function and not during execution of + The return status is non-zero if rreettuurrnn is supplied a non-numeric + argument, or is used outside a function and not during execution of a script by .. or ssoouurrccee. sseett [--aabbeeffhhkkmmnnppttuuvvxxBBCCEEHHPPTT] [--oo _o_p_t_i_o_n_-_n_a_m_e] [----] [--] [_a_r_g ...] sseett [++aabbeeffhhkkmmnnppttuuvvxxBBCCEEHHPPTT] [++oo _o_p_t_i_o_n_-_n_a_m_e] [----] [--] [_a_r_g ...] sseett --oo sseett ++oo - Without options, display the name and value of each shell variable + Without options, display the name and value of each shell variable in a format that can be reused as input for setting or resetting 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 + 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 arguments remaining after option - processing are treated as values for the positional parameters and - are assigned, in order, to $$11, $$22, ..., $$_n. Options, if specified, + processing are treated as values for the positional parameters and + are assigned, in order, to $$11, $$22, ..., $$_n. Options, if specified, have the following meanings: - --aa Each variable or function that is created or modified is - given the export attribute and marked for export to the en- + --aa Each variable or function that is created or modified is + given the export attribute and marked for export to the en- vironment of subsequent commands. --bb Report the status of terminated background jobs immediately, - rather than before the next primary prompt or after a fore- - ground command terminates. This is effective only when job + rather than before the next primary prompt or after a fore- + ground command terminates. This is effective only when job control is enabled. - --ee Exit immediately if a _p_i_p_e_l_i_n_e (which may consist of a sin- - gle _s_i_m_p_l_e _c_o_m_m_a_n_d), a _l_i_s_t, or a _c_o_m_p_o_u_n_d _c_o_m_m_a_n_d (see - SSHHEELLLL GGRRAAMMMMAARR above), exits with a non-zero status. The + --ee Exit immediately if a _p_i_p_e_l_i_n_e (which may consist of a sin- + gle _s_i_m_p_l_e _c_o_m_m_a_n_d), a _l_i_s_t, or a _c_o_m_p_o_u_n_d _c_o_m_m_a_n_d (see + SSHHEELLLL GGRRAAMMMMAARR 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 wwhhiillee or uunnttiill reserved - word, part of the test following the iiff or eelliiff reserved - words, part of any command executed in a &&&& or |||| list ex- - cept the command following the final &&&& or ||||, any command - in a pipeline but the last (subject to the state of the - ppiippeeffaaiill shell option), or if the command's return value is - being inverted with !!. If a compound command other than a - subshell returns a non-zero status because a command failed + word, part of the test following the iiff or eelliiff reserved + words, part of any command executed in a &&&& or |||| list ex- + cept the command following the final &&&& or ||||, any command + in a pipeline but the last (subject to the state of the + ppiippeeffaaiill shell option), or if the command's return value is + being inverted with !!. If a compound command other than a + subshell returns a non-zero status because a command failed while --ee was being ignored, the shell does not exit. A trap - on EERRRR, if set, is executed before the shell exits. This - option applies to the shell environment and each subshell - environment separately (see CCOOMMMMAANNDD EEXXEECCUUTTIIOONN EENNVVIIRROONNMMEENNTT + on EERRRR, if set, is executed before the shell exits. This + option applies to the shell environment and each subshell + environment separately (see CCOOMMMMAANNDD EEXXEECCUUTTIIOONN EENNVVIIRROONNMMEENNTT 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 con- - text where --ee is being ignored, none of the commands exe- - cuted within the compound command or function body will be - affected by the --ee setting, even if --ee is set and a command - returns a failure status. If a compound command or shell - function sets --ee while executing in a context where --ee is - ignored, that setting will not have any effect until the + If a compound command or shell function executes in a con- + text where --ee is being ignored, none of the commands exe- + cuted within the compound command or function body will be + affected by the --ee setting, even if --ee is set and a command + returns a failure status. If a compound command or shell + function sets --ee while executing in a context where --ee is + ignored, that setting will not have any effect until the compound command or the command containing the function call completes. --ff Disable pathname expansion. - --hh Remember the location of commands as they are looked up for + --hh Remember the location of commands as they are looked up for execution. This is enabled by default. - --kk All arguments in the form of assignment statements are + --kk All arguments in the form of assignment statements are placed in the environment for a command, not just those that precede the command name. --mm Monitor mode. Job control is enabled. This option is on by - default for interactive shells on systems that support it - (see JJOOBB CCOONNTTRROOLL above). All processes run in a separate - process group. When a background job completes, the shell + default for interactive shells on systems that support it + (see JJOOBB CCOONNTTRROOLL above). All processes run in a separate + process group. When a background job completes, the shell prints a line containing its exit status. - --nn Read commands but do not execute them. This may be used to - check a shell script for syntax errors. Interactive shells + --nn Read commands but do not execute them. This may be used to + check a shell script for syntax errors. Interactive shells ignore this option unless it is supplied at invocation along with the --ii option (see IINNVVOOCCAATTIIOONN above). --oo _o_p_t_i_o_n_-_n_a_m_e @@ -6370,10 +6373,10 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS Same as --aa. bbrraacceeeexxppaanndd Same as --BB. - eemmaaccss Use an emacs-style command line editing interface. - This is enabled by default when the shell is inter- - active, unless the shell is started with the - ----nnooeeddiittiinngg option. This also affects the editing + eemmaaccss Use an emacs-style command line editing interface. + This is enabled by default when the shell is inter- + active, unless the shell is started with the + ----nnooeeddiittiinngg option. This also affects the editing interface used for rreeaadd --ee. eerrrreexxiitt Same as --ee. @@ -6386,8 +6389,8 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS hhiisstteexxppaanndd Same as --HH. hhiissttoorryy - Enable command history, as described above under - HHIISSTTOORRYY. This option is on by default in interac- + Enable command history, as described above under + HHIISSTTOORRYY. This option is on by default in interac- tive shells. iiggnnoorreeeeooff The effect is as if the shell command "IGNOREEOF=10" @@ -6408,15 +6411,15 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS pphhyyssiiccaall Same as --PP. ppiippeeffaaiill - If set, the return value of a pipeline is the value - of the last (rightmost) command to exit with a non- + 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 de- + exit successfully. This option is disabled by de- fault. ppoossiixx Enable posix mode; change the behavior of bbaasshh where - the default operation differs from the POSIX stan- - dard to match the standard. See SSEEEE AALLSSOO below for - a reference to a document that details how posix + the default operation differs from the POSIX stan- + dard to match the standard. See SSEEEE AALLSSOO below for + a reference to a document that details how posix mode affects bash's behavior. pprriivviilleeggeedd Same as --pp. @@ -6425,109 +6428,109 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS vvii Use a vi-style command line editing interface. This also affects the editing interface used for rreeaadd --ee. xxttrraaccee Same as --xx. - If --oo is supplied with no _o_p_t_i_o_n_-_n_a_m_e, sseett prints the cur- - rent shell option settings. If ++oo is supplied with no _o_p_- - _t_i_o_n_-_n_a_m_e, sseett prints a series of sseett commands to recreate + If --oo is supplied with no _o_p_t_i_o_n_-_n_a_m_e, sseett prints the cur- + rent shell option settings. If ++oo is supplied with no _o_p_- + _t_i_o_n_-_n_a_m_e, sseett prints a series of sseett commands to recreate the current option settings on the standard output. - --pp Turn on _p_r_i_v_i_l_e_g_e_d mode. In this mode, the shell does not - read the $$EENNVV and $$BBAASSHH__EENNVV files, does not inherit shell - functions from the environment, and ignores the SSHHEELLLLOOPPTTSS, - BBAASSHHOOPPTTSS, CCDDPPAATTHH, and GGLLOOBBIIGGNNOORREE variables, if they appear + --pp Turn on _p_r_i_v_i_l_e_g_e_d mode. In this mode, the shell does not + read the $$EENNVV and $$BBAASSHH__EENNVV files, does not inherit shell + functions from the environment, and ignores the SSHHEELLLLOOPPTTSS, + BBAASSHHOOPPTTSS, CCDDPPAATTHH, and GGLLOOBBIIGGNNOORREE variables, if they appear in the environment. If the shell is started with the effec- - tive user (group) id not equal to the real user (group) id, - and the --pp option is not supplied, these actions are taken - and the effective user id is set to the real user id (see - IINNVVOOCCAATTIIOONN above for more details). If the --pp option is - supplied at startup, the effective user id is not reset. - Turning this option off causes the effective user and group + tive user (group) id not equal to the real user (group) id, + and the --pp option is not supplied, these actions are taken + and the effective user id is set to the real user id (see + IINNVVOOCCAATTIIOONN above for more details). If the --pp option is + supplied at startup, the effective user id is not reset. + Turning this option off causes the effective user and group ids to be set to the real user and group ids. - --rr Enable restricted shell mode. This option cannot be unset + --rr Enable restricted shell mode. This option cannot be unset once it has been set. --tt Exit after reading and executing one command. - --uu Treat unset variables and parameters other than the special - parameters "@" and "*", or array variables subscripted with + --uu Treat unset variables and parameters other than the special + parameters "@" and "*", or array variables subscripted 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, + the shell prints an error message, and, if not interactive, exits with a non-zero status. --vv Print shell input lines as they are read. - --xx After expanding each _s_i_m_p_l_e _c_o_m_m_a_n_d, ffoorr command, ccaassee com- + --xx After expanding each _s_i_m_p_l_e _c_o_m_m_a_n_d, ffoorr command, ccaassee com- mand, sseelleecctt command, or arithmetic ffoorr command, display the - expanded value of PPSS44, followed by the command and its ex- - panded arguments or associated word list, to the standard + expanded value of PPSS44, followed by the command and its ex- + panded arguments or associated word list, to the standard error. - --BB The shell performs brace expansion (see BBrraaccee EExxppaannssiioonn + --BB The shell performs brace expansion (see BBrraaccee EExxppaannssiioonn above). This is on by default. --CC If set, bbaasshh does not overwrite an existing file with the >>, >>&&, and <<>> redirection operators. Using the redirection op- erator >>|| instead of >> will override this and force the cre- ation of an output file. - --EE If set, any trap on EERRRR is inherited by shell functions, - command substitutions, and commands executed in a subshell + --EE If set, any trap on EERRRR is inherited by shell functions, + command substitutions, and commands executed in a subshell environment. The EERRRR trap is normally not inherited in such cases. - --HH Enable !! style history substitution. This option is on by + --HH Enable !! style history substitution. This option is on by default when the shell is interactive. - --PP If set, the shell does not resolve symbolic links when exe- - cuting commands such as ccdd that change the current working - directory. It uses the physical directory structure in- + --PP If set, the shell does not resolve symbolic links when exe- + cuting commands such as ccdd that change the current working + directory. It uses the physical directory structure in- stead. By default, bbaasshh follows the logical chain of direc- tories when performing commands which change the current di- rectory. --TT If set, any traps on DDEEBBUUGG and RREETTUURRNN are inherited by shell functions, command substitutions, and commands executed in a - subshell environment. The DDEEBBUUGG and RREETTUURRNN traps are nor- + subshell environment. The DDEEBBUUGG and RREETTUURRNN traps are nor- mally not inherited in such cases. ---- If no arguments follow this option, unset the positional pa- - rameters. Otherwise, set the positional parameters to the + rameters. Otherwise, set the positional parameters to the _a_r_gs, even if some of them begin with a --. - -- Signal the end of options, and assign all remaining _a_r_gs to + -- Signal the end of options, and assign all remaining _a_r_gs to the positional parameters. The --xx and --vv options are turned off. If there are no _a_r_gs, the positional parameters remain unchanged. - The options are off by default unless otherwise noted. Using + - rather than - causes these options to be turned off. The options - can also be specified as arguments to an invocation of the shell. + The options are off by default unless otherwise noted. Using + + rather than - causes these options to be turned off. The options + can also be specified as arguments to an invocation of the shell. The current set of options may be found in $$--. The return status is always zero unless an invalid option is encountered. sshhiifftt [_n] - Rename positional parameters from _n+1 ... to $$11 ........ Parameters + Rename positional parameters from _n+1 ... to $$11 ........ Parameters represented by the numbers $$## down to $$##-_n+1 are unset. _n must be a non-negative number less than or equal to $$##. If _n is 0, no parame- - ters are changed. If _n is not given, it is assumed to be 1. If _n - is greater than $$##, the positional parameters are not changed. The - return status is greater than zero if _n is greater than $$## or less + ters are changed. If _n is not given, it is assumed to be 1. If _n + is greater than $$##, the positional parameters are not changed. The + return status is greater than zero if _n is greater than $$## or less than zero; otherwise 0. sshhoopptt [--ppqqssuu] [--oo] [_o_p_t_n_a_m_e ...] - Toggle the values of settings controlling optional shell behavior. - The settings can be either those listed below, or, if the --oo option - is used, those available with the --oo option to the sseett builtin com- + Toggle the values of settings controlling optional shell behavior. + The settings can be either those listed below, or, if the --oo option + is used, those available with the --oo option to the sseett builtin com- mand. - With no options, or with the --pp option, display a list of all set- - table options, with an indication of whether or not each is set; if - any _o_p_t_n_a_m_e_s are supplied, the output is restricted to those op- - tions. The --pp option displays output in a form that may be reused + With no options, or with the --pp option, display a list of all set- + table options, with an indication of whether or not each is set; if + any _o_p_t_n_a_m_e_s are supplied, the output is restricted to those op- + tions. The --pp option displays output in a form that may be reused as input. Other options have the following meanings: --ss Enable (set) each _o_p_t_n_a_m_e. --uu Disable (unset) each _o_p_t_n_a_m_e. - --qq Suppresses normal output (quiet mode); the return status in- - dicates whether the _o_p_t_n_a_m_e is set or unset. If multiple - _o_p_t_n_a_m_e arguments are supplied with --qq, the return status is + --qq Suppresses normal output (quiet mode); the return status in- + dicates whether the _o_p_t_n_a_m_e is set or unset. If multiple + _o_p_t_n_a_m_e arguments are supplied with --qq, the return status is zero if all _o_p_t_n_a_m_e_s are enabled; non-zero otherwise. - --oo Restricts the values of _o_p_t_n_a_m_e to be those defined for the + --oo Restricts the values of _o_p_t_n_a_m_e to be those defined for the --oo option to the sseett builtin. - If either --ss or --uu is used with no _o_p_t_n_a_m_e arguments, sshhoopptt shows - only those options which are set or unset, respectively. Unless + If either --ss or --uu is used with no _o_p_t_n_a_m_e arguments, sshhoopptt shows + only those options which are set or unset, respectively. Unless otherwise noted, the sshhoopptt options are disabled (unset) by default. - The return status when listing options is zero if all _o_p_t_n_a_m_e_s are + The return status when listing options is zero if all _o_p_t_n_a_m_e_s are enabled, non-zero otherwise. When setting or unsetting options, the return status is zero unless an _o_p_t_n_a_m_e is not a valid shell option. @@ -6535,51 +6538,51 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS aarrrraayy__eexxppaanndd__oonnccee If set, the shell suppresses multiple evaluation of associa- - tive and indexed array subscripts during arithmetic expres- - sion evaluation, while executing builtins that can perform + tive and indexed array subscripts during arithmetic expres- + sion evaluation, while executing builtins that can perform variable assignments, and while executing builtins that per- form array dereferencing. aassssoocc__eexxppaanndd__oonnccee Deprecated; a synonym for aarrrraayy__eexxppaanndd__oonnccee. - aauuttooccdd If set, a command name that is the name of a directory is + aauuttooccdd If set, a command name that is the name of a directory is executed as if it were the argument to the ccdd command. This option is only used by interactive shells. bbaasshh__ssoouurrccee__ffuullllppaatthh - If set, filenames added to the BBAASSHH__SSOOUURRCCEE array variable + If set, filenames added to the BBAASSHH__SSOOUURRCCEE array variable are converted to full pathnames (see SShheellll VVaarriiaabblleess above). ccddaabbllee__vvaarrss - If set, an argument to the ccdd builtin command that is not a - directory is assumed to be the name of a variable whose + If set, an argument to the ccdd builtin command that is not a + directory is assumed to be the name of a variable whose value is the directory to change to. ccddssppeellll - If set, the ccdd command attempts to correct minor errors in + If set, the ccdd command attempts to correct minor errors in the spelling of a directory component. Minor errors include - transposed characters, a missing character, and one extra + transposed characters, a missing character, and one extra character. If ccdd corrects the directory name, it prints the - corrected filename, and the command proceeds. This option + corrected filename, and the command proceeds. This option is only used by interactive shells. cchheecckkhhaasshh - If set, bbaasshh checks that a command found in the hash table - exists before trying to execute it. If a hashed command no + If set, bbaasshh checks that a command found in the hash table + exists before trying to execute it. If a hashed command no longer exists, bbaasshh performs a normal path search. cchheecckkjjoobbss - If set, bbaasshh lists the status of any stopped and running - jobs before exiting an interactive shell. If any jobs are - running, bbaasshh defers the exit until a second exit is at- - tempted without an intervening command (see JJOOBB CCOONNTTRROOLL - above). The shell always postpones exiting if any jobs are + If set, bbaasshh lists the status of any stopped and running + jobs before exiting an interactive shell. If any jobs are + running, bbaasshh defers the exit until a second exit is at- + tempted without an intervening command (see JJOOBB CCOONNTTRROOLL + above). The shell always postpones exiting if any jobs are stopped. cchheecckkwwiinnssiizzee - If set, bbaasshh checks the window size after each external - (non-builtin) command and, if necessary, updates the values - of LLIINNEESS and CCOOLLUUMMNNSS, using the file descriptor associated + If set, bbaasshh checks the window size after each external + (non-builtin) command and, if necessary, updates the values + of LLIINNEESS and CCOOLLUUMMNNSS, using the file descriptor associated with the standard error if it is a terminal. This option is enabled by default. ccmmddhhiisstt - If set, bbaasshh 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 en- + If set, bbaasshh 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 en- abled, as described above under HHIISSTTOORRYY. ccoommppaatt3311 ccoommppaatt3322 @@ -6591,94 +6594,94 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS These control aspects of the shell's compatibility mode (see SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE below). ccoommpplleettee__ffuullllqquuoottee - If set, bbaasshh quotes all shell metacharacters in filenames + If set, bbaasshh quotes all shell metacharacters in filenames and directory names when performing completion. If not set, bbaasshh removes metacharacters such as the dollar sign from the set of characters that will be quoted in completed filenames - when these metacharacters appear in shell variable refer- - ences in words to be completed. This means that dollar - signs in variable names that expand 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 backslashes to quote completed filenames. This + when these metacharacters appear in shell variable refer- + ences in words to be completed. This means that dollar + signs in variable names that expand 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 backslashes to quote completed filenames. This variable is set by default, which is the default bash behav- ior in versions through 4.2. ddiirreexxppaanndd - If set, bbaasshh replaces directory names with the results of - word expansion when performing filename completion. This + If set, bbaasshh replaces directory names with the results of + word expansion when performing filename completion. This changes the contents of the rreeaaddlliinnee editing buffer. If not set, bbaasshh attempts to preserve what the user typed. ddiirrssppeellll If set, bbaasshh attempts spelling correction on directory names - during word completion if the directory name initially sup- + during word completion if the directory name initially sup- plied does not exist. ddoottgglloobb - If set, bbaasshh includes filenames beginning with a "." in the - results of pathname expansion. The filenames _. and _._. must + If set, bbaasshh includes filenames beginning with a "." in the + results of pathname expansion. The filenames _. and _._. must always be matched explicitly, even if ddoottgglloobb is set. eexxeeccffaaiill - If set, a non-interactive shell will not exit if it cannot - execute the file specified as an argument to the eexxeecc + If set, a non-interactive shell will not exit if it cannot + execute the file specified as an argument to the eexxeecc builtin. An interactive shell does not exit if eexxeecc fails. eexxppaanndd__aalliiaasseess - If set, aliases are expanded as described above under - AALLIIAASSEESS. This option is enabled by default for interactive + If set, aliases are expanded as described above under + AALLIIAASSEESS. This option is enabled by default for interactive shells. eexxttddeebbuugg - If set at shell invocation, or in a shell startup file, - arrange to execute the debugger profile before the shell - starts, identical to the ----ddeebbuuggggeerr option. If set after - invocation, behavior intended for use by debuggers is en- + If set at shell invocation, or in a shell startup file, + arrange to execute the debugger profile before the shell + starts, identical to the ----ddeebbuuggggeerr option. If set after + invocation, behavior intended for use by debuggers is en- abled: - 11.. The --FF option to the ddeeccllaarree builtin displays the - source file name and line number corresponding to + 11.. The --FF option to the ddeeccllaarree builtin displays the + source file name and line number corresponding to each function name supplied as an argument. - 22.. If the command run by the DDEEBBUUGG trap returns a non- - zero value, the next command is skipped and not exe- + 22.. If the command run by the DDEEBBUUGG trap returns a non- + zero value, the next command is skipped and not exe- cuted. - 33.. If the command run by the DDEEBBUUGG trap returns a value - of 2, and the shell is executing in a subroutine (a + 33.. If the command run by the DDEEBBUUGG trap returns a value + of 2, and the shell is executing in a subroutine (a shell function or a shell script executed by the .. or - ssoouurrccee builtins), the shell simulates a call to rree-- + ssoouurrccee builtins), the shell simulates a call to rree-- ttuurrnn. - 44.. BBAASSHH__AARRGGCC and BBAASSHH__AARRGGVV are updated as described in + 44.. BBAASSHH__AARRGGCC and BBAASSHH__AARRGGVV are updated as described in their descriptions above). - 55.. Function tracing is enabled: command substitution, + 55.. Function tracing is enabled: command substitution, shell functions, and subshells invoked with (( _c_o_m_m_a_n_d )) inherit the DDEEBBUUGG and RREETTUURRNN traps. 66.. Error tracing is enabled: command substitution, shell functions, and subshells invoked with (( _c_o_m_m_a_n_d )) in- herit the EERRRR trap. eexxttgglloobb - If set, enable the extended pattern matching features de- + If set, enable the extended pattern matching features de- scribed above under PPaatthhnnaammee EExxppaannssiioonn. eexxttqquuoottee - If set, $$'_s_t_r_i_n_g' and $$"_s_t_r_i_n_g" quoting is performed within + If set, $$'_s_t_r_i_n_g' and $$"_s_t_r_i_n_g" quoting is performed within $${{_p_a_r_a_m_e_t_e_r}} expansions enclosed in double quotes. This op- tion is enabled by default. ffaaiillgglloobb - If set, patterns which fail to match filenames during path- + If set, patterns which fail to match filenames during path- name expansion result in an expansion error. ffoorrccee__ffiiggnnoorree If set, the suffixes specified by the FFIIGGNNOORREE shell variable - cause words to be ignored when performing word completion + cause words to be ignored when performing word completion even if the ignored words are the only possible completions. - See SShheellll VVaarriiaabblleess above for a description of FFIIGGNNOORREE. + See SShheellll VVaarriiaabblleess above for a description of FFIIGGNNOORREE. This option is enabled by default. gglloobbaasscciiiirraannggeess - If set, range expressions used in pattern matching bracket + If set, range expressions used in pattern matching bracket expressions (see PPaatttteerrnn MMaattcchhiinngg above) behave as if in the - traditional C locale when performing comparisons. That is, - pattern matching does not take the current locale's collat- - ing sequence into account, so bb will not collate between AA - and BB, and upper-case and lower-case ASCII characters will + traditional C locale when performing comparisons. That is, + pattern matching does not take the current locale's collat- + ing sequence into account, so bb will not collate between AA + and BB, and upper-case and lower-case ASCII characters will collate together. gglloobbsskkiippddoottss - If set, pathname expansion will never match the filenames _. - and _._., even if the pattern begins with a ".". This option + If set, pathname expansion will never match the filenames _. + and _._., even if the pattern begins with a ".". This option is enabled by default. gglloobbssttaarr - If set, the pattern **** used in a pathname expansion context + If set, the pattern **** used in a pathname expansion context will match all files and zero or more directories and subdi- rectories. If the pattern is followed by a //, only directo- ries and subdirectories match. @@ -6686,153 +6689,153 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS If set, shell error messages are written in the standard GNU error message format. hhiissttaappppeenndd - If set, the history list is appended to the file named by - the value of the HHIISSTTFFIILLEE variable when the shell exits, + If set, the history list is appended to the file named by + the value of the HHIISSTTFFIILLEE variable when the shell exits, rather than potentially overwriting the file. hhiissttrreeeeddiitt - If set, and rreeaaddlliinnee is being used, the user is given the + If set, and rreeaaddlliinnee is being used, the user is given the opportunity to re-edit a failed history substitution. hhiissttvveerriiffyy - If set, and rreeaaddlliinnee is being used, the results of history + If set, and rreeaaddlliinnee is being used, the results of history substitution are not immediately passed to the shell parser. - Instead, the resulting line is loaded into the rreeaaddlliinnee + Instead, the resulting line is loaded into the rreeaaddlliinnee editing buffer, allowing further modification. hhoossttccoommpplleettee - If set, and rreeaaddlliinnee is being used, bbaasshh will attempt to - perform hostname completion when a word containing a @@ is + If set, and rreeaaddlliinnee is being used, bbaasshh will attempt to + perform hostname completion when a word containing a @@ is being completed (see CCoommpplleettiinngg under RREEAADDLLIINNEE above). This is enabled by default. hhuuppoonneexxiitt - If set, bbaasshh will send SSIIGGHHUUPP to all jobs when an interac- + If set, bbaasshh will send SSIIGGHHUUPP to all jobs when an interac- tive login shell exits. iinnhheerriitt__eerrrreexxiitt - If set, command substitution inherits the value of the eerr-- - rreexxiitt option, instead of unsetting it in the subshell envi- + If set, command substitution inherits the value of the eerr-- + rreexxiitt option, instead of unsetting it in the subshell envi- ronment. This option is enabled when posix mode is enabled. iinntteerraaccttiivvee__ccoommmmeennttss In an interactive shell, a word beginning with ## causes that - word and all remaining characters on that line to be ig- - nored, as in a non-interactive shell (see CCOOMMMMEENNTTSS above). + word and all remaining characters on that line to be ig- + nored, as in a non-interactive shell (see CCOOMMMMEENNTTSS above). This option is enabled by default. kkvvppaaiirr__sspplliitt - If set, a compound assignment to an associative array per- - forms word expansions, including word splitting, on all - words in the assignment before identifying keys and values. + If set, a compound assignment to an associative array per- + forms word expansions, including word splitting, on all + words in the assignment before identifying keys and values. If it is unset, each word in the compound assignment list is identified as a key or value before performing the appropri- - ate word expansions, and word splitting is not performed. + ate word expansions, and word splitting is not performed. This option is enabled by default. llaassttppiippee - If set, and job control is not active, the shell runs the + If set, and job control is not active, the shell runs the last command of a pipeline not executed in the background in the current shell environment. lliitthhiisstt - If set, and the ccmmddhhiisstt option is enabled, multi-line com- + If set, and the ccmmddhhiisstt option is enabled, multi-line com- mands are saved to the history with embedded newlines rather than using semicolon separators where possible. llooccaallvvaarr__iinnhheerriitt - If set, local variables inherit the value and attributes of - a variable of the same name that exists at a previous scope - before any new value is assigned. The nameref attribute is + If set, local variables inherit the value and attributes of + a variable of the same name that exists at a previous scope + before any new value is assigned. The nameref attribute is not inherited. llooccaallvvaarr__uunnsseett - If set, calling uunnsseett on local variables in previous func- + If set, calling uunnsseett on local variables in previous func- tion scopes marks them so subsequent lookups find them unset - until that function returns. This is identical to the be- - havior of unsetting local variables at the current function + until that function returns. This is identical to the be- + havior of unsetting local variables at the current function scope. llooggiinn__sshheellll The shell sets this option if it is started as a login shell (see IINNVVOOCCAATTIIOONN above). The value may not be changed. mmaaiillwwaarrnn - If set, and a file that bbaasshh is checking for mail has been - accessed since the last time it was checked, bbaasshh displays + If set, and a file that bbaasshh is checking for mail has been + accessed since the last time it was checked, bbaasshh displays the message "The mail in _m_a_i_l_f_i_l_e has been read". nnoo__eemmppttyy__ccmmdd__ccoommpplleettiioonn - If set, and rreeaaddlliinnee is being used, bbaasshh does not search - PPAATTHH for possible completions when completion is attempted + If set, and rreeaaddlliinnee is being used, bbaasshh does not search + PPAATTHH for possible completions when completion is attempted on an empty line. nnooccaasseegglloobb If set, bbaasshh matches filenames in a case-insensitive fashion - when performing pathname expansion (see PPaatthhnnaammee EExxppaannssiioonn + when performing pathname expansion (see PPaatthhnnaammee EExxppaannssiioonn above). nnooccaasseemmaattcchh - If set, bbaasshh matches patterns in a case-insensitive fashion - when performing matching while executing ccaassee or [[[[ condi- - tional commands, when performing pattern substitution word - expansions, or when filtering possible completions as part + If set, bbaasshh matches patterns in a case-insensitive fashion + when performing matching while executing ccaassee or [[[[ condi- + tional commands, when performing pattern substitution word + expansions, or when filtering possible completions as part of programmable completion. nnooeexxppaanndd__ttrraannssllaattiioonn If set, bbaasshh encloses the translated results of $$""..."" quot- - ing in single quotes instead of double quotes. If the + ing in single quotes instead of double quotes. If the string is not translated, this has no effect. nnuullllgglloobb - If set, pathname expansion patterns which match no files + If set, pathname expansion patterns which match no files (see PPaatthhnnaammee EExxppaannssiioonn above) expand to nothing and are re- moved, rather than expanding to themselves. ppaattssuubb__rreeppllaacceemmeenntt - If set, bbaasshh expands occurrences of && in the replacement - string of pattern substitution to the text matched by the + If set, bbaasshh expands occurrences of && in the replacement + string of pattern substitution to the text matched by the pattern, as described under PPaarraammeetteerr EExxppaannssiioonn above. This option is enabled by default. pprrooggccoommpp - If set, enable the programmable completion facilities (see - PPrrooggrraammmmaabbllee CCoommpplleettiioonn above). This option is enabled by + If set, enable the programmable completion facilities (see + PPrrooggrraammmmaabbllee CCoommpplleettiioonn above). This option is enabled by default. pprrooggccoommpp__aalliiaass - If set, and programmable completion is enabled, bbaasshh treats + If set, and programmable completion is enabled, bbaasshh treats a command name that doesn't have any completions as a possi- ble alias and attempts alias expansion. If it has an alias, bbaasshh attempts programmable completion using the command word resulting from the expanded alias. pprroommppttvvaarrss - If set, prompt strings undergo parameter expansion, command - substitution, arithmetic expansion, and quote removal after + If set, prompt strings undergo parameter expansion, command + substitution, arithmetic expansion, and quote removal after being expanded as described in PPRROOMMPPTTIINNGG above. This option is enabled by default. rreessttrriicctteedd__sshheellll - The shell sets this option if it is started in restricted - mode (see RREESSTTRRIICCTTEEDD SSHHEELLLL below). The value may not be - changed. This is not reset when the startup files are exe- + The shell sets this option if it is started in restricted + mode (see RREESSTTRRIICCTTEEDD SSHHEELLLL below). The value may not be + changed. This is not reset when the startup files are exe- cuted, allowing the startup files to discover whether or not a shell is restricted. sshhiifftt__vveerrbboossee - If set, the sshhiifftt builtin prints an error message when the + If set, the sshhiifftt builtin prints an error message when the shift count exceeds the number of positional parameters. ssoouurrcceeppaatthh - If set, the .. (ssoouurrccee) builtin uses the value of PPAATTHH to - find the directory containing the file supplied as an argu- + If set, the .. (ssoouurrccee) builtin uses the value of PPAATTHH to + find the directory containing the file supplied as an argu- ment when the --pp option is not supplied. This option is en- abled by default. vvaarrrreeddiirr__cclloossee - If set, the shell automatically closes file descriptors as- - signed using the _{_v_a_r_n_a_m_e_} redirection syntax (see RREEDDIIRREECC-- - TTIIOONN above) instead of leaving them open when the command + If set, the shell automatically closes file descriptors as- + signed using the _{_v_a_r_n_a_m_e_} redirection syntax (see RREEDDIIRREECC-- + TTIIOONN above) instead of leaving them open when the command completes. xxppgg__eecchhoo - If set, the eecchhoo builtin expands backslash-escape sequences + If set, the eecchhoo builtin expands backslash-escape sequences by default. If the ppoossiixx shell option is also enabled, eecchhoo does not interpret any options. ssuussppeenndd [--ff] Suspend the execution of this shell until it receives a SSIIGGCCOONNTT sig- - nal. A login shell, or a shell without job control enabled, cannot + nal. A login shell, or a shell without job control enabled, cannot be suspended; the --ff option will override this and force the suspen- - sion. The return status is 0 unless the shell is a login shell or + sion. The return status is 0 unless the shell is a login shell or job control is not enabled and --ff is not supplied. tteesstt _e_x_p_r [[ _e_x_p_r ]] Return a status of 0 (true) or 1 (false) depending on the evaluation - of the conditional expression _e_x_p_r. Each operator and operand must - be a separate argument. Expressions are composed of the primaries + of the conditional expression _e_x_p_r. Each operator and operand must + be a separate argument. Expressions are composed of the primaries described above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS. tteesstt does not accept any options, nor does it accept and ignore an argument of ---- as sig- nifying the end of options. Expressions may be combined using the following operators, listed in - decreasing order of precedence. The evaluation depends on the num- - ber of arguments; see below. tteesstt uses operator precedence when + decreasing order of precedence. The evaluation depends on the num- + ber of arguments; see below. tteesstt uses operator precedence when there are five or more arguments. !! _e_x_p_r True if _e_x_p_r is false. @@ -6844,44 +6847,44 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS _e_x_p_r_1 -oo _e_x_p_r_2 True if either _e_x_p_r_1 or _e_x_p_r_2 is true. - tteesstt and [[ evaluate conditional expressions using a set of rules + tteesstt and [[ evaluate conditional expressions using a set of rules based on the number of arguments. 0 arguments The expression is false. 1 argument - The expression is true if and only if the argument is not + The expression is true if and only if the argument is not null. 2 arguments - If the first argument is !!, the expression is true if and - only if the second argument is null. If the first argument - is one of the unary conditional operators listed above under - CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the expression is true if the unary - test is true. If the first argument is not a valid unary + If the first argument is !!, the expression is true if and + only if the second argument is null. If the first argument + is one of the unary conditional operators listed above under + CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, 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 opera- - tors listed above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the result - of the expression is the result of the binary test using the - first and third arguments as operands. The --aa and --oo opera- + the second argument is one of the binary conditional opera- + tors listed above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the result + of the expression is the result of the binary test using the + first and third arguments as operands. The --aa and --oo opera- tors are considered binary operators when there are three ar- - guments. If the first argument is !!, the value is the nega- - tion of the two-argument test using the second and third ar- - guments. If the first argument is exactly (( and the third + guments. If the first argument is !!, the value is the nega- + tion of the two-argument test using the second and third ar- + guments. If the first argument is exactly (( and the third argument is exactly )), the result is the one-argument test of the second argument. Otherwise, the expression is false. 4 arguments The following conditions are applied in the order listed. If - the first argument is !!, the result is the negation of the - three-argument expression composed of the remaining argu- + the first argument is !!, the result is the negation of the + three-argument expression composed of the remaining argu- ments. If the first argument is exactly (( and the fourth ar- - gument is exactly )), the result is the two-argument test of + gument is exactly )), the result is the two-argument test of the second and third arguments. Otherwise, the expression is - parsed and evaluated according to precedence using the rules + parsed and evaluated according to precedence using the rules listed above. 5 or more arguments - The expression is parsed and evaluated according to prece- + The expression is parsed and evaluated according to prece- dence using the rules listed above. When the shell is in posix mode, or if the expression is part of the @@ -6889,137 +6892,137 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS the shell is not in posix mode, the tteesstt and [[ commands sort lexico- graphically using ASCII ordering. - The historical operator-precedence parsing with 4 or more arguments - can lead to ambiguities when it encounters strings that look like - primaries. The POSIX standard has deprecated the --aa and --oo pri- + The historical operator-precedence parsing with 4 or more arguments + can lead to ambiguities when it encounters strings that look like + primaries. The POSIX standard has deprecated the --aa and --oo pri- maries and enclosing expressions within parentheses. Scripts should - no longer use them. It's much more reliable to restrict test invo- - cations to a single primary, and to replace uses of --aa and --oo with + no longer use them. It's much more reliable to restrict test invo- + cations to a single primary, and to replace uses of --aa and --oo with the shell's &&&& and |||| list operators. - ttiimmeess Print the accumulated user and system times for the shell and for + ttiimmeess Print the accumulated user and system times for the shell and for processes run from the shell. The return status is 0. ttrraapp [--llppPP] [[_a_c_t_i_o_n] _s_i_g_s_p_e_c ...] The _a_c_t_i_o_n is a command that is read and executed when the shell re- - ceives any of the signals _s_i_g_s_p_e_c. If _a_c_t_i_o_n is absent (and there - is a single _s_i_g_s_p_e_c) or --, each specified _s_i_g_s_p_e_c is reset to the - value it had when the shell was started. If _a_c_t_i_o_n is the null - string the signal specified by each _s_i_g_s_p_e_c is ignored by the shell + ceives any of the signals _s_i_g_s_p_e_c. If _a_c_t_i_o_n is absent (and there + is a single _s_i_g_s_p_e_c) or --, each specified _s_i_g_s_p_e_c is reset to the + value it had when the shell was started. If _a_c_t_i_o_n is the null + string the signal specified by each _s_i_g_s_p_e_c is ignored by the shell and by the commands it invokes. - If no arguments are supplied, ttrraapp displays the actions associated - with each trapped signal as a set of ttrraapp commands that can be - reused as shell input to restore the current signal dispositions. - If --pp is given, and _a_c_t_i_o_n is not present, then ttrraapp displays the - actions associated with each _s_i_g_s_p_e_c or, if none are supplied, for + If no arguments are supplied, ttrraapp displays the actions associated + with each trapped signal as a set of ttrraapp commands that can be + reused as shell input to restore the current signal dispositions. + If --pp is given, and _a_c_t_i_o_n is not present, then ttrraapp displays the + actions associated with each _s_i_g_s_p_e_c or, if none are supplied, for all trapped signals, as a set of ttrraapp commands that can be reused as - shell input to restore the current signal dispositions. The --PP op- - tion behaves similarly, but displays only the actions associated - with each _s_i_g_s_p_e_c argument. --PP requires at least one _s_i_g_s_p_e_c argu- - ment. The --PP or --pp options may be used in a subshell environment - (e.g., command substitution) and, as long as they are used before - ttrraapp is used to change a signal's handling, will display the state + shell input to restore the current signal dispositions. The --PP op- + tion behaves similarly, but displays only the actions associated + with each _s_i_g_s_p_e_c argument. --PP requires at least one _s_i_g_s_p_e_c argu- + ment. The --PP or --pp options may be used in a subshell environment + (e.g., command substitution) and, as long as they are used before + ttrraapp is used to change a signal's handling, will display the state of its parent's traps. - The --ll option prints a list of signal names and their corresponding - numbers. Each _s_i_g_s_p_e_c is either a signal name defined in <_s_i_g_- - _n_a_l_._h>, or a signal number. Signal names are case insensitive and + The --ll option prints a list of signal names and their corresponding + numbers. Each _s_i_g_s_p_e_c is either a signal name defined in <_s_i_g_- + _n_a_l_._h>, or a signal number. Signal names are case insensitive and the SSIIGG prefix is optional. If --ll is supplied with no _s_i_g_s_p_e_c argu- ments, it prints a list of valid signal names. If a _s_i_g_s_p_e_c is EEXXIITT (0), _a_c_t_i_o_n is executed on exit from the shell. - If a _s_i_g_s_p_e_c is DDEEBBUUGG, _a_c_t_i_o_n is executed before every _s_i_m_p_l_e _c_o_m_- - _m_a_n_d, _f_o_r command, _c_a_s_e command, _s_e_l_e_c_t command, (( arithmetic com- + If a _s_i_g_s_p_e_c is DDEEBBUUGG, _a_c_t_i_o_n is executed before every _s_i_m_p_l_e _c_o_m_- + _m_a_n_d, _f_o_r command, _c_a_s_e command, _s_e_l_e_c_t command, (( arithmetic com- mand, [[ conditional command, arithmetic _f_o_r command, and before the - first command executes in a shell function (see SSHHEELLLL GGRRAAMMMMAARR - above). Refer to the description of the eexxttddeebbuugg shell option (see - sshhoopptt above) for details of its effect on the DDEEBBUUGG trap. If a - _s_i_g_s_p_e_c is RREETTUURRNN, _a_c_t_i_o_n is executed each time a shell function or + first command executes in a shell function (see SSHHEELLLL GGRRAAMMMMAARR + above). Refer to the description of the eexxttddeebbuugg shell option (see + sshhoopptt above) for details of its effect on the DDEEBBUUGG trap. If a + _s_i_g_s_p_e_c is RREETTUURRNN, _a_c_t_i_o_n is executed each time a shell function or a script executed with the .. or ssoouurrccee builtins finishes executing. - If a _s_i_g_s_p_e_c is EERRRR, _a_c_t_i_o_n is executed whenever a pipeline (which - may consist of a single simple command), a list, or a compound com- + If a _s_i_g_s_p_e_c is EERRRR, _a_c_t_i_o_n is executed whenever a pipeline (which + may consist of a single simple command), a list, or a compound com- mand returns a non-zero exit status, subject to the following condi- - tions. The EERRRR trap is not executed if the failed command is part - of the command list immediately following a wwhhiillee or uunnttiill reserved - word, part of the test in an _i_f statement, part of a command exe- - cuted in a &&&& or |||| list except the command following the final &&&& - or ||||, any command in a pipeline but the last (subject to the state - of the ppiippeeffaaiill shell option), or if the command's return value is + tions. The EERRRR trap is not executed if the failed command is part + of the command list immediately following a wwhhiillee or uunnttiill reserved + word, part of the test in an _i_f statement, part of a command exe- + cuted in a &&&& or |||| list except the command following the final &&&& + or ||||, any command in a pipeline but the last (subject to the state + of the ppiippeeffaaiill shell option), or if the command's return value is being inverted using !!. These are the same conditions obeyed by the eerrrreexxiitt (--ee) option. When the shell is not interactive, signals ignored upon entry to the - shell cannot be trapped or reset. Interactive shells permit trap- - ping signals ignored on entry. Trapped signals that are not being + shell cannot be trapped or reset. Interactive shells permit trap- + ping 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 is false if any + environment when one is created. The return status is false if any _s_i_g_s_p_e_c is invalid; otherwise ttrraapp returns true. ttrruuee Does nothing, returns a 0 status. ttyyppee [--aaffttppPP] _n_a_m_e [_n_a_m_e ...] - Indicate how each _n_a_m_e would be interpreted if used as a command + Indicate how each _n_a_m_e would be interpreted if used as a command name. - If the --tt option is used, ttyyppee prints a string which is one of - _a_l_i_a_s, _k_e_y_w_o_r_d, _f_u_n_c_t_i_o_n, _b_u_i_l_t_i_n, or _f_i_l_e if _n_a_m_e is an alias, - shell reserved word, function, builtin, or executable file, respec- + If the --tt option is used, ttyyppee prints a string which is one of + _a_l_i_a_s, _k_e_y_w_o_r_d, _f_u_n_c_t_i_o_n, _b_u_i_l_t_i_n, or _f_i_l_e if _n_a_m_e is an alias, + shell reserved word, function, builtin, or executable file, respec- tively. If the _n_a_m_e is not found, ttyyppee prints nothing and returns a non-zero exit status. - If the --pp option is used, ttyyppee either returns the pathname of the - executable file that would be found by searching $$PPAATTHH for _n_a_m_e or - nothing if "type -t name" would not return _f_i_l_e. The --PP option + If the --pp option is used, ttyyppee either returns the pathname of the + executable file that would be found by searching $$PPAATTHH for _n_a_m_e or + nothing if "type -t name" would not return _f_i_l_e. The --PP option forces a PPAATTHH search for each _n_a_m_e, even if "type -t name" would not return _f_i_l_e. If _n_a_m_e is present in the table of hashed commands, --pp - and --PP print the hashed value, which is not necessarily the file + and --PP print the hashed value, which is not necessarily the file that appears first in PPAATTHH. If the --aa option is used, ttyyppee prints all of the places that contain - a command named _n_a_m_e. This includes aliases, reserved words, func- - tions, and builtins, but the path search options (--pp and --PP) can be - supplied to restrict the output to executable files. ttyyppee does not + a command named _n_a_m_e. This includes aliases, reserved words, func- + tions, and builtins, but the path search options (--pp and --PP) can be + supplied to restrict the output to executable files. ttyyppee does not consult the table of hashed commands when using --aa with --pp, and only performs a PPAATTHH search for _n_a_m_e. - The --ff option suppresses shell function lookup, as with the ccoommmmaanndd + The --ff option suppresses shell function lookup, as with the ccoommmmaanndd builtin. ttyyppee returns true if all of the arguments are found, false if any are not found. uulliimmiitt [--HHSS] --aa uulliimmiitt [--HHSS] [--bbccddeeffiikkllmmnnppqqrrssttuuvvxxPPRRTT [_l_i_m_i_t]] - Provides control over the resources available to the shell and to + Provides control over the resources available to the shell and to processes it starts, on systems that allow such control. - The --HH and --SS 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 --HH nor --SS is specified, uulliimmiitt + The --HH and --SS 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 --HH nor --SS is specified, uulliimmiitt sets both the soft and hard limits. The value of _l_i_m_i_t can be a number in the unit specified for the re- - source or one of the special values hhaarrdd, ssoofftt, or uunnlliimmiitteedd, which - stand for the current hard limit, the current soft limit, and no + source or one of the special values hhaarrdd, ssoofftt, or uunnlliimmiitteedd, which + stand for the current hard limit, the current soft limit, and no limit, respectively. If _l_i_m_i_t is omitted, uulliimmiitt prints the current - value of the soft limit of the resource, unless the --HH option is + value of the soft limit of the resource, unless the --HH option is given. When more than one resource is specified, the limit name and - unit, if appropriate, are printed before the value. Other options + unit, if appropriate, are printed before the value. Other options are interpreted as follows: --aa Report all current limits; no limits are set. --bb The maximum socket buffer size. --cc The maximum size of core files created. --dd The maximum size of a process's data segment. --ee The maximum scheduling priority ("nice"). - --ff The maximum size of files written by the shell and its chil- + --ff The maximum size of files written by the shell and its chil- dren. --ii The maximum number of pending signals. --kk The maximum number of kqueues that may be allocated. --ll The maximum size that may be locked into memory. --mm The maximum resident set size (many systems do not honor this limit). - --nn The maximum number of open file descriptors (most systems do + --nn The maximum number of open file descriptors (most systems do not allow this value to be set). --pp The pipe size in 512-byte blocks (this may not be set). --qq The maximum number of bytes in POSIX message queues. @@ -7027,7 +7030,7 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS --ss The maximum stack size. --tt The maximum amount of cpu time in seconds. --uu The maximum number of processes available to a single user. - --vv The maximum amount of virtual memory available to the shell + --vv The maximum amount of virtual memory available to the shell and, on some systems, to its children. --xx The maximum number of file locks. --PP The maximum number of pseudoterminals. @@ -7035,245 +7038,252 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS in microseconds. --TT The maximum number of threads. - If _l_i_m_i_t is supplied, and the --aa option is not used, _l_i_m_i_t is the + If _l_i_m_i_t is supplied, and the --aa option is not used, _l_i_m_i_t is the new value of the specified resource. If no option is supplied, then --ff is assumed. - Values are in 1024-byte increments, except for --tt, which is in sec- - onds; --RR, which is in microseconds; --pp, which is in units of + Values are in 1024-byte increments, except for --tt, which is in sec- + onds; --RR, which is in microseconds; --pp, which is in units of 512-byte blocks; --PP, --TT, --bb, --kk, --nn, and --uu, which are unscaled val- - ues; and, when in posix mode, --cc and --ff, which are in 512-byte in- - crements. The return status is 0 unless an invalid option or argu- + ues; and, when in posix mode, --cc and --ff, which are in 512-byte in- + crements. The return status is 0 unless an invalid option or argu- ment is supplied, or an error occurs while setting a new limit. uummaasskk [--pp] [--SS] [_m_o_d_e] - Set the user file-creation mask to _m_o_d_e. If _m_o_d_e begins with a - digit, it is interpreted as an octal number; otherwise it is inter- + Set the user file-creation mask to _m_o_d_e. If _m_o_d_e begins with a + digit, it is interpreted as an octal number; otherwise it is inter- preted as a symbolic mode mask similar to that accepted by _c_h_m_o_d(1). If _m_o_d_e is omitted, uummaasskk prints the current value of the mask. The --SS option without a _m_o_d_e argument prints the mask in a symbolic for- - mat; the default output is an octal number. If the --pp option is - supplied, and _m_o_d_e is omitted, the output is in a form that may be + mat; the default output is an octal number. If the --pp option is + supplied, and _m_o_d_e is omitted, the output is in a form that may be reused as input. The return status is zero if the mode was success- fully changed or if no _m_o_d_e argument was supplied, and non-zero oth- erwise. uunnaalliiaass [-aa] [_n_a_m_e ...] - Remove each _n_a_m_e from the list of defined aliases. If --aa is sup- - plied, remove all alias definitions. The return value is true un- + Remove each _n_a_m_e from the list of defined aliases. If --aa is sup- + plied, remove all alias definitions. The return value is true un- less a supplied _n_a_m_e is not a defined alias. uunnsseett [-ffvv] [-nn] [_n_a_m_e ...] - For each _n_a_m_e, remove the corresponding variable or function. If - the --vv option is given, each _n_a_m_e refers to a shell variable, and + For each _n_a_m_e, remove the corresponding variable or function. If + the --vv option is given, each _n_a_m_e refers to a shell variable, and that variable is removed. If --ff is specified, each _n_a_m_e refers to a - shell function, and the function definition is removed. If the --nn - option is supplied, and _n_a_m_e is a variable with the _n_a_m_e_r_e_f at- - tribute, _n_a_m_e will be unset rather than the variable it references. - --nn has no effect if the --ff option is supplied. Read-only variables + shell function, and the function definition is removed. If the --nn + option is supplied, and _n_a_m_e is a variable with the _n_a_m_e_r_e_f at- + tribute, _n_a_m_e will be unset rather than the variable it references. + --nn has no effect if the --ff option is supplied. Read-only variables and functions may not be unset. When variables or functions are re- - moved, they are also removed from the environment passed to subse- - quent commands. If no options are supplied, each _n_a_m_e refers to a + moved, they are also removed from the environment passed to subse- + quent commands. If no options are supplied, each _n_a_m_e 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 BBAASSHH__AALLIIAASSEESS, BBAASSHH__AARRGGVV00, BBAASSHH__CCMMDDSS, BBAASSHH__CCOOMMMMAANNDD, BBAASSHH__SSUUBB-- - SSHHEELLLL, BBAASSHHPPIIDD, CCOOMMPP__WWOORRDDBBRREEAAKKSS, DDIIRRSSTTAACCKK, EEPPOOCCHHRREEAALLTTIIMMEE, EEPPOOCCHHSSEECC-- + name, if any, is unset. Some shell variables may not be unset. If + any of BBAASSHH__AALLIIAASSEESS, BBAASSHH__AARRGGVV00, BBAASSHH__CCMMDDSS, BBAASSHH__CCOOMMMMAANNDD, BBAASSHH__SSUUBB-- + SSHHEELLLL, BBAASSHHPPIIDD, CCOOMMPP__WWOORRDDBBRREEAAKKSS, DDIIRRSSTTAACCKK, EEPPOOCCHHRREEAALLTTIIMMEE, EEPPOOCCHHSSEECC-- OONNDDSS, FFUUNNCCNNAAMMEE, GGRROOUUPPSS, HHIISSTTCCMMDD, LLIINNEENNOO, RRAANNDDOOMM, SSEECCOONNDDSS, or SSRRAANNDDOOMM are unset, they lose their special properties, even if they are sub- - sequently reset. The exit status is true unless a _n_a_m_e is readonly + sequently reset. The exit status is true unless a _n_a_m_e is readonly or may not be unset. wwaaiitt [--ffnn] [--pp _v_a_r_n_a_m_e] [_i_d ...] - Wait for each specified child process _i_d and return the termination - status of the last _i_d. Each _i_d may be a process ID _p_i_d or a job - specification _j_o_b_s_p_e_c; if a jobspec is supplied, wwaaiitt waits for all + Wait for each specified child process _i_d and return the termination + status of the last _i_d. Each _i_d may be a process ID _p_i_d or a job + specification _j_o_b_s_p_e_c; if a jobspec is supplied, wwaaiitt waits for all processes in the job. - If no options or _i_ds are supplied, wwaaiitt waits for all running back- - ground jobs and the last-executed process substitution, if its + If no options or _i_ds are supplied, wwaaiitt waits for all running back- + ground jobs and the last-executed process substitution, if its process id is the same as $$!!, and the return status is zero. - If the --nn option is supplied, wwaaiitt waits for any one of the given - _i_ds or, if no _i_ds are supplied, any job or process substitution, to - complete and returns its exit status. If none of the supplied _i_ds + If the --nn option is supplied, wwaaiitt waits for any one of the given + _i_ds or, if no _i_ds are supplied, any job or process substitution, to + complete and returns its exit status. If none of the supplied _i_ds is a child of the shell, or if no _i_ds are supplied and the shell has no unwaited-for children, the exit status is 127. - If the --pp option is supplied, wwaaiitt assigns the process or job iden- + If the --pp option is supplied, wwaaiitt assigns the process or job iden- tifier of the job for which the exit status is returned to the vari- able _v_a_r_n_a_m_e named by the option argument. The variable, which can- - not be readonly, will be unset initially, before any assignment. + not be readonly, will be unset initially, before any assignment. This is useful only when used with the --nn option. Supplying the --ff option, when job control is enabled, forces wwaaiitt to - wait for each _i_d to terminate before returning its status, instead - of returning when it changes status. If there are no _i_d arguments, + wait for each _i_d to terminate before returning its status, instead + of returning when it changes status. If there are no _i_d arguments, wwaaiitt waits until all background processes have terminated. - If none of the _i_ds specify one of the shell's active child - processes, the return status is 127. If wwaaiitt is interrupted by a + If none of the _i_ds specify one of the shell's active child + processes, the return status is 127. If wwaaiitt is interrupted by a signal, any _v_a_r_n_a_m_e will remain unset, and the return status will be - greater than 128, as described under SSIIGGNNAALLSS above. Otherwise, the + greater than 128, as described under SSIIGGNNAALLSS above. Otherwise, the return status is the exit status of the last _i_d. SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE - Bash-4.0 introduced the concept of a _s_h_e_l_l _c_o_m_p_a_t_i_b_i_l_i_t_y _l_e_v_e_l, specified - as a set of options to the shopt builtin (ccoommppaatt3311, ccoommppaatt3322, ccoommppaatt4400, - ccoommppaatt4411, 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 + Bash-4.0 introduced the concept of a _s_h_e_l_l _c_o_m_p_a_t_i_b_i_l_i_t_y _l_e_v_e_l, specified + as a set of options to the shopt builtin (ccoommppaatt3311, ccoommppaatt3322, ccoommppaatt4400, + ccoommppaatt4411, 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 solution. - This section does not mention behavior that is standard for a particular - version (e.g., setting ccoommppaatt3322 means that quoting the right hand side of - the regexp matching operator quotes special regexp characters in the word, + This section does not mention behavior that is standard for a particular + version (e.g., setting ccoommppaatt3322 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 versions). - If a user enables, say, ccoommppaatt3322, it may affect the behavior of other com- + If a user enables, say, ccoommppaatt3322, it may affect the behavior of other com- patibility levels up to and including the current compatibility level. The - idea is that each compatibility level controls behavior that changed in - that version of bbaasshh, but that behavior may have been present in earlier - versions. For instance, the change to use locale-based comparisons with + idea is that each compatibility level controls behavior that changed in + that version of bbaasshh, but that behavior may have been present in earlier + versions. For instance, the change to use locale-based comparisons with the [[[[ command came in bash-4.1, and earlier versions used ASCII-based com- parisons, so enabling ccoommppaatt3322 will enable ASCII-based comparisons as well. - That granularity may not be sufficient for all uses, and as a result users + That granularity may not be sufficient 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: BBAASSHH__CCOOMMPPAATT. The value assigned - to this variable (a decimal version number like 4.2, or an integer corre- - sponding to the ccoommppaatt_N_N option, like 42) determines the compatibility + Bash-4.3 introduced a new shell variable: BBAASSHH__CCOOMMPPAATT. The value assigned + to this variable (a decimal version number like 4.2, or an integer corre- + sponding to the ccoommppaatt_N_N option, like 42) determines the compatibility level. - Starting with bash-4.4, bbaasshh began deprecating older compatibility levels. + Starting with bash-4.4, bbaasshh began deprecating older compatibility levels. Eventually, the options will be removed in favor of BBAASSHH__CCOOMMPPAATT. - Bash-5.0 was the final version for which there was an individual shopt op- - tion for the previous version. BBAASSHH__CCOOMMPPAATT is the only mechanism to con- + Bash-5.0 was the final version for which there was an individual shopt op- + tion for the previous version. BBAASSHH__CCOOMMPPAATT is the only mechanism to con- trol the compatibility level in versions newer than bash-5.0. - The following table describes the behavior changes controlled by each com- - patibility level setting. The ccoommppaatt_N_N tag is used as shorthand for set- - ting the compatibility level to _N_N using one of the following mechanisms. - For versions prior to bash-5.0, the compatibility level may be set using - the corresponding ccoommppaatt_N_N shopt option. For bash-4.3 and later versions, - the BBAASSHH__CCOOMMPPAATT variable is preferred, and it is required for bash-5.1 and + The following table describes the behavior changes controlled by each com- + patibility level setting. The ccoommppaatt_N_N tag is used as shorthand for set- + ting the compatibility level to _N_N using one of the following mechanisms. + For versions prior to bash-5.0, the compatibility level may be set using + the corresponding ccoommppaatt_N_N shopt option. For bash-4.3 and later versions, + the BBAASSHH__CCOOMMPPAATT variable is preferred, and it is required for bash-5.1 and later versions. ccoommppaatt3311 - * Quoting the rhs of the [[[[ command's regexp matching operator + * Quoting the rhs of the [[[[ command's regexp matching operator (=~) has no special effect. ccoommppaatt3322 - * The << and >> operators to the [[[[ command do not consider the - current locale when comparing strings; they use ASCII order- + * The << and >> operators to the [[[[ command do not consider the + current locale when comparing strings; they use ASCII order- ing. ccoommppaatt4400 - * The << and >> operators to the [[[[ command do not consider the - current locale when comparing strings; they use ASCII order- + * The << and >> operators to the [[[[ command do not consider the + current locale when comparing strings; they use ASCII order- ing. BBaasshh versions prior to bash-4.1 use ASCII collation and _s_t_r_c_m_p(3); bash-4.1 and later use the current locale's colla- tion sequence and _s_t_r_c_o_l_l(3). ccoommppaatt4411 - * In posix mode, ttiimmee may be followed by options and still be - recognized as a reserved word (this is POSIX interpretation + * In posix mode, ttiimmee may be followed by options and still be + recognized as a reserved word (this is POSIX interpretation 267). - * In _p_o_s_i_x mode, the parser requires that an even number of - single quotes occur in the _w_o_r_d portion of a double-quoted - parameter expansion and treats them specially, so that char- - acters within the single quotes are considered quoted (this + * In _p_o_s_i_x mode, the parser requires that an even number of + single quotes occur in the _w_o_r_d portion of a double-quoted + parameter expansion and treats them specially, so that char- + acters within the single quotes are considered quoted (this is POSIX interpretation 221). ccoommppaatt4422 - * The replacement string in double-quoted pattern substitution - does not undergo quote removal, as it does in versions after + * The replacement string in double-quoted pattern substitution + does not undergo quote removal, as it does in versions after bash-4.2. - * In posix mode, single quotes are considered special when ex- - panding the _w_o_r_d portion of a double-quoted parameter expan- - sion and can be used to quote a closing brace or other spe- + * In posix mode, single quotes are considered special when ex- + panding the _w_o_r_d portion of a double-quoted parameter expan- + sion and can be used to quote a closing brace or other spe- cial character (this is part of POSIX interpretation 221); in - later versions, single quotes are not special within double- + later versions, single quotes are not special within double- quoted word expansions. ccoommppaatt4433 - * 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 + * 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). - * When executing a shell function, the loop state (while/un- - til/etc.) is not reset, so bbrreeaakk or ccoonnttiinnuuee in that func- - tion will break or continue loops in the calling context. + * When executing a shell function, the loop state (while/un- + til/etc.) is not reset, so bbrreeaakk or ccoonnttiinnuuee in that func- + tion will break or continue loops in the calling context. Bash-4.4 and later reset the loop state to prevent this. ccoommppaatt4444 - * The shell sets up the values used by BBAASSHH__AARRGGVV and BBAASSHH__AARRGGCC - so they can expand to the shell's positional parameters even + * The shell sets up the values used by BBAASSHH__AARRGGVV and BBAASSHH__AARRGGCC + so they can expand to the shell's positional parameters even if extended debugging mode is not enabled. - * A subshell inherits loops from its parent context, so bbrreeaakk - or ccoonnttiinnuuee will cause the subshell to exit. Bash-5.0 and + * A subshell inherits loops from its parent context, so bbrreeaakk + or ccoonnttiinnuuee will cause the subshell to exit. Bash-5.0 and later reset the loop state to prevent the exit * Variable assignments preceding builtins like eexxppoorrtt and rreeaadd-- - oonnllyy that set attributes continue to affect variables with + oonnllyy that set attributes continue to affect variables with the same name in the calling environment even if the shell is not in posix mode. ccoommppaatt5500 - * Bash-5.1 changed the way $$RRAANNDDOOMM is generated to introduce - slightly more randomness. If the shell compatibility level + * Bash-5.1 changed the way $$RRAANNDDOOMM is generated to introduce + slightly more randomness. If the shell compatibility level is set to 50 or lower, it reverts to the method from bash-5.0 and previous versions, so seeding the random number generator by assigning a value to RRAANNDDOOMM will produce the same sequence as in bash-5.0. - * If the command hash table is empty, bash versions prior to - bash-5.1 printed an informational message to that effect, - even when producing output that can be reused as input. - Bash-5.1 suppresses that message when the --ll option is sup- + * If the command hash table is empty, bash versions prior to + bash-5.1 printed an informational message to that effect, + even when producing output that can be reused as input. + Bash-5.1 suppresses that message when the --ll option is sup- plied. ccoommppaatt5511 * The uunnsseett builtin treats attempts to unset array subscripts @@ - and ** differently depending on whether the array is indexed + and ** differently depending on whether the array is indexed or associative, and differently than in previous versions. - * Arithmetic commands ( ((((...)))) ) and the expressions in an + * Arithmetic commands ( ((((...)))) ) and the expressions in an arithmetic for statement can be expanded more than once. - * Expressions used as arguments to arithmetic operators in the + * Expressions used as arguments to arithmetic operators in the [[[[ conditional command can be expanded more than once. * The expressions in substring parameter brace expansion can be expanded more than once. - * The expressions in the $$((((...)))) word expansion can be ex- + * The expressions in the $$((((...)))) word expansion can be ex- panded more than once. - * Arithmetic expressions used as indexed array subscripts can + * Arithmetic expressions used as indexed array subscripts can be expanded more than once. * tteesstt --vv, when given an argument of AA[[@@]], where AA is an exist- - ing associative array, will return true if the array has any - set elements. Bash-5.2 will look for and report on a key + ing associative array, will return true if the array has any + set elements. Bash-5.2 will look for and report on a key named @@. - * The ${_p_a_r_a_m_e_t_e_r[[::]]==_v_a_l_u_e} word expansion will return _v_a_l_u_e, - before any variable-specific transformations have been per- + * The ${_p_a_r_a_m_e_t_e_r[[::]]==_v_a_l_u_e} word expansion will return _v_a_l_u_e, + before any variable-specific transformations have been per- formed (e.g., converting to lowercase). Bash-5.2 will return the final value assigned to the variable. - * Parsing command substitutions will behave as if extended - globbing (see the description of the sshhoopptt builtin above) is + * Parsing command substitutions will behave as if extended + globbing (see the description of the sshhoopptt builtin above) is enabled, so that parsing a command substitution containing an - extglob pattern (say, as part of a shell function) will not - fail. This assumes the intent is to enable extglob before - the command is executed and word expansions are performed. - It will fail at word expansion time if extglob hasn't been + extglob pattern (say, as part of a shell function) will not + fail. This assumes the intent is to enable extglob before + the command is executed and word expansions are performed. + It will fail at word expansion time if extglob hasn't been enabled by the time the command is executed. ccoommppaatt5522 - * The tteesstt builtin uses its historical algorithm to parse - parenthesized subexpressions when given five or more argu- + * The tteesstt builtin uses its historical algorithm to parse + parenthesized subexpressions when given five or more argu- ments. - * If the --pp or --PP option is supplied to the bbiinndd builtin, bbiinndd - treats any arguments remaining after option processing as - bindable command names, and displays any key sequences bound - to those commands, instead of treating the arguments as key + * If the --pp or --PP option is supplied to the bbiinndd builtin, bbiinndd + treats any arguments remaining after option processing as + bindable command names, and displays any key sequences bound + to those commands, instead of treating the arguments as key sequences to bind. + ccoommppaatt5533 + * When expanding the right-hand side of a word expansion opera- + tor (e.g., "-") that is enclosed in double quotes, embedded + double quotes delimit variable expansions instead of being + stripped. Previous versions stripped them for compatibility + with historical versions of the Bourne shell. + RREESSTTRRIICCTTEEDD SSHHEELLLL If bbaasshh is started with the name rrbbaasshh, or the --rr option is supplied at in- vocation, the shell becomes _r_e_s_t_r_i_c_t_e_d. A restricted shell is used to set @@ -7297,35 +7307,34 @@ RREESSTTRRIICCTTEEDD SSHHEELLLL * Specifying a filename containing a slash as an argument to the hhiiss-- ttoorryy builtin command. - * Specifying a filename containing a slash as an argument to the --pp - option to the hhaasshh builtin command. + * Using the --pp option to the hhaasshh builtin command. - * Importing function definitions from the shell environment at + * Importing function definitions from the shell environment at startup. * Parsing the values of BBAASSHHOOPPTTSS and SSHHEELLLLOOPPTTSS from the shell environ- ment at startup. - * Redirecting output using the >, >|, <>, >&, &>, and >> redirection + * Redirecting output using the >, >|, <>, >&, &>, and >> redirection operators. - * Using the eexxeecc builtin command to replace the shell with another + * Using the eexxeecc builtin command to replace the shell with another command. - * Adding or deleting builtin commands with the --ff and --dd options to + * Adding or deleting builtin commands with the --ff and --dd options to the eennaabbllee builtin command. * Using the eennaabbllee builtin command to enable disabled shell builtins. * Specifying the --pp option to the ccoommmmaanndd builtin command. - * Turning off restricted mode with sseett ++rr or sshhoopptt --uu rree-- + * Turning off restricted mode with sseett ++rr or sshhoopptt --uu rree-- ssttrriicctteedd__sshheellll. These restrictions are enforced after any startup files are read. - When a command that is found to be a shell script is executed (see CCOOMMMMAANNDD - EEXXEECCUUTTIIOONN above), rrbbaasshh turns off any restrictions in the shell spawned to + When a command that is found to be a shell script is executed (see CCOOMMMMAANNDD + EEXXEECCUUTTIIOONN above), rrbbaasshh turns off any restrictions in the shell spawned to execute the script. SSEEEE AALLSSOO @@ -7364,16 +7373,16 @@ AAUUTTHHOORRSS Chet Ramey, Case Western Reserve University BBUUGG RREEPPOORRTTSS - If you find a bug in bbaasshh, you should report it. But first, you should - make sure that it really is a bug, and that it appears in the latest ver- - sion of bbaasshh. The latest version is always available from + If you find a bug in bbaasshh, you should report it. But first, you should + make sure that it really is a bug, and that it appears in the latest ver- + sion of bbaasshh. The latest version is always available from ftp://ftp.gnu.org/pub/gnu/bash/ and http://git.savannah.gnu.org/cgit/bash .git/snapshot/bash-master.tar.gz. - Once you have determined that a bug actually exists, use the _b_a_s_h_b_u_g com- + Once you have determined that a bug actually exists, use the _b_a_s_h_b_u_g com- mand 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, as - well as comments and bug reports concerning this manual page, to to + well as comments and bug reports concerning this manual page, to to bug-bash@gnu.org. _A_l_l bug reports should include: @@ -7381,8 +7390,8 @@ BBUUGG RREEPPOORRTTSS * the version number of bbaasshh ("echo $BASH_VERSION"), * the host platform and operating system ("uname -a"), * either - (a) if you or an administrator built and installed bbaasshh from source, - the name and version of the compiler used to build it, as reported + (a) if you or an administrator built and installed bbaasshh from source, + the name and version of the compiler used to build it, as reported by bbaasshh's "configure" script; or (b) if your site uses a distributor's bbaasshh package, the version of that package (for example, "dpkg -i bash" or "rpm -qi bash"), @@ -7390,14 +7399,14 @@ BBUUGG RREEPPOORRTTSS * a description of the behavior you expected from bbaasshh, and * a short shell script or "recipe" exercising the unexpected behavior. - _b_a_s_h_b_u_g inserts the first three items automatically into the template it + _b_a_s_h_b_u_g inserts the first three items automatically into the template it provides for filing a bug report. BBUUGGSS It's too big and too slow. - There are some subtle differences between bbaasshh and historical versions of - sshh, due mostly to bbaasshh's independent implementation and the evolution of + There are some subtle differences between bbaasshh and historical versions of + sshh, due mostly to bbaasshh's independent implementation and the evolution of the POSIX specification. Aliases are confusing in some uses. @@ -7405,13 +7414,13 @@ BBUUGGSS 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 + 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 immediately bring it into the + to start the command in the background and immediately bring it into the foreground. Array variables may not (yet) be exported. -GNU Bash 5.4 2026 August 27 _B_A_S_H(1) +GNU Bash 5.4 2026 November 11 _B_A_S_H(1) diff --git a/doc/bash.1 b/doc/bash.1 index 12d9bd9e..013ca3d4 100644 --- a/doc/bash.1 +++ b/doc/bash.1 @@ -5,7 +5,7 @@ .\" Case Western Reserve University .\" chet.ramey@case.edu .\" -.\" Last Change: Wed Sep 9 14:19:33 EDT 2026 +.\" Last Change: Wed Nov 11 09:46:48 EST 2026 .\" .\" For bash_builtins, strip all but "SHELL BUILTIN COMMANDS" section .\" For rbash, strip all but "RESTRICTED SHELL" section @@ -22,7 +22,7 @@ .ds zX \" empty .if \n(zZ=1 .ig zZ .if \n(zY=1 .ig zY -.TH BASH 1 "2026 September 9" "GNU Bash 5.4" +.TH BASH 1 "2026 November 11" "GNU Bash 5.4" .\" .ie \n(.g \{\ .ds ' \(aq @@ -13595,6 +13595,21 @@ displays any key sequences bound to those commands, instead of treating the arguments as key sequences to bind. .RE .PD +.TP +\fBcompat53\fP +.PD 0 +.RS +.IP \(bu +When expanding the right-hand side of a word expansion operator +(e.g., +.Q - ) +that is enclosed in double quotes, +embedded double quotes delimit variable expansions instead of being +stripped. +Previous versions stripped them for compatibility with historical +versions of the Bourne shell. +.RE +.PD .\" bash_builtins .if \n(zZ=1 .ig zZ .SH "RESTRICTED SHELL" @@ -13646,7 +13661,7 @@ Specifying a filename containing a slash as an argument to the .B history builtin command. .IP \(bu -Specifying a filename containing a slash as an argument to the +Using the .B \-p option to the .B hash diff --git a/doc/bash.info b/doc/bash.info index 7397ab4e..8dd475fd 100644 --- a/doc/bash.info +++ b/doc/bash.info @@ -1,9 +1,9 @@ This is bash.info, produced by makeinfo version 7.3 from bashref.texi. This text is a brief description of the features that are present in the -Bash shell (version 5.4, 27 August 2026). +Bash shell (version 5.4, 11 November 2026). - This is Edition 5.4, last updated 27 August 2026, of ‘The GNU Bash + This is Edition 5.4, last updated 11 November 2026, of ‘The GNU Bash Reference Manual’, for ‘Bash’, Version 5.4. Copyright © 1988-2026 Free Software Foundation, Inc. @@ -26,10 +26,10 @@ Bash Features ************* This text is a brief description of the features that are present in the -Bash shell (version 5.4, 27 August 2026). The Bash home page is +Bash shell (version 5.4, 11 November 2026). The Bash home page is . - This is Edition 5.4, last updated 27 August 2026, of ‘The GNU Bash + This is Edition 5.4, last updated 11 November 2026, of ‘The GNU Bash Reference Manual’, for ‘Bash’, Version 5.4. Bash contains features that appear in other popular shells, and some @@ -3598,7 +3598,7 @@ standard. If COMMAND is supplied, it replaces the shell without creating a new process. COMMAND cannot be a shell builtin or function. The - ARGUMENTS become the arguments to COMMAND If the ‘-l’ option is + ARGUMENTS become the arguments to COMMAND. If the ‘-l’ option is supplied, the shell places a dash at the beginning of the zeroth argument passed to COMMAND. This is what the ‘login’ program does. The ‘-c’ option causes COMMAND to be executed with an empty @@ -4399,7 +4399,7 @@ standard. there is an error loading a new builtin from a shared object. ‘help’ - help [-dms] [PATTERN] + help [-dmsL] [PATTERN] Display helpful information about builtin commands. If PATTERN is specified, ‘help’ gives detailed help on all commands matching @@ -4415,6 +4415,10 @@ standard. format ‘-s’ Display only a short usage synopsis for each PATTERN + ‘-L’ + When displaying a list of all the builtins and shell compound + commands, display each item using a single column instead of + using multiple columns. If PATTERN contains pattern matching characters (*note Pattern Matching::) it's treated as a shell pattern and ‘help’ prints the @@ -7646,7 +7650,6 @@ can appear in the prompt variables ‘PS0’, ‘PS1’, ‘PS2’, and ‘PS4 only useful when the prompt will be supplied to Readline, and is ignored and removed otherwise, so it shouldn't be used in ‘PS0’ or ‘PS4’, or when line editing is not enabled. - ‘\]’ End a sequence of non-printing characters begun with ‘\[’ @@ -7685,8 +7688,7 @@ with the exception that the following are disallowed or not performed: search path. • Specifying a filename containing a slash as an argument to the ‘history’ builtin command. - • Specifying a filename containing a slash as an argument to the ‘-p’ - option to the ‘hash’ builtin command. + • Using the ‘-p’ option to the ‘hash’ builtin command. • Importing function definitions from the shell environment at startup. • Parsing the value of ‘SHELLOPTS’ from the shell environment at @@ -8299,6 +8301,13 @@ required for bash-5.1 and later versions. while sourcing a script. Newer versions defer notification until script execution completes. +‘compat53 (set using BASH_COMPAT)’ + • When expanding the right-hand side of a word expansion + operator (e.g., ‘-’) that is enclosed in double quotes, + embedded double quotes delimit variable expansions instead of + being stripped. Previous versions stripped them for + compatibility with historical versions of the Bourne shell. +  File: bash.info, Node: Job Control, Next: Command Line Editing, Prev: Bash Features, Up: Top @@ -13096,19 +13105,19 @@ D.1 Index of Shell Builtin Commands (line 28) * kill: Job Control Builtins. (line 61) -* let: Bash Builtins. (line 404) -* local: Bash Builtins. (line 413) -* logout: Bash Builtins. (line 438) -* mapfile: Bash Builtins. (line 443) +* let: Bash Builtins. (line 408) +* local: Bash Builtins. (line 417) +* logout: Bash Builtins. (line 442) +* mapfile: Bash Builtins. (line 447) * popd: Directory Stack Builtins. (line 37) -* printf: Bash Builtins. (line 488) +* printf: Bash Builtins. (line 492) * pushd: Directory Stack Builtins. (line 71) * pwd: Bourne Shell Builtins. (line 265) -* read: Bash Builtins. (line 571) -* readarray: Bash Builtins. (line 682) +* read: Bash Builtins. (line 575) +* readarray: Bash Builtins. (line 686) * readonly: Bourne Shell Builtins. (line 277) * return: Bourne Shell Builtins. @@ -13117,7 +13126,7 @@ D.1 Index of Shell Builtin Commands * shift: Bourne Shell Builtins. (line 327) * shopt: The Shopt Builtin. (line 9) -* source: Bash Builtins. (line 691) +* source: Bash Builtins. (line 695) * suspend: Job Control Builtins. (line 141) * test: Bourne Shell Builtins. @@ -13128,12 +13137,12 @@ D.1 Index of Shell Builtin Commands (line 446) * true: Bourne Shell Builtins. (line 512) -* type: Bash Builtins. (line 696) -* typeset: Bash Builtins. (line 733) -* ulimit: Bash Builtins. (line 739) +* type: Bash Builtins. (line 700) +* typeset: Bash Builtins. (line 737) +* ulimit: Bash Builtins. (line 743) * umask: Bourne Shell Builtins. (line 517) -* unalias: Bash Builtins. (line 847) +* unalias: Bash Builtins. (line 851) * unset: Bourne Shell Builtins. (line 535) * wait: Job Control Builtins. @@ -13823,138 +13832,138 @@ D.5 Concept Index  Tag Table: -Node: Top897 -Node: Introduction2834 -Node: What is Bash?3047 -Node: What is a shell?4180 -Node: Definitions6790 -Node: Basic Shell Features10117 -Node: Shell Syntax11341 -Node: Shell Operation12368 -Node: Quoting13659 -Node: Escape Character14997 -Node: Single Quotes15532 -Node: Double Quotes15881 -Node: ANSI-C Quoting17226 -Node: Locale Translation18620 -Node: Creating Internationalized Scripts20023 -Node: Comments24221 -Node: Shell Commands24988 -Node: Reserved Words25927 -Node: Simple Commands27070 -Node: Pipelines27732 -Node: Lists30988 -Node: Compound Commands32937 -Node: Looping Constructs33946 -Node: Conditional Constructs36495 -Node: Command Grouping51807 -Node: Coprocesses53299 -Node: GNU Parallel55985 -Node: Shell Functions56903 -Node: Shell Parameters65351 -Node: Positional Parameters70252 -Node: Special Parameters71342 -Node: Shell Expansions74803 -Node: Brace Expansion76992 -Node: Tilde Expansion80328 -Node: Shell Parameter Expansion83283 -Node: Command Substitution104131 -Node: Arithmetic Expansion107982 -Node: Process Substitution109166 -Node: Word Splitting110333 -Node: Filename Expansion112777 -Node: Pattern Matching116001 -Node: Quote Removal121767 -Node: Redirections122071 -Node: Executing Commands132340 -Node: Simple Command Expansion133007 -Node: Command Search and Execution135115 -Node: Command Execution Environment137559 -Node: Environment141085 -Node: Exit Status142988 -Node: Signals145047 -Node: Shell Scripts149995 -Node: Shell Builtin Commands153299 -Node: Bourne Shell Builtins155640 -Node: Bash Builtins182353 -Node: Modifying Shell Behavior220088 -Node: The Set Builtin220430 -Node: The Shopt Builtin232556 -Node: Special Builtins250104 -Node: Shell Variables251093 -Node: Bourne Shell Variables251527 -Node: Bash Variables254035 -Node: Bash Features293339 -Node: Invoking Bash294353 -Node: Bash Startup Files301583 -Node: Interactive Shells306943 -Node: What is an Interactive Shell?307351 -Node: Is this Shell Interactive?308013 -Node: Interactive Shell Behavior308837 -Node: Bash Conditional Expressions312598 -Node: Shell Arithmetic318015 -Node: Aliases321342 -Node: Arrays324476 -Node: The Directory Stack332579 -Node: Directory Stack Builtins333376 -Node: Controlling the Prompt337821 -Node: The Restricted Shell340940 -Node: Bash POSIX Mode344033 -Node: Shell Compatibility Mode363992 -Node: Job Control372999 -Node: Job Control Basics373456 -Node: Job Control Builtins379824 -Node: Job Control Variables386612 -Node: Command Line Editing387843 -Node: Introduction and Notation389546 -Node: Readline Interaction391898 -Node: Readline Bare Essentials393086 -Node: Readline Movement Commands394894 -Node: Readline Killing Commands395890 -Node: Readline Arguments397913 -Node: Searching399003 -Node: Readline Init File401246 -Node: Readline Init File Syntax402549 -Node: Conditional Init Constructs429500 -Node: Sample Init File433885 -Node: Bindable Readline Commands437005 -Node: Commands For Moving438543 -Node: Commands For History441007 -Node: Commands For Text447164 -Node: Commands For Killing451289 -Node: Numeric Arguments454077 -Node: Commands For Completion455229 -Node: Keyboard Macros460925 -Node: Miscellaneous Commands461626 -Node: Readline vi Mode469169 -Node: Programmable Completion470146 -Node: Programmable Completion Builtins479882 -Node: A Programmable Completion Example491619 -Node: Using History Interactively496964 -Node: Bash History Facilities497645 -Node: Bash History Builtins502311 -Node: History Interaction509906 -Node: Event Designators514856 -Node: Word Designators516434 -Node: Modifiers518826 -Node: Installing Bash520763 -Node: Basic Installation521879 -Node: Compilers and Options525755 -Node: Compiling For Multiple Architectures526505 -Node: Installation Names528258 -Node: Specifying the System Type530492 -Node: Sharing Defaults531238 -Node: Operation Controls531952 -Node: Optional Features532971 -Node: Reporting Bugs545694 -Node: Major Differences From The Bourne Shell547051 -Node: GNU Free Documentation License568478 -Node: Indexes593655 -Node: Builtin Index594106 -Node: Reserved Word Index601204 -Node: Variable Index603649 -Node: Function Index621062 -Node: Concept Index635487 +Node: Top901 +Node: Introduction2842 +Node: What is Bash?3055 +Node: What is a shell?4188 +Node: Definitions6798 +Node: Basic Shell Features10125 +Node: Shell Syntax11349 +Node: Shell Operation12376 +Node: Quoting13667 +Node: Escape Character15005 +Node: Single Quotes15540 +Node: Double Quotes15889 +Node: ANSI-C Quoting17234 +Node: Locale Translation18628 +Node: Creating Internationalized Scripts20031 +Node: Comments24229 +Node: Shell Commands24996 +Node: Reserved Words25935 +Node: Simple Commands27078 +Node: Pipelines27740 +Node: Lists30996 +Node: Compound Commands32945 +Node: Looping Constructs33954 +Node: Conditional Constructs36503 +Node: Command Grouping51815 +Node: Coprocesses53307 +Node: GNU Parallel55993 +Node: Shell Functions56911 +Node: Shell Parameters65359 +Node: Positional Parameters70260 +Node: Special Parameters71350 +Node: Shell Expansions74811 +Node: Brace Expansion77000 +Node: Tilde Expansion80336 +Node: Shell Parameter Expansion83291 +Node: Command Substitution104139 +Node: Arithmetic Expansion107990 +Node: Process Substitution109174 +Node: Word Splitting110341 +Node: Filename Expansion112785 +Node: Pattern Matching116009 +Node: Quote Removal121775 +Node: Redirections122079 +Node: Executing Commands132348 +Node: Simple Command Expansion133015 +Node: Command Search and Execution135123 +Node: Command Execution Environment137567 +Node: Environment141093 +Node: Exit Status142996 +Node: Signals145055 +Node: Shell Scripts150003 +Node: Shell Builtin Commands153307 +Node: Bourne Shell Builtins155648 +Node: Bash Builtins182363 +Node: Modifying Shell Behavior220290 +Node: The Set Builtin220632 +Node: The Shopt Builtin232758 +Node: Special Builtins250306 +Node: Shell Variables251295 +Node: Bourne Shell Variables251729 +Node: Bash Variables254237 +Node: Bash Features293541 +Node: Invoking Bash294555 +Node: Bash Startup Files301785 +Node: Interactive Shells307145 +Node: What is an Interactive Shell?307553 +Node: Is this Shell Interactive?308215 +Node: Interactive Shell Behavior309039 +Node: Bash Conditional Expressions312800 +Node: Shell Arithmetic318217 +Node: Aliases321544 +Node: Arrays324678 +Node: The Directory Stack332781 +Node: Directory Stack Builtins333578 +Node: Controlling the Prompt338023 +Node: The Restricted Shell341141 +Node: Bash POSIX Mode344176 +Node: Shell Compatibility Mode364135 +Node: Job Control373524 +Node: Job Control Basics373981 +Node: Job Control Builtins380349 +Node: Job Control Variables387137 +Node: Command Line Editing388368 +Node: Introduction and Notation390071 +Node: Readline Interaction392423 +Node: Readline Bare Essentials393611 +Node: Readline Movement Commands395419 +Node: Readline Killing Commands396415 +Node: Readline Arguments398438 +Node: Searching399528 +Node: Readline Init File401771 +Node: Readline Init File Syntax403074 +Node: Conditional Init Constructs430025 +Node: Sample Init File434410 +Node: Bindable Readline Commands437530 +Node: Commands For Moving439068 +Node: Commands For History441532 +Node: Commands For Text447689 +Node: Commands For Killing451814 +Node: Numeric Arguments454602 +Node: Commands For Completion455754 +Node: Keyboard Macros461450 +Node: Miscellaneous Commands462151 +Node: Readline vi Mode469694 +Node: Programmable Completion470671 +Node: Programmable Completion Builtins480407 +Node: A Programmable Completion Example492144 +Node: Using History Interactively497489 +Node: Bash History Facilities498170 +Node: Bash History Builtins502836 +Node: History Interaction510431 +Node: Event Designators515381 +Node: Word Designators516959 +Node: Modifiers519351 +Node: Installing Bash521288 +Node: Basic Installation522404 +Node: Compilers and Options526280 +Node: Compiling For Multiple Architectures527030 +Node: Installation Names528783 +Node: Specifying the System Type531017 +Node: Sharing Defaults531763 +Node: Operation Controls532477 +Node: Optional Features533496 +Node: Reporting Bugs546219 +Node: Major Differences From The Bourne Shell547576 +Node: GNU Free Documentation License569003 +Node: Indexes594180 +Node: Builtin Index594631 +Node: Reserved Word Index601729 +Node: Variable Index604174 +Node: Function Index621587 +Node: Concept Index636012  End Tag Table diff --git a/doc/bashref.info b/doc/bashref.info index be8c16d3..cfb8c274 100644 --- a/doc/bashref.info +++ b/doc/bashref.info @@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 7.3 from bashref.texi. This text is a brief description of the features that are present in the -Bash shell (version 5.4, 27 August 2026). +Bash shell (version 5.4, 11 November 2026). - This is Edition 5.4, last updated 27 August 2026, of ‘The GNU Bash + This is Edition 5.4, last updated 11 November 2026, of ‘The GNU Bash Reference Manual’, for ‘Bash’, Version 5.4. Copyright © 1988-2026 Free Software Foundation, Inc. @@ -27,10 +27,10 @@ Bash Features ************* This text is a brief description of the features that are present in the -Bash shell (version 5.4, 27 August 2026). The Bash home page is +Bash shell (version 5.4, 11 November 2026). The Bash home page is . - This is Edition 5.4, last updated 27 August 2026, of ‘The GNU Bash + This is Edition 5.4, last updated 11 November 2026, of ‘The GNU Bash Reference Manual’, for ‘Bash’, Version 5.4. Bash contains features that appear in other popular shells, and some @@ -3599,7 +3599,7 @@ standard. If COMMAND is supplied, it replaces the shell without creating a new process. COMMAND cannot be a shell builtin or function. The - ARGUMENTS become the arguments to COMMAND If the ‘-l’ option is + ARGUMENTS become the arguments to COMMAND. If the ‘-l’ option is supplied, the shell places a dash at the beginning of the zeroth argument passed to COMMAND. This is what the ‘login’ program does. The ‘-c’ option causes COMMAND to be executed with an empty @@ -4400,7 +4400,7 @@ standard. there is an error loading a new builtin from a shared object. ‘help’ - help [-dms] [PATTERN] + help [-dmsL] [PATTERN] Display helpful information about builtin commands. If PATTERN is specified, ‘help’ gives detailed help on all commands matching @@ -4416,6 +4416,10 @@ standard. format ‘-s’ Display only a short usage synopsis for each PATTERN + ‘-L’ + When displaying a list of all the builtins and shell compound + commands, display each item using a single column instead of + using multiple columns. If PATTERN contains pattern matching characters (*note Pattern Matching::) it's treated as a shell pattern and ‘help’ prints the @@ -7647,7 +7651,6 @@ can appear in the prompt variables ‘PS0’, ‘PS1’, ‘PS2’, and ‘PS4 only useful when the prompt will be supplied to Readline, and is ignored and removed otherwise, so it shouldn't be used in ‘PS0’ or ‘PS4’, or when line editing is not enabled. - ‘\]’ End a sequence of non-printing characters begun with ‘\[’ @@ -7686,8 +7689,7 @@ with the exception that the following are disallowed or not performed: search path. • Specifying a filename containing a slash as an argument to the ‘history’ builtin command. - • Specifying a filename containing a slash as an argument to the ‘-p’ - option to the ‘hash’ builtin command. + • Using the ‘-p’ option to the ‘hash’ builtin command. • Importing function definitions from the shell environment at startup. • Parsing the value of ‘SHELLOPTS’ from the shell environment at @@ -8300,6 +8302,13 @@ required for bash-5.1 and later versions. while sourcing a script. Newer versions defer notification until script execution completes. +‘compat53 (set using BASH_COMPAT)’ + • When expanding the right-hand side of a word expansion + operator (e.g., ‘-’) that is enclosed in double quotes, + embedded double quotes delimit variable expansions instead of + being stripped. Previous versions stripped them for + compatibility with historical versions of the Bourne shell. +  File: bashref.info, Node: Job Control, Next: Command Line Editing, Prev: Bash Features, Up: Top @@ -13097,19 +13106,19 @@ D.1 Index of Shell Builtin Commands (line 28) * kill: Job Control Builtins. (line 61) -* let: Bash Builtins. (line 404) -* local: Bash Builtins. (line 413) -* logout: Bash Builtins. (line 438) -* mapfile: Bash Builtins. (line 443) +* let: Bash Builtins. (line 408) +* local: Bash Builtins. (line 417) +* logout: Bash Builtins. (line 442) +* mapfile: Bash Builtins. (line 447) * popd: Directory Stack Builtins. (line 37) -* printf: Bash Builtins. (line 488) +* printf: Bash Builtins. (line 492) * pushd: Directory Stack Builtins. (line 71) * pwd: Bourne Shell Builtins. (line 265) -* read: Bash Builtins. (line 571) -* readarray: Bash Builtins. (line 682) +* read: Bash Builtins. (line 575) +* readarray: Bash Builtins. (line 686) * readonly: Bourne Shell Builtins. (line 277) * return: Bourne Shell Builtins. @@ -13118,7 +13127,7 @@ D.1 Index of Shell Builtin Commands * shift: Bourne Shell Builtins. (line 327) * shopt: The Shopt Builtin. (line 9) -* source: Bash Builtins. (line 691) +* source: Bash Builtins. (line 695) * suspend: Job Control Builtins. (line 141) * test: Bourne Shell Builtins. @@ -13129,12 +13138,12 @@ D.1 Index of Shell Builtin Commands (line 446) * true: Bourne Shell Builtins. (line 512) -* type: Bash Builtins. (line 696) -* typeset: Bash Builtins. (line 733) -* ulimit: Bash Builtins. (line 739) +* type: Bash Builtins. (line 700) +* typeset: Bash Builtins. (line 737) +* ulimit: Bash Builtins. (line 743) * umask: Bourne Shell Builtins. (line 517) -* unalias: Bash Builtins. (line 847) +* unalias: Bash Builtins. (line 851) * unset: Bourne Shell Builtins. (line 535) * wait: Job Control Builtins. @@ -13824,138 +13833,138 @@ D.5 Concept Index  Tag Table: -Node: Top900 -Node: Introduction2840 -Node: What is Bash?3056 -Node: What is a shell?4192 -Node: Definitions6805 -Node: Basic Shell Features10135 -Node: Shell Syntax11362 -Node: Shell Operation12392 -Node: Quoting13686 -Node: Escape Character15027 -Node: Single Quotes15565 -Node: Double Quotes15917 -Node: ANSI-C Quoting17265 -Node: Locale Translation18662 -Node: Creating Internationalized Scripts20068 -Node: Comments24269 -Node: Shell Commands25039 -Node: Reserved Words25981 -Node: Simple Commands27127 -Node: Pipelines27792 -Node: Lists31051 -Node: Compound Commands33003 -Node: Looping Constructs34015 -Node: Conditional Constructs36567 -Node: Command Grouping51882 -Node: Coprocesses53377 -Node: GNU Parallel56066 -Node: Shell Functions56987 -Node: Shell Parameters65438 -Node: Positional Parameters70342 -Node: Special Parameters71435 -Node: Shell Expansions74899 -Node: Brace Expansion77091 -Node: Tilde Expansion80430 -Node: Shell Parameter Expansion83388 -Node: Command Substitution104239 -Node: Arithmetic Expansion108093 -Node: Process Substitution109280 -Node: Word Splitting110450 -Node: Filename Expansion112897 -Node: Pattern Matching116124 -Node: Quote Removal121893 -Node: Redirections122200 -Node: Executing Commands132472 -Node: Simple Command Expansion133142 -Node: Command Search and Execution135253 -Node: Command Execution Environment137700 -Node: Environment141229 -Node: Exit Status143135 -Node: Signals145197 -Node: Shell Scripts150148 -Node: Shell Builtin Commands153455 -Node: Bourne Shell Builtins155799 -Node: Bash Builtins182515 -Node: Modifying Shell Behavior220253 -Node: The Set Builtin220598 -Node: The Shopt Builtin232727 -Node: Special Builtins250278 -Node: Shell Variables251270 -Node: Bourne Shell Variables251707 -Node: Bash Variables254218 -Node: Bash Features293525 -Node: Invoking Bash294542 -Node: Bash Startup Files301775 -Node: Interactive Shells307138 -Node: What is an Interactive Shell?307549 -Node: Is this Shell Interactive?308214 -Node: Interactive Shell Behavior309041 -Node: Bash Conditional Expressions312805 -Node: Shell Arithmetic318225 -Node: Aliases321555 -Node: Arrays324692 -Node: The Directory Stack332798 -Node: Directory Stack Builtins333598 -Node: Controlling the Prompt338046 -Node: The Restricted Shell341168 -Node: Bash POSIX Mode344264 -Node: Shell Compatibility Mode364226 -Node: Job Control373236 -Node: Job Control Basics373696 -Node: Job Control Builtins380067 -Node: Job Control Variables386858 -Node: Command Line Editing388092 -Node: Introduction and Notation389798 -Node: Readline Interaction392153 -Node: Readline Bare Essentials393344 -Node: Readline Movement Commands395155 -Node: Readline Killing Commands396154 -Node: Readline Arguments398180 -Node: Searching399273 -Node: Readline Init File401519 -Node: Readline Init File Syntax402825 -Node: Conditional Init Constructs429779 -Node: Sample Init File434167 -Node: Bindable Readline Commands437290 -Node: Commands For Moving438831 -Node: Commands For History441298 -Node: Commands For Text447458 -Node: Commands For Killing451586 -Node: Numeric Arguments454377 -Node: Commands For Completion455532 -Node: Keyboard Macros461231 -Node: Miscellaneous Commands461935 -Node: Readline vi Mode469481 -Node: Programmable Completion470461 -Node: Programmable Completion Builtins480200 -Node: A Programmable Completion Example491940 -Node: Using History Interactively497288 -Node: Bash History Facilities497972 -Node: Bash History Builtins502641 -Node: History Interaction510239 -Node: Event Designators515192 -Node: Word Designators516773 -Node: Modifiers519168 -Node: Installing Bash521108 -Node: Basic Installation522227 -Node: Compilers and Options526106 -Node: Compiling For Multiple Architectures526859 -Node: Installation Names528615 -Node: Specifying the System Type530852 -Node: Sharing Defaults531601 -Node: Operation Controls532318 -Node: Optional Features533340 -Node: Reporting Bugs546066 -Node: Major Differences From The Bourne Shell547426 -Node: GNU Free Documentation License568856 -Node: Indexes594036 -Node: Builtin Index594490 -Node: Reserved Word Index601591 -Node: Variable Index604039 -Node: Function Index621455 -Node: Concept Index635883 +Node: Top904 +Node: Introduction2848 +Node: What is Bash?3064 +Node: What is a shell?4200 +Node: Definitions6813 +Node: Basic Shell Features10143 +Node: Shell Syntax11370 +Node: Shell Operation12400 +Node: Quoting13694 +Node: Escape Character15035 +Node: Single Quotes15573 +Node: Double Quotes15925 +Node: ANSI-C Quoting17273 +Node: Locale Translation18670 +Node: Creating Internationalized Scripts20076 +Node: Comments24277 +Node: Shell Commands25047 +Node: Reserved Words25989 +Node: Simple Commands27135 +Node: Pipelines27800 +Node: Lists31059 +Node: Compound Commands33011 +Node: Looping Constructs34023 +Node: Conditional Constructs36575 +Node: Command Grouping51890 +Node: Coprocesses53385 +Node: GNU Parallel56074 +Node: Shell Functions56995 +Node: Shell Parameters65446 +Node: Positional Parameters70350 +Node: Special Parameters71443 +Node: Shell Expansions74907 +Node: Brace Expansion77099 +Node: Tilde Expansion80438 +Node: Shell Parameter Expansion83396 +Node: Command Substitution104247 +Node: Arithmetic Expansion108101 +Node: Process Substitution109288 +Node: Word Splitting110458 +Node: Filename Expansion112905 +Node: Pattern Matching116132 +Node: Quote Removal121901 +Node: Redirections122208 +Node: Executing Commands132480 +Node: Simple Command Expansion133150 +Node: Command Search and Execution135261 +Node: Command Execution Environment137708 +Node: Environment141237 +Node: Exit Status143143 +Node: Signals145205 +Node: Shell Scripts150156 +Node: Shell Builtin Commands153463 +Node: Bourne Shell Builtins155807 +Node: Bash Builtins182525 +Node: Modifying Shell Behavior220455 +Node: The Set Builtin220800 +Node: The Shopt Builtin232929 +Node: Special Builtins250480 +Node: Shell Variables251472 +Node: Bourne Shell Variables251909 +Node: Bash Variables254420 +Node: Bash Features293727 +Node: Invoking Bash294744 +Node: Bash Startup Files301977 +Node: Interactive Shells307340 +Node: What is an Interactive Shell?307751 +Node: Is this Shell Interactive?308416 +Node: Interactive Shell Behavior309243 +Node: Bash Conditional Expressions313007 +Node: Shell Arithmetic318427 +Node: Aliases321757 +Node: Arrays324894 +Node: The Directory Stack333000 +Node: Directory Stack Builtins333800 +Node: Controlling the Prompt338248 +Node: The Restricted Shell341369 +Node: Bash POSIX Mode344407 +Node: Shell Compatibility Mode364369 +Node: Job Control373761 +Node: Job Control Basics374221 +Node: Job Control Builtins380592 +Node: Job Control Variables387383 +Node: Command Line Editing388617 +Node: Introduction and Notation390323 +Node: Readline Interaction392678 +Node: Readline Bare Essentials393869 +Node: Readline Movement Commands395680 +Node: Readline Killing Commands396679 +Node: Readline Arguments398705 +Node: Searching399798 +Node: Readline Init File402044 +Node: Readline Init File Syntax403350 +Node: Conditional Init Constructs430304 +Node: Sample Init File434692 +Node: Bindable Readline Commands437815 +Node: Commands For Moving439356 +Node: Commands For History441823 +Node: Commands For Text447983 +Node: Commands For Killing452111 +Node: Numeric Arguments454902 +Node: Commands For Completion456057 +Node: Keyboard Macros461756 +Node: Miscellaneous Commands462460 +Node: Readline vi Mode470006 +Node: Programmable Completion470986 +Node: Programmable Completion Builtins480725 +Node: A Programmable Completion Example492465 +Node: Using History Interactively497813 +Node: Bash History Facilities498497 +Node: Bash History Builtins503166 +Node: History Interaction510764 +Node: Event Designators515717 +Node: Word Designators517298 +Node: Modifiers519693 +Node: Installing Bash521633 +Node: Basic Installation522752 +Node: Compilers and Options526631 +Node: Compiling For Multiple Architectures527384 +Node: Installation Names529140 +Node: Specifying the System Type531377 +Node: Sharing Defaults532126 +Node: Operation Controls532843 +Node: Optional Features533865 +Node: Reporting Bugs546591 +Node: Major Differences From The Bourne Shell547951 +Node: GNU Free Documentation License569381 +Node: Indexes594561 +Node: Builtin Index595015 +Node: Reserved Word Index602116 +Node: Variable Index604564 +Node: Function Index621980 +Node: Concept Index636408  End Tag Table diff --git a/doc/bashref.texi b/doc/bashref.texi index 198ba2f6..f07e0d4c 100644 --- a/doc/bashref.texi +++ b/doc/bashref.texi @@ -9254,7 +9254,8 @@ to specify a search path. Specifying a filename containing a slash as an argument to the @code{history} builtin command. @item -Specifying a filename containing a slash as an argument to the @option{-p} +Using the +@option{-p} option to the @code{hash} builtin command. @item Importing function definitions from the shell environment at startup. @@ -10059,6 +10060,18 @@ default. @end ignore @end itemize +@item compat53 (set using BASH_COMPAT) +@itemize @bullet +@item +When expanding the right-hand side of a word expansion operator +(e.g., @samp{-}) that is enclosed in double quotes, +embedded double quotes delimit variable expansions instead of being +stripped. +Previous versions stripped them for compatibility with historical +versions of the Bourne shell. + +@end itemize + @end table @node Job Control diff --git a/doc/rbash.0 b/doc/rbash.0 index 1f471739..7871464c 100644 --- a/doc/rbash.0 +++ b/doc/rbash.0 @@ -26,34 +26,33 @@ RREESSTTRRIICCTTEEDD SSHHEELLLL * Specifying a filename containing a slash as an argument to the hhiiss-- ttoorryy builtin command. - * Specifying a filename containing a slash as an argument to the --pp - option to the hhaasshh builtin command. + * Using the --pp option to the hhaasshh builtin command. - * Importing function definitions from the shell environment at + * Importing function definitions from the shell environment at startup. * Parsing the values of BBAASSHHOOPPTTSS and SSHHEELLLLOOPPTTSS from the shell environ- ment at startup. - * Redirecting output using the >, >|, <>, >&, &>, and >> redirection + * Redirecting output using the >, >|, <>, >&, &>, and >> redirection operators. - * Using the eexxeecc builtin command to replace the shell with another + * Using the eexxeecc builtin command to replace the shell with another command. - * Adding or deleting builtin commands with the --ff and --dd options to + * Adding or deleting builtin commands with the --ff and --dd options to the eennaabbllee builtin command. * Using the eennaabbllee builtin command to enable disabled shell builtins. * Specifying the --pp option to the ccoommmmaanndd builtin command. - * Turning off restricted mode with sseett ++rr or sshhoopptt --uu rree-- + * Turning off restricted mode with sseett ++rr or sshhoopptt --uu rree-- ssttrriicctteedd__sshheellll. These restrictions are enforced after any startup files are read. - When a command that is found to be a shell script is executed, rrbbaasshh turns + When a command that is found to be a shell script is executed, rrbbaasshh turns off any restrictions in the shell spawned to execute the script. SSEEEE AALLSSOO diff --git a/doc/version.texi b/doc/version.texi index 73cda03e..34ce8819 100644 --- a/doc/version.texi +++ b/doc/version.texi @@ -2,10 +2,10 @@ Copyright (C) 1988-2026 Free Software Foundation, Inc. @end ignore -@set LASTCHANGE Wed Sep 9 14:20:26 EDT 2026 +@set LASTCHANGE Wed Nov 11 09:47:03 EST 2026 @set EDITION 5.4 @set VERSION 5.4 -@set UPDATED 9 September 2026 -@set UPDATED-MONTH September 2026 +@set UPDATED 11 November 2026 +@set UPDATED-MONTH November 2026 diff --git a/execute_cmd.c b/execute_cmd.c index cb3ab314..a7f6d79a 100644 --- a/execute_cmd.c +++ b/execute_cmd.c @@ -5699,7 +5699,12 @@ execute_subshell_builtin_or_function (WORD_LIST *words, REDIRECT *redirects, do_piping (pipe_in, pipe_out); - if (do_redirections (redirects, RX_ACTIVE|RX_UNDOABLE) != 0) + if (signal_is_trapped (0)) + r = do_redirections (redirects, RX_ACTIVE|RX_UNDOABLE); + else + r = do_redirections (redirects, RX_ACTIVE); + + if (r != 0) exit (EXECUTION_FAILURE); has_exec_redirects = (builtin == exec_builtin) && redirection_undo_list; @@ -5783,6 +5788,9 @@ execute_subshell_builtin_or_function (WORD_LIST *words, REDIRECT *redirects, redirection_undo_list = signal_is_trapped (0) ? saved_undo_list : NULL; discard_unwind_frame ("subshell-saved-redirects"); } + else if (signal_is_trapped (0) == 0) + redirection_undo_list = NULL; + undo_partial_redirects (); subshell_exit (subshell_exit_value); diff --git a/lib/readline/complete.c b/lib/readline/complete.c index 87c63cca..9037b977 100644 --- a/lib/readline/complete.c +++ b/lib/readline/complete.c @@ -129,7 +129,7 @@ static int path_isdir (const char *); static char *rl_quote_filename (char *, int, char *); static void _rl_complete_sigcleanup (int, void *); -static void _rl_abort_completion (void) __attribute__((noreturn)); +static void _rl_abort_completion (void); __attribute__((noreturn)); static void set_completion_defaults (int); static int get_y_or_n (int); diff --git a/po/lv.gmo b/po/lv.gmo index ece403e8..914d0a11 100644 Binary files a/po/lv.gmo and b/po/lv.gmo differ diff --git a/po/lv.po b/po/lv.po index 7ba7c559..2f19e835 100644 --- a/po/lv.po +++ b/po/lv.po @@ -3,22 +3,21 @@ # This file is distributed under the same license as the bash package. # Rihards Priedītis , 2026. # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: bash-5.3-rc2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2025-04-22 09:37-0400\n" -"PO-Revision-Date: 2026-09-28 11:29+0300\n" +"PO-Revision-Date: 2026-11-07 21:01+0200\n" "Last-Translator: Rihards Priedītis \n" -"Language-Team: Latvian \n" +"Language-Team: Latvian \n" "Language: lv\n" "X-Bugs: Report translation errors to the Language-Team address.\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==0 || (n%100>=11 && n%100<=19) ? 0 : n%10==1 && n%100!=11 ? 1 : 2);\n" -"X-Generator: Poedit 3.9\n" +"X-Generator: Poedit 3.10\n" #: arrayfunc.c:63 msgid "bad array subscript" @@ -152,13 +151,13 @@ msgstr "" "Atgriež pašreizējās apakšprogrammas izsaukuma kontekstu.\n" " \n" " Bez EXPR atgriež \"$line $filename\". Ar EXPR atgriež\n" -" \"$line $apakšprogramma $filename\"; šo papildu informāciju var izmantot,\n" +" \"$line $subroutine $filename\"; šo papildu informāciju var izmantot,\n" " lai sniegtu steka izsekojumu.\n" " \n" " EXPR vērtība norāda, par cik izsaukumu kadriem jāatgriežas pirms\n" " pašreizējā; augšējais kadrs ir 0. kadrs.\n" " \n" -" Izejas statuss:\n" +" Izpildes statuss:\n" " Atgriež 0, ja vien čaula neizpilda čaulas funkciju vai EXPR\n" " nav derīgs." @@ -201,7 +200,7 @@ msgstr "%s: opcijai nepieciešams arguments" #: builtins/common.c:184 #, c-format msgid "%s: numeric argument required" -msgstr "%s: nepieciešams ciparu arguments" +msgstr "%s: nepieciešams skaitlisks arguments" #: builtins/common.c:190 #, c-format @@ -233,7 +232,7 @@ msgstr "nederīgs heksadecimālais skaitlis" #: builtins/common.c:223 expr.c:1577 expr.c:1591 msgid "invalid number" -msgstr "nederīgs numurs" +msgstr "nederīgs skaitlis" #: builtins/common.c:230 #, c-format @@ -321,7 +320,7 @@ msgstr "kļūda pašreizējās direktorijas iegūšanā" #: builtins/common.c:675 builtins/common.c:677 #, c-format msgid "%s: ambiguous job spec" -msgstr "%s: neskaidra darba specifikācija" +msgstr "%s: neviennozīmīga darba specifikācija" #: builtins/common.c:709 #, c-format @@ -525,7 +524,7 @@ msgstr "pašreizējais" #: builtins/fg_bg.def:159 #, c-format msgid "job %d started without job control" -msgstr "darbs %d sākts bez darba kontroles" +msgstr "darbs %d sākts bez darba vadības" #: builtins/getopt.c:110 #, c-format @@ -554,9 +553,9 @@ msgstr "trāpījumi\tkomanda\n" #: builtins/help.def:133 msgid "Shell commands matching keyword `" msgid_plural "Shell commands matching keywords `" -msgstr[0] "Čaulas komandas, kas atbilst atslēgas vārdiem `" -msgstr[1] "Čaulas komandas, kas atbilst atslēgas vārdiem `" -msgstr[2] "Čaulas komandas, kas atbilst atslēgas vārdiem `" +msgstr[0] "Čaulas komandas, kas atbilst atslēgvārdiem `" +msgstr[1] "Čaulas komandas, kas atbilst atslēgvārdam `" +msgstr[2] "Čaulas komandas, kas atbilst atslēgvārdiem `" #: builtins/help.def:135 msgid "" @@ -591,10 +590,12 @@ msgid "" "A star (*) next to a name means that the command is disabled.\n" "\n" msgstr "" -"Šīs čaulas komandas ir definētas iekšēji. Lai skatītu šo sarakstu, ievadiet `help'.\n" +"Šīs čaulas komandas ir definētas iekšēji. Lai skatītu šo sarakstu, ievadiet\n" +"`help'.\n" "Ievadiet `help name', lai uzzinātu vairāk par funkciju `name'.\n" "Izmantojiet `info bash', lai uzzinātu vairāk par čaulu kopumā.\n" -"Izmantojiet `man -k' vai `info', lai uzzinātu vairāk par komandām, kas nav šajā sarakstā.\n" +"Izmantojiet `man -k' vai `info', lai uzzinātu vairāk par komandām, kas nav šajā\n" +"sarakstā.\n" "\n" "Zvaigznīte (*) blakus nosaukumam nozīmē, ka komanda ir atspējota.\n" "\n" @@ -625,7 +626,7 @@ msgstr "%s: nederīgs laika zīmogs" #: builtins/history.def:470 #, c-format msgid "%s: history expansion failed" -msgstr "%s: komandas vēstures paplašināšana neizdevās" +msgstr "%s: vēstures izvērse neizdevās" #: builtins/jobs.def:109 msgid "no other options allowed with `-x'" @@ -642,7 +643,7 @@ msgstr "Nezināma kļūda" #: builtins/let.def:96 builtins/let.def:120 expr.c:647 expr.c:665 msgid "expression expected" -msgstr "gaidāma izteiksme" +msgstr "gaidīta izteiksme" #: builtins/mapfile.def:249 builtins/read.def:373 #, c-format @@ -679,7 +680,7 @@ msgstr "nepieciešams masīva mainīgo atbalsts" #: builtins/printf.def:483 #, c-format msgid "`%s': missing format character" -msgstr "`%s': trūkst formāta rakstzīme" +msgstr "`%s': trūkst formāta rakstzīmes" #: builtins/printf.def:609 #, c-format @@ -702,12 +703,12 @@ msgstr "formāta analīzes problēma: %s" #: builtins/printf.def:1113 msgid "missing hex digit for \\x" -msgstr "trūkst heksadecimālais cipars \\x" +msgstr "trūkst heksadecimālā cipara priekš \\x" #: builtins/printf.def:1128 #, c-format msgid "missing unicode digit for \\%c" -msgstr "trūkst Unicode cipars \\%c" +msgstr "trūkst Unicode cipara priekš \\%c" #: builtins/pushd.def:198 msgid "no other directory" @@ -724,11 +725,11 @@ msgstr "