mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-19 08:30:45 +02:00
change expansion for key-value pair compound assignment to associative arrays to split all words before identifying keys and values; controlled by a new shopt option: kvpair_split, enabled by default; new `loadassoc' loadable builtin to load an associative array from a set of key-value arguments
This commit is contained in:
+46
-1
@@ -13183,4 +13183,49 @@ general.h
|
||||
- legal_variable_starter,legal_variable_char: change to use the
|
||||
appropriate CNAME and CNAMESTART flags from sh_syntaxtab[]
|
||||
Report from zheng <charname@qq.com>
|
||||
|
||||
|
||||
8/12
|
||||
----
|
||||
subst.c
|
||||
- parameter_brace_expand: when expanding ${#name}, make sure to cast
|
||||
the variable passed to legal_variable_starter to unsigned char
|
||||
Report from otzelot2021@outlook.de <otzelot2021@outlook.de>
|
||||
|
||||
8/13
|
||||
----
|
||||
config.h.in
|
||||
- _GL_ATTRIBUTE_CONST: add dummy define for libintl localename
|
||||
Report from Tianon Gravi <admwiggin@gmail.com>
|
||||
|
||||
8/14
|
||||
----
|
||||
examples/loadables/loadassoc.c
|
||||
- loadassoc: new loadable builtin to populate keys and values in an
|
||||
associative array from a list of arguments, along the lines of the
|
||||
suggestion in https://lists.gnu.org/archive/html/bug-bash/2026-01/msg00008.html
|
||||
(though you'd need to use assoc[@]@k to copy an existing array, so
|
||||
you get the keys)
|
||||
|
||||
arrayfunc.c
|
||||
- split_kvpair_assignments: now initialized to 1 (KVPAIR_SPLIT_DEFAULT),
|
||||
meaning that the entire list is expanded and split before the keys
|
||||
and values are identified. This is closer to how indexed arrays are
|
||||
expanded. This means that you can copy an associative array with
|
||||
copy=( "${assoc[@]@k}" )
|
||||
Based on an extensive bug-bash discussion from 12/2025 and 1/2026,
|
||||
mostly https://lists.gnu.org/archive/html/bug-bash/2025-12/msg00125.html
|
||||
|
||||
config-top.h
|
||||
- KVPAIR_SPLIT_DEFAULT: default value for kvpair_split_assignments,
|
||||
initialized to 1
|
||||
|
||||
arrayfunc.h
|
||||
- split_kvpair_assignments: new extern declaration
|
||||
|
||||
builtins/shopt.def
|
||||
- kvpair_split: new shell option to control the value of
|
||||
kvpair_split_assignments; default is as above
|
||||
|
||||
doc/bash.1,doc/bashref.texi
|
||||
- kvpair_split: added description to shopt builtin; added paragraph
|
||||
to Arrays section describing its effect
|
||||
|
||||
@@ -796,6 +796,7 @@ examples/loadables/chmod.c f
|
||||
examples/loadables/csv.c f
|
||||
examples/loadables/dsv.c f
|
||||
examples/loadables/kv.c f
|
||||
examples/loadables/loadassoc.c f
|
||||
examples/loadables/cut.c f
|
||||
examples/loadables/ocut.c f
|
||||
examples/loadables/logname.c f
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# Makefile for bash-5.3, version 5.12
|
||||
# Makefile for bash-5.4, version 5.12
|
||||
#
|
||||
# Copyright (C) 1996-2026 Free Software Foundation, Inc.
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -3,7 +3,7 @@ dnl Bash specific tests
|
||||
dnl
|
||||
dnl Some derived from PDKSH 5.1.3 autoconf tests
|
||||
dnl
|
||||
dnl Copyright (C) 1987-2025 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 1987-2026 Free Software Foundation, Inc.
|
||||
dnl
|
||||
|
||||
dnl
|
||||
|
||||
+6
-4
@@ -1,6 +1,6 @@
|
||||
/* arrayfunc.c -- High-level array functions used by other parts of the shell. */
|
||||
|
||||
/* Copyright (C) 2001-2025 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001-2026 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -641,7 +641,7 @@ expand_compound_array_assignment (SHELL_VAR *var, char *value, int flags)
|
||||
#if ASSOC_KVPAIR_ASSIGNMENT
|
||||
/* If non-zero, we split the words in kv-pair compound array assignments in
|
||||
addition to performing the other expansions. */
|
||||
int split_kvpair_assignments = 0;
|
||||
int split_kvpair_assignments = KVPAIR_SPLIT_DEFAULT;
|
||||
|
||||
/* We have a set of key-value pairs that should be expanded and split
|
||||
(because they are not assignment statements). They are not expanded
|
||||
@@ -665,12 +665,14 @@ assign_assoc_from_kvlist (SHELL_VAR *var, WORD_LIST *nlist, HASH_TABLE *h, int f
|
||||
akey = split_kvpair_assignments ? savestring (k) : expand_subscript_string (k, 0);
|
||||
if (akey == 0 || *akey == 0)
|
||||
{
|
||||
err_badarraysub (k);
|
||||
const char *kmsg = "\"\""; /* make it look better */
|
||||
|
||||
err_badarraysub (kmsg);
|
||||
FREE (akey);
|
||||
continue;
|
||||
}
|
||||
|
||||
aval = split_kvpair_assignments ? savestring (v) : expand_assignment_string_to_string (v, 0);
|
||||
aval = split_kvpair_assignments ? (v ? savestring (v) : 0) : expand_assignment_string_to_string (v, 0);
|
||||
if (aval == 0)
|
||||
{
|
||||
aval = (char *)xmalloc (1);
|
||||
|
||||
@@ -52,6 +52,11 @@ typedef struct element_state
|
||||
more than once, when performing variable expansion. */
|
||||
extern int array_expand_once;
|
||||
|
||||
/* This means to split the words in a compound associative array assignment
|
||||
before the keys and values are identified, so the expanded and split words
|
||||
can be used as separate keys and values. */
|
||||
extern int split_kvpair_assignments;
|
||||
|
||||
/* Flags for array_value_internal and callers array_value/get_array_value; also
|
||||
used by array_variable_name and array_variable_part. */
|
||||
#define AV_ALLOWALL 0x001 /* treat a[@] like $@ and a[*] like $* */
|
||||
|
||||
+5
-1
@@ -45,8 +45,12 @@ in printf(3), printf interprets:
|
||||
%(fmt)T output the date-time string resulting from using FMT as a format
|
||||
string for strftime(3)
|
||||
|
||||
Like printf(3), printf can reference arguments in non-sequential order.
|
||||
A format specifier %N$, where N is a decimal integer greater than 0,
|
||||
refers to the Nth argument supplied to printf.
|
||||
|
||||
The format is re-used as necessary to consume all of the arguments. If
|
||||
there are fewer arguments than the format requires, extra format
|
||||
there are fewer arguments than the format requires, extra format
|
||||
specifications behave as if a zero value or null string, as appropriate,
|
||||
had been supplied.
|
||||
|
||||
|
||||
@@ -123,6 +123,7 @@ extern int debugging_mode;
|
||||
#if defined (ARRAY_VARS)
|
||||
extern int array_expand_once;
|
||||
int expand_once_flag;
|
||||
extern int kvpair_split_assignments;
|
||||
#endif
|
||||
|
||||
#if defined (SYSLOG_HISTORY)
|
||||
@@ -235,6 +236,9 @@ static struct {
|
||||
{ "huponexit", &hup_on_exit, (shopt_set_func_t *)NULL },
|
||||
{ "inherit_errexit", &inherit_errexit, (shopt_set_func_t *)NULL },
|
||||
{ "interactive_comments", &interactive_comments, set_shellopts_after_change },
|
||||
#if defined (ARRAY_VARS)
|
||||
{ "kvpair_split", &split_kvpair_assignments, (shopt_set_func_t *)NULL },
|
||||
#endif
|
||||
{ "lastpipe", &lastpipe_opt, (shopt_set_func_t *)NULL },
|
||||
#if defined (HISTORY)
|
||||
{ "lithist", &literal_history, (shopt_set_func_t *)NULL },
|
||||
|
||||
+5
-1
@@ -1,6 +1,6 @@
|
||||
/* config-top.h - various user-settable options not under the control of autoconf. */
|
||||
|
||||
/* Copyright (C) 2002-2024 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002-2026 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -195,6 +195,10 @@
|
||||
assignment using a compound list of key-value pairs. */
|
||||
#define ASSOC_KVPAIR_ASSIGNMENT 1
|
||||
|
||||
/* Define to 1 to perform word splitting on the words in an associative array
|
||||
compound assignment that has been identified as a kvpair assignment. */
|
||||
#define KVPAIR_SPLIT_DEFAULT 1
|
||||
|
||||
/* Define if you want read errors in non-interactive shells to be fatal
|
||||
errors instead of the historical practice of treating them as EOF. The
|
||||
next version of POSIX will require this (interp 1629). */
|
||||
|
||||
+3
-1
@@ -1,6 +1,6 @@
|
||||
/* config.h -- Configuration file for bash. */
|
||||
|
||||
/* Copyright (C) 1987-2009,2011-2012,2013-2024 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1987-2009,2011-2012,2013-2026 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -1243,10 +1243,12 @@
|
||||
|
||||
#undef HAVE_WEAK_SYMBOLS
|
||||
|
||||
#define _GL_ATTRIBUTE_CONST
|
||||
#define _GL_ATTRIBUTE_MALLOC
|
||||
#define _GL_ATTRIBUTE_DEALLOC_FREE
|
||||
#define _GL_ATTRIBUTE_FALLTHROUGH
|
||||
#define _GL_ATTRIBUTE_PURE
|
||||
|
||||
#define _GL_UNUSED
|
||||
|
||||
#define _GL_INLINE_HEADER_BEGIN
|
||||
|
||||
+225
-199
@@ -1615,8 +1615,7 @@ PPAARRAAMMEETTEERRSS
|
||||
is also accepted; the _s_u_b_s_c_r_i_p_t is ignored.
|
||||
|
||||
Associative arrays are created using
|
||||
ddeeccllaarree --AA _n_a_m_e
|
||||
.
|
||||
ddeeccllaarree --AA _n_a_m_e .
|
||||
|
||||
Attributes may be specified for an array variable using the ddeeccllaarree and
|
||||
rreeaaddoonnllyy builtins. Each attribute applies to all members of an array.
|
||||
@@ -1637,13 +1636,20 @@ PPAARRAAMMEETTEERRSS
|
||||
When assigning to an associative array, the words in a compound assignment
|
||||
may be either assignment statements, for which the subscript is required,
|
||||
or a list of words that is interpreted as a sequence of alternating keys
|
||||
and values: _n_a_m_e=(( _k_e_y_1 _v_a_l_u_e_1 _k_e_y_2 _v_a_l_u_e_2 ...)). These are treated identi-
|
||||
cally to _n_a_m_e=(( [_k_e_y_1]=_v_a_l_u_e_1 [_k_e_y_2]=_v_a_l_u_e_2 ...)). The first word in the
|
||||
and values: _n_a_m_e=(( _k_e_y_1 _v_a_l_u_e_1 _k_e_y_2 _v_a_l_u_e_2 ...)). The first word in the
|
||||
list determines how the remaining words are interpreted; all assignments in
|
||||
a list must be of the same type. When using key/value pairs, the keys may
|
||||
not be missing or empty; a final missing value is treated like the empty
|
||||
string.
|
||||
|
||||
The kkvvppaaiirr__sspplliitt option to the sshhoopptt builtin (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
below) determines how the words in a key/value pair assignment list are
|
||||
treated. If it is enabled, each word in the list undergoes word expan-
|
||||
sions, including word splitting, before the assignment identifies individ-
|
||||
ual keys and values. If it is unset, the key/value pairs in the example
|
||||
above are treated identically to _n_a_m_e=(( [_k_e_y_1]=_v_a_l_u_e_1 [_k_e_y_2]=_v_a_l_u_e_2 ...))
|
||||
and expanded appropriately.
|
||||
|
||||
This syntax is also accepted by the ddeeccllaarree builtin. Individual array ele-
|
||||
ments may be assigned to using the _n_a_m_e[_s_u_b_s_c_r_i_p_t]=_v_a_l_u_e syntax introduced
|
||||
above.
|
||||
@@ -3692,186 +3698,186 @@ RREEAADDLLIINNEE
|
||||
prefix of the set of possible completions using a different color.
|
||||
The color definitions are taken from the value of the LLSS__CCOOLLOORRSS en-
|
||||
vironment variable. If there is a color definition in $$LLSS__CCOOLLOORRSS
|
||||
for the custom suffix ".readline-colored-completion-prefix", rreeaadd--
|
||||
lliinnee uses this color for the common prefix instead of its default.
|
||||
for the custom suffix "readline-colored-completion-prefix", rreeaaddlliinnee
|
||||
uses this color for the common prefix instead of its default.
|
||||
ccoolloorreedd--ssttaattss ((OOffff))
|
||||
If set to OOnn, rreeaaddlliinnee displays possible completions using different
|
||||
colors to indicate their file type. The color definitions are taken
|
||||
from the value of the LLSS__CCOOLLOORRSS environment variable.
|
||||
ccoommmmeenntt--bbeeggiinn (("##"))
|
||||
The string that the rreeaaddlliinnee iinnsseerrtt--ccoommmmeenntt command inserts. This
|
||||
The string that the rreeaaddlliinnee iinnsseerrtt--ccoommmmeenntt command inserts. This
|
||||
command is bound to MM--## in emacs mode and to ## in vi command mode.
|
||||
ccoommpplleettiioonn--ddiissppllaayy--wwiiddtthh ((--11))
|
||||
The number of screen columns used to display possible matches when
|
||||
The number of screen columns used to display possible matches when
|
||||
performing completion. The value is ignored if it is less than 0 or
|
||||
greater than the terminal screen width. A value of 0 causes matches
|
||||
to be displayed one per line. The default value is -1.
|
||||
ccoommpplleettiioonn--iiggnnoorree--ccaassee ((OOffff))
|
||||
If set to OOnn, rreeaaddlliinnee performs filename matching and completion in
|
||||
If set to OOnn, rreeaaddlliinnee performs filename matching and completion in
|
||||
a case-insensitive fashion.
|
||||
ccoommpplleettiioonn--mmaapp--ccaassee ((OOffff))
|
||||
If set to OOnn, and ccoommpplleettiioonn--iiggnnoorree--ccaassee is enabled, rreeaaddlliinnee treats
|
||||
hyphens (_-) and underscores (__) as equivalent when performing
|
||||
hyphens (_-) and underscores (__) as equivalent when performing
|
||||
case-insensitive filename matching and completion.
|
||||
ccoommpplleettiioonn--pprreeffiixx--ddiissppllaayy--lleennggtthh ((00))
|
||||
The maximum length in characters of the common prefix of a list of
|
||||
possible completions that is displayed without modification. When
|
||||
set to a value greater than zero, rreeaaddlliinnee replaces common prefixes
|
||||
longer than this value with an ellipsis when displaying possible
|
||||
completions. If a completion begins with a period, and eeaaddlliinnee is
|
||||
The maximum length in characters of the common prefix of a list of
|
||||
possible completions that is displayed without modification. When
|
||||
set to a value greater than zero, rreeaaddlliinnee replaces common prefixes
|
||||
longer than this value with an ellipsis when displaying possible
|
||||
completions. If a completion begins with a period, and eeaaddlliinnee is
|
||||
completing filenames, it uses three underscores instead of an ellip-
|
||||
sis.
|
||||
ccoommpplleettiioonn--qquueerryy--iitteemmss ((110000))
|
||||
This determines when the user is queried about viewing the number of
|
||||
possible completions generated by the ppoossssiibbllee--ccoommpplleettiioonnss command.
|
||||
It may be set to any integer value greater than or equal to zero.
|
||||
If the number of possible completions is greater than or equal to
|
||||
the value of this variable, rreeaaddlliinnee asks whether or not the user
|
||||
wishes to view them; otherwise rreeaaddlliinnee simply lists them on the
|
||||
terminal. A zero value means rreeaaddlliinnee should never ask; negative
|
||||
possible completions generated by the ppoossssiibbllee--ccoommpplleettiioonnss command.
|
||||
It may be set to any integer value greater than or equal to zero.
|
||||
If the number of possible completions is greater than or equal to
|
||||
the value of this variable, rreeaaddlliinnee asks whether or not the user
|
||||
wishes to view them; otherwise rreeaaddlliinnee simply lists them on the
|
||||
terminal. A zero value means rreeaaddlliinnee should never ask; negative
|
||||
values are treated as zero.
|
||||
ccoonnvveerrtt--mmeettaa ((OOnn))
|
||||
If set to OOnn, rreeaaddlliinnee converts characters it reads that have the
|
||||
eighth bit set to an ASCII key sequence by clearing the eighth bit
|
||||
and prefixing it with an escape character (converting the character
|
||||
to have the meta prefix). The default is _O_n, but rreeaaddlliinnee sets it
|
||||
If set to OOnn, rreeaaddlliinnee converts characters it reads that have the
|
||||
eighth bit set to an ASCII key sequence by clearing the eighth bit
|
||||
and prefixing it with an escape character (converting the character
|
||||
to have the meta prefix). The default is _O_n, but rreeaaddlliinnee sets it
|
||||
to _O_f_f if the locale contains characters whose encodings may include
|
||||
bytes with the eighth bit set. This variable is dependent on the
|
||||
LLCC__CCTTYYPPEE locale category, and may change if the locale changes.
|
||||
This variable also affects key bindings; see the description of
|
||||
bytes with the eighth bit set. This variable is dependent on the
|
||||
LLCC__CCTTYYPPEE locale category, and may change if the locale changes.
|
||||
This variable also affects key bindings; see the description of
|
||||
ffoorrccee--mmeettaa--pprreeffiixx below.
|
||||
ddiissaabbllee--ccoommpplleettiioonn ((OOffff))
|
||||
If set to OOnn, rreeaaddlliinnee inhibits word completion. Completion charac-
|
||||
ters are inserted into the line as if they had been mapped to sseellff--
|
||||
ters are inserted into the line as if they had been mapped to sseellff--
|
||||
iinnsseerrtt.
|
||||
eecchhoo--ccoonnttrrooll--cchhaarraacctteerrss ((OOnn))
|
||||
When set to OOnn, on operating systems that indicate they support it,
|
||||
When set to OOnn, on operating systems that indicate they support it,
|
||||
rreeaaddlliinnee echoes a character corresponding to a signal generated from
|
||||
the keyboard.
|
||||
eeddiittiinngg--mmooddee ((eemmaaccss))
|
||||
Controls whether rreeaaddlliinnee uses a set of key bindings similar to
|
||||
Controls whether rreeaaddlliinnee uses a set of key bindings similar to
|
||||
_E_m_a_c_s or _v_i. eeddiittiinngg--mmooddee can be set to either eemmaaccss or vvii.
|
||||
eemmaaccss--mmooddee--ssttrriinngg ((@@))
|
||||
If the _s_h_o_w_-_m_o_d_e_-_i_n_-_p_r_o_m_p_t variable is enabled, this string is dis-
|
||||
played immediately before the last line of the primary prompt when
|
||||
emacs editing mode is active. The value is expanded like a key
|
||||
binding, so the standard set of meta- and control- prefixes and
|
||||
backslash escape sequences is available. The \1 and \2 escapes be-
|
||||
gin and end sequences of non-printing characters, which can be used
|
||||
If the _s_h_o_w_-_m_o_d_e_-_i_n_-_p_r_o_m_p_t variable is enabled, this string is dis-
|
||||
played immediately before the last line of the primary prompt when
|
||||
emacs editing mode is active. The value is expanded like a key
|
||||
binding, so the standard set of meta- and control- prefixes and
|
||||
backslash escape sequences is available. The \1 and \2 escapes be-
|
||||
gin and end sequences of non-printing characters, which can be used
|
||||
to embed a terminal control sequence into the mode string.
|
||||
eennaabbllee--aaccttiivvee--rreeggiioonn ((OOnn))
|
||||
When this variable is set to _O_n, rreeaaddlliinnee allows certain commands to
|
||||
designate the region as _a_c_t_i_v_e. When the region is active, rreeaaddlliinnee
|
||||
highlights the text in the region using the value of the aaccttiivvee--rree--
|
||||
highlights the text in the region using the value of the aaccttiivvee--rree--
|
||||
ggiioonn--ssttaarrtt--ccoolloorr variable, which defaults to the string that enables
|
||||
the terminal's standout mode. The active region shows the text in-
|
||||
the terminal's standout mode. The active region shows the text in-
|
||||
serted by bracketed-paste and any matching text found by incremental
|
||||
and non-incremental history searches.
|
||||
eennaabbllee--bbrraacckkeetteedd--ppaassttee ((OOnn))
|
||||
When set to OOnn, rreeaaddlliinnee configures the terminal to insert each
|
||||
paste into the editing buffer as a single string of characters, in-
|
||||
stead of treating each character as if it had been read from the
|
||||
When set to OOnn, rreeaaddlliinnee configures the terminal to insert each
|
||||
paste into the editing buffer as a single string of characters, in-
|
||||
stead of treating each character as if it had been read from the
|
||||
keyboard. This is called _b_r_a_c_k_e_t_e_d_-_p_a_s_t_e _m_o_d_e; it prevents rreeaaddlliinnee
|
||||
from executing any editing commands bound to key sequences appearing
|
||||
in the pasted text.
|
||||
eennaabbllee--kkeeyyppaadd ((OOffff))
|
||||
When set to OOnn, rreeaaddlliinnee tries to enable the application keypad
|
||||
When set to OOnn, rreeaaddlliinnee tries to enable the application keypad
|
||||
when it is called. Some systems need this to enable the arrow keys.
|
||||
eennaabbllee--mmeettaa--kkeeyy ((OOnn))
|
||||
When set to OOnn, rreeaaddlliinnee tries to enable any meta modifier key the
|
||||
When set to OOnn, rreeaaddlliinnee tries to enable any meta modifier key the
|
||||
terminal claims to support. On many terminals, the Meta key is used
|
||||
to send eight-bit characters; this variable checks for the terminal
|
||||
to send eight-bit characters; this variable checks for the terminal
|
||||
capability that indicates the terminal can enable and disable a mode
|
||||
that sets the eighth bit of a character (0200) if the Meta key is
|
||||
that sets the eighth bit of a character (0200) if the Meta key is
|
||||
held down when the character is typed (a meta character).
|
||||
eexxppaanndd--ttiillddee ((OOffff))
|
||||
If set to OOnn, rreeaaddlliinnee performs tilde expansion when it attempts
|
||||
If set to OOnn, rreeaaddlliinnee performs tilde expansion when it attempts
|
||||
word completion.
|
||||
ffoorrccee--mmeettaa--pprreeffiixx ((OOffff))
|
||||
If set to OOnn, rreeaaddlliinnee modifies its behavior when binding key se-
|
||||
If set to OOnn, rreeaaddlliinnee modifies its behavior when binding key se-
|
||||
quences containing \M- or Meta- (see KKeeyy BBiinnddiinnggss above) by convert-
|
||||
ing a key sequence of the form \M-_C or Meta-_C to the two-character
|
||||
sequence EESSCC _C (adding the meta prefix). If ffoorrccee--mmeettaa--pprreeffiixx is
|
||||
set to OOffff (the default), rreeaaddlliinnee uses the value of the ccoonn--
|
||||
vveerrtt--mmeettaa variable to determine whether to perform this conversion:
|
||||
if ccoonnvveerrtt--mmeettaa is OOnn, rreeaaddlliinnee performs the conversion described
|
||||
ing a key sequence of the form \M-_C or Meta-_C to the two-character
|
||||
sequence EESSCC _C (adding the meta prefix). If ffoorrccee--mmeettaa--pprreeffiixx is
|
||||
set to OOffff (the default), rreeaaddlliinnee uses the value of the ccoonn--
|
||||
vveerrtt--mmeettaa variable to determine whether to perform this conversion:
|
||||
if ccoonnvveerrtt--mmeettaa is OOnn, rreeaaddlliinnee performs the conversion described
|
||||
above; if it is OOffff, rreeaaddlliinnee converts _C to a meta character by set-
|
||||
ting the eighth bit (0200).
|
||||
hhiissttoorryy--pprreesseerrvvee--ppooiinntt ((OOffff))
|
||||
If set to OOnn, the history code attempts to place point at the same
|
||||
location on each history line retrieved with pprreevviioouuss--hhiissttoorryy or
|
||||
If set to OOnn, the history code attempts to place point at the same
|
||||
location on each history line retrieved with pprreevviioouuss--hhiissttoorryy or
|
||||
nneexxtt--hhiissttoorryy.
|
||||
hhiissttoorryy--ssiizzee ((uunnsseett))
|
||||
Set the maximum number of history entries saved in the history list.
|
||||
If set to zero, any existing history entries are deleted and no new
|
||||
entries are saved. If set to a value less than zero, the number of
|
||||
history entries is not limited. By default, bbaasshh sets the maximum
|
||||
number of history entries to the value of the HHIISSTTSSIIZZEE shell vari-
|
||||
If set to zero, any existing history entries are deleted and no new
|
||||
entries are saved. If set to a value less than zero, the number of
|
||||
history entries is not limited. By default, bbaasshh sets the maximum
|
||||
number of history entries to the value of the HHIISSTTSSIIZZEE shell vari-
|
||||
able. Setting _h_i_s_t_o_r_y_-_s_i_z_e to a non-numeric value will set the max-
|
||||
imum number of history entries to 500.
|
||||
hhoorriizzoonnttaall--ssccrroollll--mmooddee ((OOffff))
|
||||
Setting this variable to OOnn makes rreeaaddlliinnee use a single line for
|
||||
display, scrolling the input horizontally on a single screen line
|
||||
Setting this variable to OOnn makes rreeaaddlliinnee use a single line for
|
||||
display, scrolling the input horizontally on a single screen line
|
||||
when it becomes longer than the screen width rather than wrapping to
|
||||
a new line. This setting is automatically enabled for terminals of
|
||||
a new line. This setting is automatically enabled for terminals of
|
||||
height 1.
|
||||
iinnppuutt--mmeettaa ((OOffff))
|
||||
If set to OOnn, rreeaaddlliinnee enables eight-bit input (that is, it does not
|
||||
clear the eighth bit in the characters it reads), regardless of what
|
||||
the terminal claims it can support. The default is _O_f_f, but rreeaadd--
|
||||
the terminal claims it can support. The default is _O_f_f, but rreeaadd--
|
||||
lliinnee sets it to _O_n if the locale contains characters whose encodings
|
||||
may include bytes with the eighth bit set. This variable is depen-
|
||||
dent on the LLCC__CCTTYYPPEE locale category, and its value may change if
|
||||
may include bytes with the eighth bit set. This variable is depen-
|
||||
dent on the LLCC__CCTTYYPPEE locale category, and its value may change if
|
||||
the locale changes. The name mmeettaa--ffllaagg is a synonym for iinnppuutt--mmeettaa.
|
||||
iisseeaarrcchh--tteerrmmiinnaattoorrss (("CC--[[CC--jj"))
|
||||
The string of characters that should terminate an incremental search
|
||||
without subsequently executing the character as a command. If this
|
||||
without subsequently executing the character as a command. If this
|
||||
variable has not been given a value, the characters _E_S_C and CC--jj ter-
|
||||
minate an incremental search.
|
||||
kkeeyymmaapp ((eemmaaccss))
|
||||
Set the current rreeaaddlliinnee keymap. The set of valid keymap names is
|
||||
_e_m_a_c_s_, _e_m_a_c_s_-_s_t_a_n_d_a_r_d_, _e_m_a_c_s_-_m_e_t_a_, _e_m_a_c_s_-_c_t_l_x_, _v_i_, _v_i_-_c_o_m_m_a_n_d, and
|
||||
_v_i_-_i_n_s_e_r_t. _v_i is equivalent to _v_i_-_c_o_m_m_a_n_d; _e_m_a_c_s is equivalent to
|
||||
_e_m_a_c_s_-_s_t_a_n_d_a_r_d. The default value is _e_m_a_c_s; the value of eeddiitt--
|
||||
Set the current rreeaaddlliinnee keymap. The set of valid keymap names is
|
||||
_e_m_a_c_s_, _e_m_a_c_s_-_s_t_a_n_d_a_r_d_, _e_m_a_c_s_-_m_e_t_a_, _e_m_a_c_s_-_c_t_l_x_, _v_i_, _v_i_-_c_o_m_m_a_n_d, and
|
||||
_v_i_-_i_n_s_e_r_t. _v_i is equivalent to _v_i_-_c_o_m_m_a_n_d; _e_m_a_c_s is equivalent to
|
||||
_e_m_a_c_s_-_s_t_a_n_d_a_r_d. The default value is _e_m_a_c_s; the value of eeddiitt--
|
||||
iinngg--mmooddee also affects the default keymap.
|
||||
kkeeyysseeqq--ttiimmeeoouutt ((550000))
|
||||
Specifies the duration rreeaaddlliinnee will wait for a character when read-
|
||||
ing an ambiguous key sequence (one that can form a complete key se-
|
||||
quence using the input read so far, or can take additional input to
|
||||
complete a longer key sequence). If rreeaaddlliinnee does not receive any
|
||||
input within the timeout, it uses the shorter but complete key se-
|
||||
quence. The value is specified in milliseconds, so a value of 1000
|
||||
means that rreeaaddlliinnee will wait one second for additional input. If
|
||||
this variable is set to a value less than or equal to zero, or to a
|
||||
non-numeric value, rreeaaddlliinnee waits until another key is pressed to
|
||||
ing an ambiguous key sequence (one that can form a complete key se-
|
||||
quence using the input read so far, or can take additional input to
|
||||
complete a longer key sequence). If rreeaaddlliinnee does not receive any
|
||||
input within the timeout, it uses the shorter but complete key se-
|
||||
quence. The value is specified in milliseconds, so a value of 1000
|
||||
means that rreeaaddlliinnee will wait one second for additional input. If
|
||||
this variable is set to a value less than or equal to zero, or to a
|
||||
non-numeric value, rreeaaddlliinnee waits until another key is pressed to
|
||||
decide which key sequence to complete.
|
||||
mmaarrkk--ddiirreeccttoorriieess ((OOnn))
|
||||
If set to OOnn, completed directory names have a slash appended.
|
||||
mmaarrkk--mmooddiiffiieedd--lliinneess ((OOffff))
|
||||
If set to OOnn, rreeaaddlliinnee displays history lines that have been modi-
|
||||
If set to OOnn, rreeaaddlliinnee displays history lines that have been modi-
|
||||
fied with a preceding asterisk (**).
|
||||
mmaarrkk--ssyymmlliinnkkeedd--ddiirreeccttoorriieess ((OOffff))
|
||||
If set to OOnn, completed names which are symbolic links to directo-
|
||||
ries have a slash appended, subject to the value of mmaarrkk--ddiirreeccttoo--
|
||||
If set to OOnn, completed names which are symbolic links to directo-
|
||||
ries have a slash appended, subject to the value of mmaarrkk--ddiirreeccttoo--
|
||||
rriieess.
|
||||
mmaattcchh--hhiiddddeenn--ffiilleess ((OOnn))
|
||||
This variable, when set to OOnn, forces rreeaaddlliinnee to match files whose
|
||||
This variable, when set to OOnn, forces rreeaaddlliinnee to match files whose
|
||||
names begin with a "." (hidden files) when performing filename com-
|
||||
pletion. If set to OOffff, the user must include the leading "." in
|
||||
pletion. If set to OOffff, the user must include the leading "." in
|
||||
the filename to be completed.
|
||||
mmeennuu--ccoommpplleettee--ddiissppllaayy--pprreeffiixx ((OOffff))
|
||||
If set to OOnn, menu completion displays the common prefix of the list
|
||||
of possible completions (which may be empty) before cycling through
|
||||
of possible completions (which may be empty) before cycling through
|
||||
the list.
|
||||
oouuttppuutt--mmeettaa ((OOffff))
|
||||
If set to OOnn, rreeaaddlliinnee displays characters with the eighth bit set
|
||||
directly rather than as a meta-prefixed escape sequence. The de-
|
||||
fault is _O_f_f, but rreeaaddlliinnee sets it to _O_n if the locale contains
|
||||
characters whose encodings may include bytes with the eighth bit
|
||||
set. This variable is dependent on the LLCC__CCTTYYPPEE locale category,
|
||||
If set to OOnn, rreeaaddlliinnee displays characters with the eighth bit set
|
||||
directly rather than as a meta-prefixed escape sequence. The de-
|
||||
fault is _O_f_f, but rreeaaddlliinnee sets it to _O_n if the locale contains
|
||||
characters whose encodings may include bytes with the eighth bit
|
||||
set. This variable is dependent on the LLCC__CCTTYYPPEE locale category,
|
||||
and its value may change if the locale changes.
|
||||
ppaaggee--ccoommpplleettiioonnss ((OOnn))
|
||||
If set to OOnn, rreeaaddlliinnee uses an internal pager resembling _m_o_r_e(1) to
|
||||
If set to OOnn, rreeaaddlliinnee uses an internal pager resembling _m_o_r_e(1) to
|
||||
display a screenful of possible completions at a time.
|
||||
pprreeffeerr--vviissiibbllee--bbeellll
|
||||
See bbeellll--ssttyyllee.
|
||||
@@ -3881,92 +3887,92 @@ RREEAADDLLIINNEE
|
||||
rreevveerrtt--aallll--aatt--nneewwlliinnee ((OOffff))
|
||||
If set to OOnn, rreeaaddlliinnee will undo all changes to history lines before
|
||||
returning when executing aacccceepptt--lliinnee. By default, history lines may
|
||||
be modified and retain individual undo lists across calls to rreeaadd--
|
||||
be modified and retain individual undo lists across calls to rreeaadd--
|
||||
lliinnee.
|
||||
sseeaarrcchh--iiggnnoorree--ccaassee ((OOffff))
|
||||
If set to OOnn, rreeaaddlliinnee performs incremental and non-incremental his-
|
||||
tory list searches in a case-insensitive fashion.
|
||||
sshhooww--aallll--iiff--aammbbiigguuoouuss ((OOffff))
|
||||
This alters the default behavior of the completion functions. If
|
||||
set to OOnn, words which have more than one possible completion cause
|
||||
This alters the default behavior of the completion functions. If
|
||||
set to OOnn, words which have more than one possible completion cause
|
||||
the matches to be listed immediately instead of ringing the bell.
|
||||
sshhooww--aallll--iiff--uunnmmooddiiffiieedd ((OOffff))
|
||||
This alters the default behavior of the completion functions in a
|
||||
This alters the default behavior of the completion functions in a
|
||||
fashion similar to sshhooww--aallll--iiff--aammbbiigguuoouuss. If set to OOnn, words which
|
||||
have more than one possible completion without any possible partial
|
||||
completion (the possible completions don't share a common prefix)
|
||||
cause the matches to be listed immediately instead of ringing the
|
||||
have more than one possible completion without any possible partial
|
||||
completion (the possible completions don't share a common prefix)
|
||||
cause the matches to be listed immediately instead of ringing the
|
||||
bell.
|
||||
sshhooww--mmooddee--iinn--pprroommpptt ((OOffff))
|
||||
If set to OOnn, add a string to the beginning of the prompt indicating
|
||||
the editing mode: emacs, vi command, or vi insertion. The mode
|
||||
the editing mode: emacs, vi command, or vi insertion. The mode
|
||||
strings are user-settable (e.g., _e_m_a_c_s_-_m_o_d_e_-_s_t_r_i_n_g).
|
||||
sskkiipp--ccoommpplleetteedd--tteexxtt ((OOffff))
|
||||
If set to OOnn, this alters the default completion behavior when in-
|
||||
serting a single match into the line. It's only active when per-
|
||||
forming completion in the middle of a word. If enabled, rreeaaddlliinnee
|
||||
If set to OOnn, this alters the default completion behavior when in-
|
||||
serting a single match into the line. It's only active when per-
|
||||
forming completion in the middle of a word. If enabled, rreeaaddlliinnee
|
||||
does not insert characters from the completion that match characters
|
||||
after point in the word being completed, so portions of the word
|
||||
after point in the word being completed, so portions of the word
|
||||
following the cursor are not duplicated.
|
||||
vvii--ccmmdd--mmooddee--ssttrriinngg ((((ccmmdd))))
|
||||
If the _s_h_o_w_-_m_o_d_e_-_i_n_-_p_r_o_m_p_t variable is enabled, this string is dis-
|
||||
played immediately before the last line of the primary prompt when
|
||||
vi editing mode is active and in command mode. The value is ex-
|
||||
panded like a key binding, so the standard set of meta- and control-
|
||||
prefixes and backslash escape sequences is available. The \1 and \2
|
||||
escapes begin and end sequences of non-printing characters, which
|
||||
can be used to embed a terminal control sequence into the mode
|
||||
string.
|
||||
vvii--iinnss--mmooddee--ssttrriinngg ((((iinnss))))
|
||||
If the _s_h_o_w_-_m_o_d_e_-_i_n_-_p_r_o_m_p_t variable is enabled, this string is dis-
|
||||
played immediately before the last line of the primary prompt when
|
||||
vi editing mode is active and in insertion mode. The value is ex-
|
||||
vi editing mode is active and in command mode. The value is ex-
|
||||
panded like a key binding, so the standard set of meta- and control-
|
||||
prefixes and backslash escape sequences is available. The \1 and \2
|
||||
escapes begin and end sequences of non-printing characters, which
|
||||
can be used to embed a terminal control sequence into the mode
|
||||
string.
|
||||
vvii--iinnss--mmooddee--ssttrriinngg ((((iinnss))))
|
||||
If the _s_h_o_w_-_m_o_d_e_-_i_n_-_p_r_o_m_p_t variable is enabled, this string is dis-
|
||||
played immediately before the last line of the primary prompt when
|
||||
vi editing mode is active and in insertion mode. The value is ex-
|
||||
panded like a key binding, so the standard set of meta- and control-
|
||||
prefixes and backslash escape sequences is available. The \1 and \2
|
||||
escapes begin and end sequences of non-printing characters, which
|
||||
can be used to embed a terminal control sequence into the mode
|
||||
string.
|
||||
vviissiibbllee--ssttaattss ((OOffff))
|
||||
If set to OOnn, a character denoting a file's type as reported by
|
||||
_s_t_a_t(2) is appended to the filename when listing possible comple-
|
||||
If set to OOnn, a character denoting a file's type as reported by
|
||||
_s_t_a_t(2) is appended to the filename when listing possible comple-
|
||||
tions.
|
||||
|
||||
RReeaaddlliinnee CCoonnddiittiioonnaall CCoonnssttrruuccttss
|
||||
RReeaaddlliinnee implements a facility similar in spirit to the conditional compi-
|
||||
lation features of the C preprocessor which allows key bindings and vari-
|
||||
able settings to be performed as the result of tests. There are four
|
||||
RReeaaddlliinnee implements a facility similar in spirit to the conditional compi-
|
||||
lation features of the C preprocessor which allows key bindings and vari-
|
||||
able settings to be performed as the result of tests. There are four
|
||||
parser directives available.
|
||||
|
||||
$$iiff The $$iiff construct allows bindings to be made based on the editing
|
||||
mode, the terminal being used, or the application using rreeaaddlliinnee.
|
||||
The text of the test, after any comparison operator, extends to the
|
||||
end of the line; unless otherwise noted, no characters are required
|
||||
$$iiff The $$iiff construct allows bindings to be made based on the editing
|
||||
mode, the terminal being used, or the application using rreeaaddlliinnee.
|
||||
The text of the test, after any comparison operator, extends to the
|
||||
end of the line; unless otherwise noted, no characters are required
|
||||
to isolate it.
|
||||
|
||||
mmooddee The mmooddee== form of the $$iiff directive is used to test whether
|
||||
rreeaaddlliinnee is in emacs or vi mode. This may be used in con-
|
||||
junction with the sseett kkeeyymmaapp command, for instance, to set
|
||||
mmooddee The mmooddee== form of the $$iiff directive is used to test whether
|
||||
rreeaaddlliinnee is in emacs or vi mode. This may be used in con-
|
||||
junction with the sseett kkeeyymmaapp command, for instance, to set
|
||||
bindings in the _e_m_a_c_s_-_s_t_a_n_d_a_r_d and _e_m_a_c_s_-_c_t_l_x keymaps only if
|
||||
rreeaaddlliinnee is starting out in emacs mode.
|
||||
|
||||
tteerrmm The tteerrmm== form may be used to include terminal-specific key
|
||||
bindings, perhaps to bind the key sequences output by the
|
||||
terminal's function keys. The word on the right side of the
|
||||
== is tested against both the full name of the terminal and
|
||||
the portion of the terminal name before the first --. This
|
||||
allows _x_t_e_r_m to match both _x_t_e_r_m and _x_t_e_r_m_-_2_5_6_c_o_l_o_r, for in-
|
||||
tteerrmm The tteerrmm== form may be used to include terminal-specific key
|
||||
bindings, perhaps to bind the key sequences output by the
|
||||
terminal's function keys. The word on the right side of the
|
||||
== is tested against both the full name of the terminal and
|
||||
the portion of the terminal name before the first --. This
|
||||
allows _x_t_e_r_m to match both _x_t_e_r_m and _x_t_e_r_m_-_2_5_6_c_o_l_o_r, for in-
|
||||
stance.
|
||||
|
||||
vveerrssiioonn
|
||||
The vveerrssiioonn test may be used to perform comparisons against
|
||||
specific rreeaaddlliinnee versions. The vveerrssiioonn expands to the cur-
|
||||
rent rreeaaddlliinnee version. The set of comparison operators in-
|
||||
The vveerrssiioonn test may be used to perform comparisons against
|
||||
specific rreeaaddlliinnee versions. The vveerrssiioonn expands to the cur-
|
||||
rent rreeaaddlliinnee version. The set of comparison operators in-
|
||||
cludes ==, (and ====), !!==, <<==, >>==, <<, and >>. The version number
|
||||
supplied on the right side of the operator consists of a ma-
|
||||
jor version number, an optional decimal point, and an op-
|
||||
tional minor version (e.g., 77..11). If the minor version is
|
||||
omitted, it defaults to 00. The operator may be separated
|
||||
from the string vveerrssiioonn and from the version number argument
|
||||
supplied on the right side of the operator consists of a ma-
|
||||
jor version number, an optional decimal point, and an op-
|
||||
tional minor version (e.g., 77..11). If the minor version is
|
||||
omitted, it defaults to 00. The operator may be separated
|
||||
from the string vveerrssiioonn and from the version number argument
|
||||
by whitespace.
|
||||
|
||||
_a_p_p_l_i_c_a_t_i_o_n
|
||||
@@ -3974,8 +3980,8 @@ RREEAADDLLIINNEE
|
||||
cific settings. Each program using the rreeaaddlliinnee library sets
|
||||
the _a_p_p_l_i_c_a_t_i_o_n _n_a_m_e, and an initialization file can test for
|
||||
a particular value. This could be used to bind key sequences
|
||||
to functions useful for a specific program. For instance,
|
||||
the following command adds a key sequence that quotes the
|
||||
to functions useful for a specific program. For instance,
|
||||
the following command adds a key sequence that quotes the
|
||||
current or previous word in bbaasshh:
|
||||
|
||||
$$iiff Bash
|
||||
@@ -3984,83 +3990,83 @@ RREEAADDLLIINNEE
|
||||
$$eennddiiff
|
||||
|
||||
_v_a_r_i_a_b_l_e
|
||||
The _v_a_r_i_a_b_l_e construct provides simple equality tests for
|
||||
rreeaaddlliinnee variables and values. The permitted comparison op-
|
||||
erators are _=, _=_=, and _!_=. The variable name must be sepa-
|
||||
rated from the comparison operator by whitespace; the opera-
|
||||
The _v_a_r_i_a_b_l_e construct provides simple equality tests for
|
||||
rreeaaddlliinnee variables and values. The permitted comparison op-
|
||||
erators are _=, _=_=, and _!_=. The variable name must be sepa-
|
||||
rated from the comparison operator by whitespace; the opera-
|
||||
tor may be separated from the value on the right hand side by
|
||||
whitespace. String and boolean variables may be tested.
|
||||
Boolean variables must be tested against the values _o_n and
|
||||
whitespace. String and boolean variables may be tested.
|
||||
Boolean variables must be tested against the values _o_n and
|
||||
_o_f_f.
|
||||
|
||||
$$eellssee Commands in this branch of the $$iiff directive are executed if the
|
||||
$$eellssee Commands in this branch of the $$iiff directive are executed if the
|
||||
test fails.
|
||||
|
||||
$$eennddiiff
|
||||
This command, as seen in the previous example, terminates an $$iiff
|
||||
This command, as seen in the previous example, terminates an $$iiff
|
||||
command.
|
||||
|
||||
$$iinncclluuddee
|
||||
This directive takes a single filename as an argument and reads com-
|
||||
mands and key bindings from that file. For example, the following
|
||||
mands and key bindings from that file. For example, the following
|
||||
directive would read _/_e_t_c_/_i_n_p_u_t_r_c:
|
||||
|
||||
$$iinncclluuddee _/_e_t_c_/_i_n_p_u_t_r_c
|
||||
|
||||
SSeeaarrcchhiinngg
|
||||
RReeaaddlliinnee provides commands for searching through the command history (see
|
||||
HHIISSTTOORRYY below) for lines containing a specified string. There are two
|
||||
RReeaaddlliinnee provides commands for searching through the command history (see
|
||||
HHIISSTTOORRYY below) for lines containing a specified string. There are two
|
||||
search modes: _i_n_c_r_e_m_e_n_t_a_l and _n_o_n_-_i_n_c_r_e_m_e_n_t_a_l.
|
||||
|
||||
Incremental searches begin before the user has finished typing the search
|
||||
Incremental searches begin before the user has finished typing the search
|
||||
string. As each character of the search string is typed, rreeaaddlliinnee displays
|
||||
the next entry from the history matching the string typed so far. An in-
|
||||
the next entry from the history matching the string typed so far. An in-
|
||||
cremental search requires only as many characters as needed to find the de-
|
||||
sired history entry. When using emacs editing mode, type CC--rr to search
|
||||
backward in the history for a particular string. Typing CC--ss searches for-
|
||||
ward through the history. The characters present in the value of the
|
||||
iisseeaarrcchh--tteerrmmiinnaattoorrss variable are used to terminate an incremental search.
|
||||
If that variable has not been assigned a value, _E_S_C and CC--jj terminate an
|
||||
incremental search. CC--gg aborts an incremental search and restores the
|
||||
sired history entry. When using emacs editing mode, type CC--rr to search
|
||||
backward in the history for a particular string. Typing CC--ss searches for-
|
||||
ward through the history. The characters present in the value of the
|
||||
iisseeaarrcchh--tteerrmmiinnaattoorrss variable are used to terminate an incremental search.
|
||||
If that variable has not been assigned a value, _E_S_C and CC--jj terminate an
|
||||
incremental search. CC--gg aborts an incremental search and restores the
|
||||
original line. When the search is terminated, the history entry containing
|
||||
the search string becomes the current line.
|
||||
|
||||
To find other matching entries in the history list, type CC--rr or CC--ss as ap-
|
||||
propriate. This searches backward or forward in the history for the next
|
||||
entry matching the search string typed so far. Any other key sequence
|
||||
bound to a rreeaaddlliinnee command terminates the search and executes that com-
|
||||
mand. For instance, a newline terminates the search and accepts the line,
|
||||
thereby executing the command from the history list. A movement command
|
||||
will terminate the search, make the last line found the current line, and
|
||||
To find other matching entries in the history list, type CC--rr or CC--ss as ap-
|
||||
propriate. This searches backward or forward in the history for the next
|
||||
entry matching the search string typed so far. Any other key sequence
|
||||
bound to a rreeaaddlliinnee command terminates the search and executes that com-
|
||||
mand. For instance, a newline terminates the search and accepts the line,
|
||||
thereby executing the command from the history list. A movement command
|
||||
will terminate the search, make the last line found the current line, and
|
||||
begin editing.
|
||||
|
||||
RReeaaddlliinnee remembers the last incremental search string. If two CC--rrs are
|
||||
typed without any intervening characters defining a new search string,
|
||||
RReeaaddlliinnee remembers the last incremental search string. If two CC--rrs are
|
||||
typed without any intervening characters defining a new search string,
|
||||
rreeaaddlliinnee uses any remembered search string.
|
||||
|
||||
Non-incremental searches read the entire search string before starting to
|
||||
Non-incremental searches read the entire search string before starting to
|
||||
search for matching history entries. The search string may be typed by the
|
||||
user or be part of the contents of the current line.
|
||||
|
||||
RReeaaddlliinnee CCoommmmaanndd NNaammeess
|
||||
The following is a list of the names of the commands and the default key
|
||||
sequences to which they are bound. Command names without an accompanying
|
||||
The following is a list of the names of the commands and the default key
|
||||
sequences to which they are bound. Command names without an accompanying
|
||||
key sequence are unbound by default.
|
||||
|
||||
In the following descriptions, _p_o_i_n_t refers to the current cursor position,
|
||||
and _m_a_r_k refers to a cursor position saved by the sseett--mmaarrkk command. The
|
||||
and _m_a_r_k refers to a cursor position saved by the sseett--mmaarrkk command. The
|
||||
text between the point and mark is referred to as the _r_e_g_i_o_n. RReeaaddlliinnee has
|
||||
the concept of an _a_c_t_i_v_e _r_e_g_i_o_n: when the region is active, rreeaaddlliinnee redis-
|
||||
play highlights the region using the value of the aaccttiivvee--rreeggiioonn--ssttaarrtt--ccoolloorr
|
||||
variable. The eennaabbllee--aaccttiivvee--rreeggiioonn rreeaaddlliinnee variable turns this on and
|
||||
variable. The eennaabbllee--aaccttiivvee--rreeggiioonn rreeaaddlliinnee variable turns this on and
|
||||
off. Several commands set the region to active; those are noted below.
|
||||
|
||||
CCoommmmaannddss ffoorr MMoovviinngg
|
||||
bbeeggiinnnniinngg--ooff--lliinnee ((CC--aa))
|
||||
Move to the start of the current line. This may also be bound to
|
||||
Move to the start of the current line. This may also be bound to
|
||||
the Home key on some keyboards.
|
||||
eenndd--ooff--lliinnee ((CC--ee))
|
||||
Move to the end of the line. This may also be bound to the End key
|
||||
Move to the end of the line. This may also be bound to the End key
|
||||
on some keyboards.
|
||||
ffoorrwwaarrdd--cchhaarr ((CC--ff))
|
||||
Move forward a character. This may also be bound to the right arrow
|
||||
@@ -4072,32 +4078,32 @@ RREEAADDLLIINNEE
|
||||
Move forward to the end of the next word. Words are composed of al-
|
||||
phanumeric characters (letters and digits).
|
||||
bbaacckkwwaarrdd--wwoorrdd ((MM--bb))
|
||||
Move back to the start of the current or previous word. Words are
|
||||
Move back to the start of the current or previous word. Words are
|
||||
composed of alphanumeric characters (letters and digits).
|
||||
sshheellll--ffoorrwwaarrdd--wwoorrdd ((MM--CC--ff))
|
||||
Move forward to the end of the next word. Words are delimited by
|
||||
Move forward to the end of the next word. Words are delimited by
|
||||
non-quoted shell metacharacters.
|
||||
sshheellll--bbaacckkwwaarrdd--wwoorrdd ((MM--CC--bb))
|
||||
Move back to the start of the current or previous word. Words are
|
||||
Move back to the start of the current or previous word. Words are
|
||||
delimited by non-quoted shell metacharacters.
|
||||
pprreevviioouuss--ssccrreeeenn--lliinnee
|
||||
Attempt to move point to the same physical screen column on the pre-
|
||||
vious physical screen line. This will not have the desired effect
|
||||
vious physical screen line. This will not have the desired effect
|
||||
if the current rreeaaddlliinnee line does not take up more than one physical
|
||||
line or if point is not greater than the length of the prompt plus
|
||||
line or if point is not greater than the length of the prompt plus
|
||||
the screen width.
|
||||
nneexxtt--ssccrreeeenn--lliinnee
|
||||
Attempt to move point to the same physical screen column on the next
|
||||
physical screen line. This will not have the desired effect if the
|
||||
current rreeaaddlliinnee line does not take up more than one physical line
|
||||
or if the length of the current rreeaaddlliinnee line is not greater than
|
||||
physical screen line. This will not have the desired effect if the
|
||||
current rreeaaddlliinnee line does not take up more than one physical line
|
||||
or if the length of the current rreeaaddlliinnee line is not greater than
|
||||
the length of the prompt plus the screen width.
|
||||
cclleeaarr--ddiissppllaayy ((MM--CC--ll))
|
||||
Clear the screen and, if possible, the terminal's scrollback buffer,
|
||||
then redraw the current line, leaving the current line at the top of
|
||||
the screen.
|
||||
cclleeaarr--ssccrreeeenn ((CC--ll))
|
||||
Clear the screen, then redraw the current line, leaving the current
|
||||
Clear the screen, then redraw the current line, leaving the current
|
||||
line at the top of the screen. With a numeric argument, refresh the
|
||||
current line without clearing the screen.
|
||||
rreeddrraaww--ccuurrrreenntt--lliinnee
|
||||
@@ -4105,16 +4111,16 @@ RREEAADDLLIINNEE
|
||||
|
||||
CCoommmmaannddss ffoorr MMaanniippuullaattiinngg tthhee HHiissttoorryy
|
||||
aacccceepptt--lliinnee ((NNeewwlliinnee,, RReettuurrnn))
|
||||
Accept the line regardless of where the cursor is. If this line is
|
||||
non-empty, add it to the history list according to the state of the
|
||||
HHIISSTTCCOONNTTRROOLL and HHIISSTTIIGGNNOORREE variables. If the line is a modified
|
||||
Accept the line regardless of where the cursor is. If this line is
|
||||
non-empty, add it to the history list according to the state of the
|
||||
HHIISSTTCCOONNTTRROOLL and HHIISSTTIIGGNNOORREE variables. If the line is a modified
|
||||
history line, restore the history line to its original state.
|
||||
pprreevviioouuss--hhiissttoorryy ((CC--pp))
|
||||
Fetch the previous command from the history list, moving back in the
|
||||
list. This may also be bound to the up arrow key on some keyboards.
|
||||
nneexxtt--hhiissttoorryy ((CC--nn))
|
||||
Fetch the next command from the history list, moving forward in the
|
||||
list. This may also be bound to the down arrow key on some key-
|
||||
Fetch the next command from the history list, moving forward in the
|
||||
list. This may also be bound to the down arrow key on some key-
|
||||
boards.
|
||||
bbeeggiinnnniinngg--ooff--hhiissttoorryy ((MM--<<))
|
||||
Move to the first line in the history.
|
||||
@@ -4122,31 +4128,43 @@ RREEAADDLLIINNEE
|
||||
Move to the end of the input history, i.e., the line currently being
|
||||
entered.
|
||||
ooppeerraattee--aanndd--ggeett--nneexxtt ((CC--oo))
|
||||
Accept the current line for execution as if a newline had been en-
|
||||
Accept the current line for execution as if a newline had been en-
|
||||
tered, and fetch the next line relative to the current line from the
|
||||
history for editing. A numeric argument, if supplied, specifies the
|
||||
history entry to use instead of the current line.
|
||||
ffeettcchh--hhiissttoorryy
|
||||
With a numeric argument, fetch that entry from the history list and
|
||||
make it the current line. Without an argument, move back to the
|
||||
With a numeric argument, fetch that entry from the history list and
|
||||
make it the current line. Without an argument, move back to the
|
||||
first entry in the history list.
|
||||
rreevveerrssee--sseeaarrcchh--hhiissttoorryy ((CC--rr))
|
||||
Search backward starting at the current line and moving "up" through
|
||||
the history as necessary. This is an incremental search. This com-
|
||||
mand sets the region to the matched text and activates the region.
|
||||
ffoorrwwaarrdd--sseeaarrcchh--hhiissttoorryy ((CC--ss))
|
||||
Search forward starting at the current line and moving "down"
|
||||
through the history as necessary. This is an incremental search.
|
||||
This command sets the region to the matched text and activates the
|
||||
Search forward starting at the current line and moving "down"
|
||||
through the history as necessary. This is an incremental search.
|
||||
This command sets the region to the matched text and activates the
|
||||
region.
|
||||
nnoonn--iinnccrreemmeennttaall--rreevveerrssee--sseeaarrcchh--hhiissttoorryy ((MM--pp))
|
||||
Search backward through the history starting at the current line us-
|
||||
ing a non-incremental search for a string supplied by the user. The
|
||||
search string may match anywhere in a history line.
|
||||
nnoonn--iinnccrreemmeennttaall--ffoorrwwaarrdd--sseeaarrcchh--hhiissttoorryy ((MM--nn))
|
||||
Search forward through the history using a non-incremental search
|
||||
for a string supplied by the user. The search string may match any-
|
||||
where in a history line.
|
||||
Search forward through the history starting at the current line us-
|
||||
ing a non-incremental search for a string supplied by the user. The
|
||||
search string may match anywhere in a history line.
|
||||
nnoonn--iinnccrreemmeennttaall--rreevveerrssee--sseeaarrcchh--hhiissttoorryy--aaggaaiinn (())
|
||||
Search backward through the history starting at the current line us-
|
||||
ing a non-incremental search for the last non-incremental search
|
||||
string used. If there is no previous search string, this command
|
||||
returns an error. The search string may match anywhere in a history
|
||||
line.
|
||||
nnoonn--iinnccrreemmeennttaall--ffoorrwwaarrdd--sseeaarrcchh--hhiissttoorryy--aaggaaiinn (())
|
||||
Search forward through the history starting at the current line us-
|
||||
ing a non-incremental search for the last non-incremental search
|
||||
string used. If there is no previous search string, this command
|
||||
returns an error. The search string may match anywhere in a history
|
||||
line.
|
||||
hhiissttoorryy--sseeaarrcchh--bbaacckkwwaarrdd
|
||||
Search backward through the history for the string of characters be-
|
||||
tween the start of the current line and the point. The search
|
||||
@@ -6681,6 +6699,14 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
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 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.
|
||||
This option is enabled by default.
|
||||
llaassttppiippee
|
||||
If set, and job control is not active, the shell runs the
|
||||
last command of a pipeline not executed in the background in
|
||||
@@ -7373,4 +7399,4 @@ BBUUGGSS
|
||||
|
||||
Array variables may not (yet) be exported.
|
||||
|
||||
GNU Bash 5.3 2026 July 1 _B_A_S_H(1)
|
||||
GNU Bash 5.3 2026 August 14 _B_A_S_H(1)
|
||||
|
||||
+47
-9
@@ -5,7 +5,7 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet.ramey@case.edu
|
||||
.\"
|
||||
.\" Last Change: Thu Jul 9 09:19:19 EDT 2026
|
||||
.\" Last Change: Fri Aug 14 15:49:37 EDT 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 July 1" "GNU Bash 5.3"
|
||||
.TH BASH 1 "2026 August 14" "GNU Bash 5.3"
|
||||
.\"
|
||||
.ie \n(.g \{\
|
||||
.ds ' \(aq
|
||||
@@ -3273,8 +3273,8 @@ is also accepted; the \fIsubscript\fP is ignored.
|
||||
Associative arrays are created using
|
||||
.RS
|
||||
.BI "declare \-A\ " name
|
||||
.RE
|
||||
\&.
|
||||
.RE
|
||||
.PP
|
||||
Attributes may be specified for an array variable using the
|
||||
.B \%declare
|
||||
@@ -3307,14 +3307,27 @@ may be either assignment statements, for which the subscript is required,
|
||||
or a list of words that is interpreted as a sequence of alternating keys
|
||||
and values:
|
||||
\fIname\fP=\fB( \fP\fIkey1 value1 key2 value2\fP .\|.\|.\&\fB)\fP.
|
||||
These are treated identically to
|
||||
\fIname\fP=\fB(\fP [\fIkey1\fP]=\fIvalue1\fP [\fIkey2\fP]=\fIvalue2\fP
|
||||
\&.\|.\|.\&\fB)\fP.
|
||||
The first word in the list determines how the remaining words
|
||||
are interpreted; all assignments in a list must be of the same type.
|
||||
When using key/value pairs, the keys may not be missing or empty;
|
||||
a final missing value is treated like the empty string.
|
||||
.PP
|
||||
The
|
||||
.B kvpair_split
|
||||
option to the \fBshopt\fP builtin (see
|
||||
.SM
|
||||
.B "SHELL BUILTIN COMMANDS"
|
||||
below)
|
||||
determines how the words in a key/value pair assignment list are treated.
|
||||
If it is enabled, each word in the list undergoes word expansions,
|
||||
including word splitting, before the assignment identifies
|
||||
individual keys and values.
|
||||
If it is unset, the key/value pairs in the example above are
|
||||
treated identically to
|
||||
\fIname\fP=\fB(\fP [\fIkey1\fP]=\fIvalue1\fP [\fIkey2\fP]=\fIvalue2\fP
|
||||
\&.\|.\|.\&\fB)\fP
|
||||
and expanded appropriately.
|
||||
.PP
|
||||
This syntax is also accepted by the
|
||||
.B declare
|
||||
builtin.
|
||||
@@ -7090,7 +7103,7 @@ common prefix of the set of possible completions using a different color.
|
||||
The color definitions are taken from the value of the \fBLS_COLORS\fP
|
||||
environment variable.
|
||||
If there is a color definition in \fB$LS_COLORS\fP for the custom suffix
|
||||
.Q .readline-colored-completion-prefix ,
|
||||
.Q readline-colored-completion-prefix ,
|
||||
\fBreadline\fP uses this color for
|
||||
the common prefix instead of its default.
|
||||
.TP
|
||||
@@ -7745,14 +7758,30 @@ This command sets the region to the matched text and activates the region.
|
||||
.TP
|
||||
.B non\-incremental\-reverse\-search\-history (M\-p)
|
||||
Search backward through the history starting at the current line
|
||||
using a non-incremental search for a string supplied by the user.
|
||||
using a non-incremental search
|
||||
for a string supplied by the user.
|
||||
The search string may match anywhere in a history line.
|
||||
.TP
|
||||
.B non\-incremental\-forward\-search\-history (M\-n)
|
||||
Search forward through the history using a non-incremental search
|
||||
Search forward through the history starting at the current line
|
||||
using a non-incremental search
|
||||
for a string supplied by the user.
|
||||
The search string may match anywhere in a history line.
|
||||
.TP
|
||||
.B non\-incremental\-reverse\-search\-history\-again ()
|
||||
Search backward through the history starting at the current line
|
||||
using a non-incremental search
|
||||
for the last non-incremental search string used.
|
||||
If there is no previous search string, this command returns an error.
|
||||
The search string may match anywhere in a history line.
|
||||
.TP
|
||||
.B non\-incremental\-forward\-search\-history\-again ()
|
||||
Search forward through the history starting at the current line
|
||||
using a non-incremental search
|
||||
for the last non-incremental search string used.
|
||||
If there is no previous search string, this command returns an error.
|
||||
The search string may match anywhere in a history line.
|
||||
.TP
|
||||
.B history\-search\-backward
|
||||
Search backward through the history for the string of characters
|
||||
between the start of the current line and the point.
|
||||
@@ -12419,6 +12448,15 @@ line to be ignored, as in a non-interactive shell
|
||||
.el above).
|
||||
This option is enabled by default.
|
||||
.TP 8
|
||||
.B kvpair_split
|
||||
If set, a compound assignment to an associative array performs 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 appropriate word expansions,
|
||||
and word splitting is not performed.
|
||||
This option is enabled by default.
|
||||
.TP 8
|
||||
.B lastpipe
|
||||
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.
|
||||
|
||||
+183
-150
@@ -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.3, 9 July 2026).
|
||||
Bash shell (version 5.3, 14 August 2026).
|
||||
|
||||
This is Edition 5.3, last updated 9 July 2026, of ‘The GNU Bash
|
||||
This is Edition 5.3, last updated 14 August 2026, of ‘The GNU Bash
|
||||
Reference Manual’, for ‘Bash’, Version 5.3.
|
||||
|
||||
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.3, 9 July 2026). The Bash home page is
|
||||
Bash shell (version 5.3, 14 August 2026). The Bash home page is
|
||||
<http://www.gnu.org/software/bash/>.
|
||||
|
||||
This is Edition 5.3, last updated 9 July 2026, of ‘The GNU Bash
|
||||
This is Edition 5.3, last updated 14 August 2026, of ‘The GNU Bash
|
||||
Reference Manual’, for ‘Bash’, Version 5.3.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -5463,6 +5463,15 @@ This builtin allows you to change additional optional shell behavior.
|
||||
as in a non-interactive shell. This option is enabled by
|
||||
default.
|
||||
|
||||
‘kvpair_split’
|
||||
If set, a compound assignment to an associative array performs
|
||||
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 appropriate word
|
||||
expansions, and word splitting is not performed. This option
|
||||
is enabled by default.
|
||||
|
||||
‘lastpipe’
|
||||
If set, and job control is not active, the shell runs the last
|
||||
command of a pipeline not executed in the background in the
|
||||
@@ -7340,13 +7349,20 @@ Indexing starts at zero.
|
||||
When assigning to an associative array, the words in a compound
|
||||
assignment may be either assignment statements, for which the subscript
|
||||
is required, or a list of words that is interpreted as a sequence of
|
||||
alternating keys and values: NAME=(KEY1 VALUE1 KEY2 VALUE2 ... ). These
|
||||
are treated identically to NAME=( [KEY1]=VALUE1 [KEY2]=VALUE2 ... ).
|
||||
The first word in the list determines how the remaining words are
|
||||
alternating keys and values: NAME=(KEY1 VALUE1 KEY2 VALUE2 ... ). The
|
||||
first word in the list determines how the remaining words are
|
||||
interpreted; all assignments in a list must be of the same type. When
|
||||
using key/value pairs, the keys may not be missing or empty; a final
|
||||
missing value is treated like the empty string.
|
||||
|
||||
The ‘kvpair_split’ option to the ‘shopt’ builtin (see *note The Shopt
|
||||
Builtin::) determines how the words in a key/value pair assignment list
|
||||
are treated. If it is enabled, each word in the list undergoes word
|
||||
expansions, including word splitting, before the assignment identifies
|
||||
individual keys and values. If it is unset, the key/value pairs in the
|
||||
example above are treated identically to NAME=( [KEY1]=VALUE1
|
||||
[KEY2]=VALUE2 ... ) and expanded appropriately.
|
||||
|
||||
This syntax is also accepted by the ‘declare’ builtin. Individual
|
||||
array elements may be assigned to using the ‘NAME[SUBSCRIPT]=VALUE’
|
||||
syntax introduced above.
|
||||
@@ -9780,7 +9796,6 @@ File: bash.info, Node: Commands For History, Next: Commands For Text, Prev: C
|
||||
|
||||
‘non-incremental-reverse-search-history (M-p)’
|
||||
Search backward starting at the current line and moving "up"
|
||||
|
||||
through the history as necessary using a non-incremental search for
|
||||
a string supplied by the user. The search string may match
|
||||
anywhere in a history line.
|
||||
@@ -9791,6 +9806,20 @@ File: bash.info, Node: Commands For History, Next: Commands For Text, Prev: C
|
||||
a string supplied by the user. The search string may match
|
||||
anywhere in a history line.
|
||||
|
||||
‘non-incremental-reverse-search-history-again ()’
|
||||
Search backward starting at the current line and moving "up"
|
||||
through the history as necessary using a non-incremental search for
|
||||
the last non-incremental search string used. If there is no
|
||||
previous search string, this command returns an error. The search
|
||||
string may match anywhere in a history line.
|
||||
|
||||
‘non-incremental-forward-search-history-again ()’
|
||||
Search forward starting at the current line and moving "down"
|
||||
through the history as necessary using a non-incremental search for
|
||||
the last non-incremental search string used. If there is no
|
||||
previous search string, this command returns an error. The search
|
||||
string may match anywhere in a history line.
|
||||
|
||||
‘history-search-backward ()’
|
||||
Search backward through the history for the string of characters
|
||||
between the start of the current line and the point. The search
|
||||
@@ -13472,7 +13501,7 @@ D.4 Function Index
|
||||
* export-completions (): Commands For Completion.
|
||||
(line 44)
|
||||
* fetch-history (): Commands For History.
|
||||
(line 109)
|
||||
(line 122)
|
||||
* forward-backward-delete-char (): Commands For Text. (line 23)
|
||||
* forward-char (C-f): Commands For Moving. (line 14)
|
||||
* forward-search-history (C-s): Commands For History.
|
||||
@@ -13489,13 +13518,13 @@ D.4 Function Index
|
||||
* history-expand-line (M-^): Miscellaneous Commands.
|
||||
(line 142)
|
||||
* history-search-backward (): Commands For History.
|
||||
(line 54)
|
||||
(line 67)
|
||||
* history-search-forward (): Commands For History.
|
||||
(line 61)
|
||||
* history-substring-search-backward (): Commands For History.
|
||||
(line 68)
|
||||
* history-substring-search-forward (): Commands For History.
|
||||
(line 74)
|
||||
* history-substring-search-backward (): Commands For History.
|
||||
(line 81)
|
||||
* history-substring-search-forward (): Commands For History.
|
||||
(line 87)
|
||||
* insert-comment (M-#): Miscellaneous Commands.
|
||||
(line 59)
|
||||
* insert-completions (M-*): Commands For Completion.
|
||||
@@ -13520,11 +13549,15 @@ D.4 Function Index
|
||||
(line 18)
|
||||
* next-screen-line (): Commands For Moving. (line 45)
|
||||
* non-incremental-forward-search-history (M-n): Commands For History.
|
||||
(line 48)
|
||||
(line 47)
|
||||
* non-incremental-forward-search-history-again (): Commands For History.
|
||||
(line 60)
|
||||
* non-incremental-reverse-search-history (M-p): Commands For History.
|
||||
(line 41)
|
||||
* non-incremental-reverse-search-history-again (): Commands For History.
|
||||
(line 53)
|
||||
* operate-and-get-next (C-o): Commands For History.
|
||||
(line 102)
|
||||
(line 115)
|
||||
* overwrite-mode (): Commands For Text. (line 77)
|
||||
* possible-command-completions (C-x !): Commands For Completion.
|
||||
(line 111)
|
||||
@@ -13588,9 +13621,9 @@ D.4 Function Index
|
||||
* yank (C-y): Commands For Killing.
|
||||
(line 72)
|
||||
* yank-last-arg (M-. or M-_): Commands For History.
|
||||
(line 90)
|
||||
(line 103)
|
||||
* yank-nth-arg (M-C-y): Commands For History.
|
||||
(line 80)
|
||||
(line 93)
|
||||
* yank-pop (M-y): Commands For Killing.
|
||||
(line 75)
|
||||
|
||||
@@ -13771,138 +13804,138 @@ D.5 Concept Index
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top891
|
||||
Node: Introduction2822
|
||||
Node: What is Bash?3035
|
||||
Node: What is a shell?4168
|
||||
Node: Definitions6778
|
||||
Node: Basic Shell Features10105
|
||||
Node: Shell Syntax11329
|
||||
Node: Shell Operation12356
|
||||
Node: Quoting13647
|
||||
Node: Escape Character14985
|
||||
Node: Single Quotes15520
|
||||
Node: Double Quotes15869
|
||||
Node: ANSI-C Quoting17214
|
||||
Node: Locale Translation18608
|
||||
Node: Creating Internationalized Scripts20011
|
||||
Node: Comments24209
|
||||
Node: Shell Commands24976
|
||||
Node: Reserved Words25915
|
||||
Node: Simple Commands27058
|
||||
Node: Pipelines27720
|
||||
Node: Lists30976
|
||||
Node: Compound Commands32925
|
||||
Node: Looping Constructs33934
|
||||
Node: Conditional Constructs36483
|
||||
Node: Command Grouping51795
|
||||
Node: Coprocesses53287
|
||||
Node: GNU Parallel55973
|
||||
Node: Shell Functions56891
|
||||
Node: Shell Parameters65339
|
||||
Node: Positional Parameters70240
|
||||
Node: Special Parameters71330
|
||||
Node: Shell Expansions74791
|
||||
Node: Brace Expansion76980
|
||||
Node: Tilde Expansion80316
|
||||
Node: Shell Parameter Expansion83271
|
||||
Node: Command Substitution104119
|
||||
Node: Arithmetic Expansion107970
|
||||
Node: Process Substitution109154
|
||||
Node: Word Splitting110321
|
||||
Node: Filename Expansion112765
|
||||
Node: Pattern Matching115989
|
||||
Node: Quote Removal121755
|
||||
Node: Redirections122059
|
||||
Node: Executing Commands132328
|
||||
Node: Simple Command Expansion132995
|
||||
Node: Command Search and Execution135103
|
||||
Node: Command Execution Environment137547
|
||||
Node: Environment141073
|
||||
Node: Exit Status142976
|
||||
Node: Signals145035
|
||||
Node: Shell Scripts149983
|
||||
Node: Shell Builtin Commands153287
|
||||
Node: Bourne Shell Builtins155628
|
||||
Node: Bash Builtins182347
|
||||
Node: Modifying Shell Behavior220082
|
||||
Node: The Set Builtin220424
|
||||
Node: The Shopt Builtin232456
|
||||
Node: Special Builtins249509
|
||||
Node: Shell Variables250498
|
||||
Node: Bourne Shell Variables250932
|
||||
Node: Bash Variables253440
|
||||
Node: Bash Features292724
|
||||
Node: Invoking Bash293738
|
||||
Node: Bash Startup Files300968
|
||||
Node: Interactive Shells306328
|
||||
Node: What is an Interactive Shell?306736
|
||||
Node: Is this Shell Interactive?307398
|
||||
Node: Interactive Shell Behavior308222
|
||||
Node: Bash Conditional Expressions311983
|
||||
Node: Shell Arithmetic317400
|
||||
Node: Aliases320727
|
||||
Node: Arrays323861
|
||||
Node: The Directory Stack331563
|
||||
Node: Directory Stack Builtins332360
|
||||
Node: Controlling the Prompt336805
|
||||
Node: The Restricted Shell339924
|
||||
Node: Bash POSIX Mode343017
|
||||
Node: Shell Compatibility Mode362976
|
||||
Node: Job Control371983
|
||||
Node: Job Control Basics372440
|
||||
Node: Job Control Builtins378808
|
||||
Node: Job Control Variables385596
|
||||
Node: Command Line Editing386827
|
||||
Node: Introduction and Notation388530
|
||||
Node: Readline Interaction390882
|
||||
Node: Readline Bare Essentials392070
|
||||
Node: Readline Movement Commands393878
|
||||
Node: Readline Killing Commands394874
|
||||
Node: Readline Arguments396897
|
||||
Node: Searching397987
|
||||
Node: Readline Init File400230
|
||||
Node: Readline Init File Syntax401533
|
||||
Node: Conditional Init Constructs428484
|
||||
Node: Sample Init File432869
|
||||
Node: Bindable Readline Commands435989
|
||||
Node: Commands For Moving437527
|
||||
Node: Commands For History439991
|
||||
Node: Commands For Text445384
|
||||
Node: Commands For Killing449509
|
||||
Node: Numeric Arguments452297
|
||||
Node: Commands For Completion453449
|
||||
Node: Keyboard Macros459145
|
||||
Node: Miscellaneous Commands459846
|
||||
Node: Readline vi Mode467389
|
||||
Node: Programmable Completion468366
|
||||
Node: Programmable Completion Builtins478102
|
||||
Node: A Programmable Completion Example489839
|
||||
Node: Using History Interactively495184
|
||||
Node: Bash History Facilities495865
|
||||
Node: Bash History Builtins499600
|
||||
Node: History Interaction507195
|
||||
Node: Event Designators512145
|
||||
Node: Word Designators513723
|
||||
Node: Modifiers516115
|
||||
Node: Installing Bash518052
|
||||
Node: Basic Installation519168
|
||||
Node: Compilers and Options523044
|
||||
Node: Compiling For Multiple Architectures523794
|
||||
Node: Installation Names525547
|
||||
Node: Specifying the System Type527781
|
||||
Node: Sharing Defaults528527
|
||||
Node: Operation Controls529241
|
||||
Node: Optional Features530260
|
||||
Node: Reporting Bugs542983
|
||||
Node: Major Differences From The Bourne Shell544340
|
||||
Node: GNU Free Documentation License565767
|
||||
Node: Indexes590944
|
||||
Node: Builtin Index591395
|
||||
Node: Reserved Word Index598493
|
||||
Node: Variable Index600938
|
||||
Node: Function Index618351
|
||||
Node: Concept Index632484
|
||||
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 Builtins182359
|
||||
Node: Modifying Shell Behavior220094
|
||||
Node: The Set Builtin220436
|
||||
Node: The Shopt Builtin232468
|
||||
Node: Special Builtins250004
|
||||
Node: Shell Variables250993
|
||||
Node: Bourne Shell Variables251427
|
||||
Node: Bash Variables253935
|
||||
Node: Bash Features293219
|
||||
Node: Invoking Bash294233
|
||||
Node: Bash Startup Files301463
|
||||
Node: Interactive Shells306823
|
||||
Node: What is an Interactive Shell?307231
|
||||
Node: Is this Shell Interactive?307893
|
||||
Node: Interactive Shell Behavior308717
|
||||
Node: Bash Conditional Expressions312478
|
||||
Node: Shell Arithmetic317895
|
||||
Node: Aliases321222
|
||||
Node: Arrays324356
|
||||
Node: The Directory Stack332459
|
||||
Node: Directory Stack Builtins333256
|
||||
Node: Controlling the Prompt337701
|
||||
Node: The Restricted Shell340820
|
||||
Node: Bash POSIX Mode343913
|
||||
Node: Shell Compatibility Mode363872
|
||||
Node: Job Control372879
|
||||
Node: Job Control Basics373336
|
||||
Node: Job Control Builtins379704
|
||||
Node: Job Control Variables386492
|
||||
Node: Command Line Editing387723
|
||||
Node: Introduction and Notation389426
|
||||
Node: Readline Interaction391778
|
||||
Node: Readline Bare Essentials392966
|
||||
Node: Readline Movement Commands394774
|
||||
Node: Readline Killing Commands395770
|
||||
Node: Readline Arguments397793
|
||||
Node: Searching398883
|
||||
Node: Readline Init File401126
|
||||
Node: Readline Init File Syntax402429
|
||||
Node: Conditional Init Constructs429380
|
||||
Node: Sample Init File433765
|
||||
Node: Bindable Readline Commands436885
|
||||
Node: Commands For Moving438423
|
||||
Node: Commands For History440887
|
||||
Node: Commands For Text447044
|
||||
Node: Commands For Killing451169
|
||||
Node: Numeric Arguments453957
|
||||
Node: Commands For Completion455109
|
||||
Node: Keyboard Macros460805
|
||||
Node: Miscellaneous Commands461506
|
||||
Node: Readline vi Mode469049
|
||||
Node: Programmable Completion470026
|
||||
Node: Programmable Completion Builtins479762
|
||||
Node: A Programmable Completion Example491499
|
||||
Node: Using History Interactively496844
|
||||
Node: Bash History Facilities497525
|
||||
Node: Bash History Builtins501260
|
||||
Node: History Interaction508855
|
||||
Node: Event Designators513805
|
||||
Node: Word Designators515383
|
||||
Node: Modifiers517775
|
||||
Node: Installing Bash519712
|
||||
Node: Basic Installation520828
|
||||
Node: Compilers and Options524704
|
||||
Node: Compiling For Multiple Architectures525454
|
||||
Node: Installation Names527207
|
||||
Node: Specifying the System Type529441
|
||||
Node: Sharing Defaults530187
|
||||
Node: Operation Controls530901
|
||||
Node: Optional Features531920
|
||||
Node: Reporting Bugs544643
|
||||
Node: Major Differences From The Bourne Shell546000
|
||||
Node: GNU Free Documentation License567427
|
||||
Node: Indexes592604
|
||||
Node: Builtin Index593055
|
||||
Node: Reserved Word Index600153
|
||||
Node: Variable Index602598
|
||||
Node: Function Index620011
|
||||
Node: Concept Index634436
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
+183
-150
@@ -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.3, 9 July 2026).
|
||||
Bash shell (version 5.3, 14 August 2026).
|
||||
|
||||
This is Edition 5.3, last updated 9 July 2026, of ‘The GNU Bash
|
||||
This is Edition 5.3, last updated 14 August 2026, of ‘The GNU Bash
|
||||
Reference Manual’, for ‘Bash’, Version 5.3.
|
||||
|
||||
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.3, 9 July 2026). The Bash home page is
|
||||
Bash shell (version 5.3, 14 August 2026). The Bash home page is
|
||||
<http://www.gnu.org/software/bash/>.
|
||||
|
||||
This is Edition 5.3, last updated 9 July 2026, of ‘The GNU Bash
|
||||
This is Edition 5.3, last updated 14 August 2026, of ‘The GNU Bash
|
||||
Reference Manual’, for ‘Bash’, Version 5.3.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -5464,6 +5464,15 @@ This builtin allows you to change additional optional shell behavior.
|
||||
as in a non-interactive shell. This option is enabled by
|
||||
default.
|
||||
|
||||
‘kvpair_split’
|
||||
If set, a compound assignment to an associative array performs
|
||||
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 appropriate word
|
||||
expansions, and word splitting is not performed. This option
|
||||
is enabled by default.
|
||||
|
||||
‘lastpipe’
|
||||
If set, and job control is not active, the shell runs the last
|
||||
command of a pipeline not executed in the background in the
|
||||
@@ -7341,13 +7350,20 @@ Indexing starts at zero.
|
||||
When assigning to an associative array, the words in a compound
|
||||
assignment may be either assignment statements, for which the subscript
|
||||
is required, or a list of words that is interpreted as a sequence of
|
||||
alternating keys and values: NAME=(KEY1 VALUE1 KEY2 VALUE2 ... ). These
|
||||
are treated identically to NAME=( [KEY1]=VALUE1 [KEY2]=VALUE2 ... ).
|
||||
The first word in the list determines how the remaining words are
|
||||
alternating keys and values: NAME=(KEY1 VALUE1 KEY2 VALUE2 ... ). The
|
||||
first word in the list determines how the remaining words are
|
||||
interpreted; all assignments in a list must be of the same type. When
|
||||
using key/value pairs, the keys may not be missing or empty; a final
|
||||
missing value is treated like the empty string.
|
||||
|
||||
The ‘kvpair_split’ option to the ‘shopt’ builtin (see *note The Shopt
|
||||
Builtin::) determines how the words in a key/value pair assignment list
|
||||
are treated. If it is enabled, each word in the list undergoes word
|
||||
expansions, including word splitting, before the assignment identifies
|
||||
individual keys and values. If it is unset, the key/value pairs in the
|
||||
example above are treated identically to NAME=( [KEY1]=VALUE1
|
||||
[KEY2]=VALUE2 ... ) and expanded appropriately.
|
||||
|
||||
This syntax is also accepted by the ‘declare’ builtin. Individual
|
||||
array elements may be assigned to using the ‘NAME[SUBSCRIPT]=VALUE’
|
||||
syntax introduced above.
|
||||
@@ -9781,7 +9797,6 @@ File: bashref.info, Node: Commands For History, Next: Commands For Text, Prev
|
||||
|
||||
‘non-incremental-reverse-search-history (M-p)’
|
||||
Search backward starting at the current line and moving "up"
|
||||
|
||||
through the history as necessary using a non-incremental search for
|
||||
a string supplied by the user. The search string may match
|
||||
anywhere in a history line.
|
||||
@@ -9792,6 +9807,20 @@ File: bashref.info, Node: Commands For History, Next: Commands For Text, Prev
|
||||
a string supplied by the user. The search string may match
|
||||
anywhere in a history line.
|
||||
|
||||
‘non-incremental-reverse-search-history-again ()’
|
||||
Search backward starting at the current line and moving "up"
|
||||
through the history as necessary using a non-incremental search for
|
||||
the last non-incremental search string used. If there is no
|
||||
previous search string, this command returns an error. The search
|
||||
string may match anywhere in a history line.
|
||||
|
||||
‘non-incremental-forward-search-history-again ()’
|
||||
Search forward starting at the current line and moving "down"
|
||||
through the history as necessary using a non-incremental search for
|
||||
the last non-incremental search string used. If there is no
|
||||
previous search string, this command returns an error. The search
|
||||
string may match anywhere in a history line.
|
||||
|
||||
‘history-search-backward ()’
|
||||
Search backward through the history for the string of characters
|
||||
between the start of the current line and the point. The search
|
||||
@@ -13473,7 +13502,7 @@ D.4 Function Index
|
||||
* export-completions (): Commands For Completion.
|
||||
(line 44)
|
||||
* fetch-history (): Commands For History.
|
||||
(line 109)
|
||||
(line 122)
|
||||
* forward-backward-delete-char (): Commands For Text. (line 23)
|
||||
* forward-char (C-f): Commands For Moving. (line 14)
|
||||
* forward-search-history (C-s): Commands For History.
|
||||
@@ -13490,13 +13519,13 @@ D.4 Function Index
|
||||
* history-expand-line (M-^): Miscellaneous Commands.
|
||||
(line 142)
|
||||
* history-search-backward (): Commands For History.
|
||||
(line 54)
|
||||
(line 67)
|
||||
* history-search-forward (): Commands For History.
|
||||
(line 61)
|
||||
* history-substring-search-backward (): Commands For History.
|
||||
(line 68)
|
||||
* history-substring-search-forward (): Commands For History.
|
||||
(line 74)
|
||||
* history-substring-search-backward (): Commands For History.
|
||||
(line 81)
|
||||
* history-substring-search-forward (): Commands For History.
|
||||
(line 87)
|
||||
* insert-comment (M-#): Miscellaneous Commands.
|
||||
(line 59)
|
||||
* insert-completions (M-*): Commands For Completion.
|
||||
@@ -13521,11 +13550,15 @@ D.4 Function Index
|
||||
(line 18)
|
||||
* next-screen-line (): Commands For Moving. (line 45)
|
||||
* non-incremental-forward-search-history (M-n): Commands For History.
|
||||
(line 48)
|
||||
(line 47)
|
||||
* non-incremental-forward-search-history-again (): Commands For History.
|
||||
(line 60)
|
||||
* non-incremental-reverse-search-history (M-p): Commands For History.
|
||||
(line 41)
|
||||
* non-incremental-reverse-search-history-again (): Commands For History.
|
||||
(line 53)
|
||||
* operate-and-get-next (C-o): Commands For History.
|
||||
(line 102)
|
||||
(line 115)
|
||||
* overwrite-mode (): Commands For Text. (line 77)
|
||||
* possible-command-completions (C-x !): Commands For Completion.
|
||||
(line 111)
|
||||
@@ -13589,9 +13622,9 @@ D.4 Function Index
|
||||
* yank (C-y): Commands For Killing.
|
||||
(line 72)
|
||||
* yank-last-arg (M-. or M-_): Commands For History.
|
||||
(line 90)
|
||||
(line 103)
|
||||
* yank-nth-arg (M-C-y): Commands For History.
|
||||
(line 80)
|
||||
(line 93)
|
||||
* yank-pop (M-y): Commands For Killing.
|
||||
(line 75)
|
||||
|
||||
@@ -13772,138 +13805,138 @@ D.5 Concept Index
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top894
|
||||
Node: Introduction2828
|
||||
Node: What is Bash?3044
|
||||
Node: What is a shell?4180
|
||||
Node: Definitions6793
|
||||
Node: Basic Shell Features10123
|
||||
Node: Shell Syntax11350
|
||||
Node: Shell Operation12380
|
||||
Node: Quoting13674
|
||||
Node: Escape Character15015
|
||||
Node: Single Quotes15553
|
||||
Node: Double Quotes15905
|
||||
Node: ANSI-C Quoting17253
|
||||
Node: Locale Translation18650
|
||||
Node: Creating Internationalized Scripts20056
|
||||
Node: Comments24257
|
||||
Node: Shell Commands25027
|
||||
Node: Reserved Words25969
|
||||
Node: Simple Commands27115
|
||||
Node: Pipelines27780
|
||||
Node: Lists31039
|
||||
Node: Compound Commands32991
|
||||
Node: Looping Constructs34003
|
||||
Node: Conditional Constructs36555
|
||||
Node: Command Grouping51870
|
||||
Node: Coprocesses53365
|
||||
Node: GNU Parallel56054
|
||||
Node: Shell Functions56975
|
||||
Node: Shell Parameters65426
|
||||
Node: Positional Parameters70330
|
||||
Node: Special Parameters71423
|
||||
Node: Shell Expansions74887
|
||||
Node: Brace Expansion77079
|
||||
Node: Tilde Expansion80418
|
||||
Node: Shell Parameter Expansion83376
|
||||
Node: Command Substitution104227
|
||||
Node: Arithmetic Expansion108081
|
||||
Node: Process Substitution109268
|
||||
Node: Word Splitting110438
|
||||
Node: Filename Expansion112885
|
||||
Node: Pattern Matching116112
|
||||
Node: Quote Removal121881
|
||||
Node: Redirections122188
|
||||
Node: Executing Commands132460
|
||||
Node: Simple Command Expansion133130
|
||||
Node: Command Search and Execution135241
|
||||
Node: Command Execution Environment137688
|
||||
Node: Environment141217
|
||||
Node: Exit Status143123
|
||||
Node: Signals145185
|
||||
Node: Shell Scripts150136
|
||||
Node: Shell Builtin Commands153443
|
||||
Node: Bourne Shell Builtins155787
|
||||
Node: Bash Builtins182509
|
||||
Node: Modifying Shell Behavior220247
|
||||
Node: The Set Builtin220592
|
||||
Node: The Shopt Builtin232627
|
||||
Node: Special Builtins249683
|
||||
Node: Shell Variables250675
|
||||
Node: Bourne Shell Variables251112
|
||||
Node: Bash Variables253623
|
||||
Node: Bash Features292910
|
||||
Node: Invoking Bash293927
|
||||
Node: Bash Startup Files301160
|
||||
Node: Interactive Shells306523
|
||||
Node: What is an Interactive Shell?306934
|
||||
Node: Is this Shell Interactive?307599
|
||||
Node: Interactive Shell Behavior308426
|
||||
Node: Bash Conditional Expressions312190
|
||||
Node: Shell Arithmetic317610
|
||||
Node: Aliases320940
|
||||
Node: Arrays324077
|
||||
Node: The Directory Stack331782
|
||||
Node: Directory Stack Builtins332582
|
||||
Node: Controlling the Prompt337030
|
||||
Node: The Restricted Shell340152
|
||||
Node: Bash POSIX Mode343248
|
||||
Node: Shell Compatibility Mode363210
|
||||
Node: Job Control372220
|
||||
Node: Job Control Basics372680
|
||||
Node: Job Control Builtins379051
|
||||
Node: Job Control Variables385842
|
||||
Node: Command Line Editing387076
|
||||
Node: Introduction and Notation388782
|
||||
Node: Readline Interaction391137
|
||||
Node: Readline Bare Essentials392328
|
||||
Node: Readline Movement Commands394139
|
||||
Node: Readline Killing Commands395138
|
||||
Node: Readline Arguments397164
|
||||
Node: Searching398257
|
||||
Node: Readline Init File400503
|
||||
Node: Readline Init File Syntax401809
|
||||
Node: Conditional Init Constructs428763
|
||||
Node: Sample Init File433151
|
||||
Node: Bindable Readline Commands436274
|
||||
Node: Commands For Moving437815
|
||||
Node: Commands For History440282
|
||||
Node: Commands For Text445678
|
||||
Node: Commands For Killing449806
|
||||
Node: Numeric Arguments452597
|
||||
Node: Commands For Completion453752
|
||||
Node: Keyboard Macros459451
|
||||
Node: Miscellaneous Commands460155
|
||||
Node: Readline vi Mode467701
|
||||
Node: Programmable Completion468681
|
||||
Node: Programmable Completion Builtins478420
|
||||
Node: A Programmable Completion Example490160
|
||||
Node: Using History Interactively495508
|
||||
Node: Bash History Facilities496192
|
||||
Node: Bash History Builtins499930
|
||||
Node: History Interaction507528
|
||||
Node: Event Designators512481
|
||||
Node: Word Designators514062
|
||||
Node: Modifiers516457
|
||||
Node: Installing Bash518397
|
||||
Node: Basic Installation519516
|
||||
Node: Compilers and Options523395
|
||||
Node: Compiling For Multiple Architectures524148
|
||||
Node: Installation Names525904
|
||||
Node: Specifying the System Type528141
|
||||
Node: Sharing Defaults528890
|
||||
Node: Operation Controls529607
|
||||
Node: Optional Features530629
|
||||
Node: Reporting Bugs543355
|
||||
Node: Major Differences From The Bourne Shell544715
|
||||
Node: GNU Free Documentation License566145
|
||||
Node: Indexes591325
|
||||
Node: Builtin Index591779
|
||||
Node: Reserved Word Index598880
|
||||
Node: Variable Index601328
|
||||
Node: Function Index618744
|
||||
Node: Concept Index632880
|
||||
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 Builtins182521
|
||||
Node: Modifying Shell Behavior220259
|
||||
Node: The Set Builtin220604
|
||||
Node: The Shopt Builtin232639
|
||||
Node: Special Builtins250178
|
||||
Node: Shell Variables251170
|
||||
Node: Bourne Shell Variables251607
|
||||
Node: Bash Variables254118
|
||||
Node: Bash Features293405
|
||||
Node: Invoking Bash294422
|
||||
Node: Bash Startup Files301655
|
||||
Node: Interactive Shells307018
|
||||
Node: What is an Interactive Shell?307429
|
||||
Node: Is this Shell Interactive?308094
|
||||
Node: Interactive Shell Behavior308921
|
||||
Node: Bash Conditional Expressions312685
|
||||
Node: Shell Arithmetic318105
|
||||
Node: Aliases321435
|
||||
Node: Arrays324572
|
||||
Node: The Directory Stack332678
|
||||
Node: Directory Stack Builtins333478
|
||||
Node: Controlling the Prompt337926
|
||||
Node: The Restricted Shell341048
|
||||
Node: Bash POSIX Mode344144
|
||||
Node: Shell Compatibility Mode364106
|
||||
Node: Job Control373116
|
||||
Node: Job Control Basics373576
|
||||
Node: Job Control Builtins379947
|
||||
Node: Job Control Variables386738
|
||||
Node: Command Line Editing387972
|
||||
Node: Introduction and Notation389678
|
||||
Node: Readline Interaction392033
|
||||
Node: Readline Bare Essentials393224
|
||||
Node: Readline Movement Commands395035
|
||||
Node: Readline Killing Commands396034
|
||||
Node: Readline Arguments398060
|
||||
Node: Searching399153
|
||||
Node: Readline Init File401399
|
||||
Node: Readline Init File Syntax402705
|
||||
Node: Conditional Init Constructs429659
|
||||
Node: Sample Init File434047
|
||||
Node: Bindable Readline Commands437170
|
||||
Node: Commands For Moving438711
|
||||
Node: Commands For History441178
|
||||
Node: Commands For Text447338
|
||||
Node: Commands For Killing451466
|
||||
Node: Numeric Arguments454257
|
||||
Node: Commands For Completion455412
|
||||
Node: Keyboard Macros461111
|
||||
Node: Miscellaneous Commands461815
|
||||
Node: Readline vi Mode469361
|
||||
Node: Programmable Completion470341
|
||||
Node: Programmable Completion Builtins480080
|
||||
Node: A Programmable Completion Example491820
|
||||
Node: Using History Interactively497168
|
||||
Node: Bash History Facilities497852
|
||||
Node: Bash History Builtins501590
|
||||
Node: History Interaction509188
|
||||
Node: Event Designators514141
|
||||
Node: Word Designators515722
|
||||
Node: Modifiers518117
|
||||
Node: Installing Bash520057
|
||||
Node: Basic Installation521176
|
||||
Node: Compilers and Options525055
|
||||
Node: Compiling For Multiple Architectures525808
|
||||
Node: Installation Names527564
|
||||
Node: Specifying the System Type529801
|
||||
Node: Sharing Defaults530550
|
||||
Node: Operation Controls531267
|
||||
Node: Optional Features532289
|
||||
Node: Reporting Bugs545015
|
||||
Node: Major Differences From The Bourne Shell546375
|
||||
Node: GNU Free Documentation License567805
|
||||
Node: Indexes592985
|
||||
Node: Builtin Index593439
|
||||
Node: Reserved Word Index600540
|
||||
Node: Variable Index602988
|
||||
Node: Function Index620404
|
||||
Node: Concept Index634832
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
+21
-2
@@ -6591,6 +6591,15 @@ causes that word and all remaining characters on that
|
||||
line to be ignored, as in a non-interactive shell.
|
||||
This option is enabled by default.
|
||||
|
||||
@item kvpair_split
|
||||
If set, a compound assignment to an associative array performs 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 appropriate word expansions,
|
||||
and word splitting is not performed.
|
||||
This option is enabled by default.
|
||||
|
||||
@item lastpipe
|
||||
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.
|
||||
@@ -8833,13 +8842,23 @@ may be either assignment statements, for which the subscript is required,
|
||||
or a list of words that is interpreted as a sequence of alternating keys
|
||||
and values:
|
||||
@var{name}=(@var{key1} @var{value1} @var{key2} @var{value2} @dots{} ).
|
||||
These are treated identically to
|
||||
@var{name}=( [@var{key1}]=@var{value1} [@var{key2}]=@var{value2} @dots{} ).
|
||||
The first word in the list determines how the remaining words
|
||||
are interpreted; all assignments in a list must be of the same type.
|
||||
When using key/value pairs, the keys may not be missing or empty;
|
||||
a final missing value is treated like the empty string.
|
||||
|
||||
The
|
||||
@code{kvpair_split}
|
||||
option to the @code{shopt} builtin (see @ref{The Shopt Builtin})
|
||||
determines how the words in a key/value pair assignment list are treated.
|
||||
If it is enabled, each word in the list undergoes word expansions,
|
||||
including word splitting, before the assignment identifies
|
||||
individual keys and values.
|
||||
If it is unset, the key/value pairs in the example above are
|
||||
treated identically to
|
||||
@var{name}=( [@var{key1}]=@var{value1} [@var{key2}]=@var{value2} @dots{} )
|
||||
and expanded appropriately.
|
||||
|
||||
This syntax is also accepted by the @code{declare}
|
||||
builtin.
|
||||
Individual array elements may be assigned to using the
|
||||
|
||||
+3
-3
@@ -2,10 +2,10 @@
|
||||
Copyright (C) 1988-2026 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set LASTCHANGE Thu Jul 9 09:19:32 EDT 2026
|
||||
@set LASTCHANGE Fri Aug 14 15:49:54 EDT 2026
|
||||
|
||||
@set EDITION 5.3
|
||||
@set VERSION 5.3
|
||||
|
||||
@set UPDATED 9 July 2026
|
||||
@set UPDATED-MONTH July 2026
|
||||
@set UPDATED 14 August 2026
|
||||
@set UPDATED-MONTH August 2026
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Simple makefile for the sample loadable builtins
|
||||
#
|
||||
# Copyright (C) 1996-2025 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2026 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -103,7 +103,8 @@ INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins -I${srcdir} \
|
||||
ALLPROG = print truefalse sleep finfo logname basename dirname fdflags \
|
||||
tty pathchk tee head mkdir rmdir mkfifo mktemp printenv id whoami \
|
||||
uname sync push ln unlink realpath strftime mypid setpgid seq rm \
|
||||
accept csv dsv cut stat getconf kv strptime chmod fltexpr jobid rev
|
||||
accept csv dsv cut stat getconf kv strptime chmod fltexpr jobid rev \
|
||||
loadassoc
|
||||
OTHERPROG = necho hello cat pushd asort
|
||||
|
||||
SUBDIRS = perl
|
||||
@@ -229,6 +230,9 @@ dsv: dsv.o
|
||||
kv: kv.o
|
||||
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ kv.o $(SHOBJ_LIBS)
|
||||
|
||||
loadassoc: loadassoc.o
|
||||
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ loadassoc.o $(SHOBJ_LIBS)
|
||||
|
||||
cut: cut.o
|
||||
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ cut.o $(SHOBJ_LIBS)
|
||||
|
||||
@@ -327,7 +331,8 @@ OBJS = print.o truefalse.o accept.o sleep.o finfo.o getconf.o logname.o \
|
||||
basename.o dirname.o tty.o pathchk.o tee.o head.o rmdir.o necho.o \
|
||||
hello.o cat.o csv.o dsv.o kv.o cut.o printenv.o id.o whoami.o uname.o \
|
||||
sync.o push.o mkdir.o mktemp.o realpath.o strftime.o setpgid.o stat.o \
|
||||
fdflags.o seq.o asort.o strptime.o chmod.o fltexpr.o jobid.o rev.o
|
||||
fdflags.o seq.o asort.o strptime.o chmod.o fltexpr.o jobid.o rev.o \
|
||||
loadassoc.o
|
||||
|
||||
${OBJS}: ${BUILD_DIR}/config.h
|
||||
|
||||
@@ -352,6 +357,7 @@ chmod.o: chmod.c
|
||||
csv.o: csv.c
|
||||
dsv.o: dsv.c
|
||||
kv.o: kv.c
|
||||
loadassoc.o: loadassoc.c
|
||||
cut.o: cut.c
|
||||
printenv.o: printenv.c
|
||||
id.o: id.c
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
/* loadassoc - treat the arguments as key-value pairs and assign them
|
||||
sequentially to the associative array supplied as an
|
||||
argument to the -a option. Very similar to the `kv' builtin. */
|
||||
|
||||
/*
|
||||
This allows you to copy an existing associative array `assoc' like:
|
||||
loadassoc -A copy "${assoc[@]@k}"
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright (C) 2026 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash.
|
||||
Bash is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Bash is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bash. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#if defined (HAVE_UNISTD_H)
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#include "bashansi.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "loadables.h"
|
||||
|
||||
#define LOADASSOC_ARRAY_DEFAULT "ASSOC"
|
||||
|
||||
static int
|
||||
kvlist (SHELL_VAR *var, WORD_LIST *list)
|
||||
{
|
||||
WORD_LIST *k, *v;
|
||||
char *key, *val;
|
||||
int r;
|
||||
|
||||
r = 0;
|
||||
for (k = list; k; k = v->next)
|
||||
{
|
||||
v = k->next;
|
||||
|
||||
key = savestring (k->word->word);
|
||||
if (key == 0 || *key == '\0')
|
||||
{
|
||||
err_badarraysub (k->word->word);
|
||||
free (key);
|
||||
continue;
|
||||
}
|
||||
|
||||
val = v ? savestring (v->word->word) : 0;
|
||||
if (val == 0)
|
||||
{
|
||||
val = (char *)xmalloc (1);
|
||||
val[0] = '\0';
|
||||
}
|
||||
|
||||
r += bind_assoc_variable (var, name_cell (var), key, val, 0) != 0;
|
||||
|
||||
free (val);
|
||||
|
||||
if (v == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
int
|
||||
loadassoc_builtin (WORD_LIST *list)
|
||||
{
|
||||
#if defined (ARRAY_VARS)
|
||||
int opt, rval, unset;
|
||||
char *array_name;
|
||||
SHELL_VAR *v;
|
||||
|
||||
array_name = 0;
|
||||
rval = EXECUTION_SUCCESS;
|
||||
unset = 1;
|
||||
|
||||
reset_internal_getopt ();
|
||||
while ((opt = internal_getopt (list, "A:a")) != -1)
|
||||
{
|
||||
switch (opt)
|
||||
{
|
||||
case 'A':
|
||||
array_name = list_optarg;
|
||||
break;
|
||||
case 'a':
|
||||
unset = 0;
|
||||
break;
|
||||
CASE_HELPOPT;
|
||||
default:
|
||||
builtin_usage ();
|
||||
return (EX_USAGE);
|
||||
}
|
||||
}
|
||||
list = loptend;
|
||||
|
||||
if (array_name == 0)
|
||||
array_name = LOADASSOC_ARRAY_DEFAULT;
|
||||
|
||||
if (valid_identifier (array_name) == 0)
|
||||
{
|
||||
sh_invalidid (array_name);
|
||||
return (EXECUTION_FAILURE);
|
||||
}
|
||||
|
||||
v = find_or_make_array_variable (array_name, 3);
|
||||
if (v == 0 || readonly_p (v) || noassign_p (v))
|
||||
{
|
||||
if (v && readonly_p (v))
|
||||
err_readonly (array_name);
|
||||
return (EXECUTION_FAILURE);
|
||||
}
|
||||
else if (assoc_p (v) == 0)
|
||||
{
|
||||
builtin_error ("%s: not an associative array", array_name);
|
||||
return (EXECUTION_FAILURE);
|
||||
}
|
||||
if (invisible_p (v))
|
||||
VUNSETATTR (v, att_invisible);
|
||||
|
||||
if (unset)
|
||||
assoc_flush (assoc_cell (v));
|
||||
|
||||
rval = list ? kvlist (v, list) : 1; /* no args is ok */
|
||||
|
||||
return (rval > 0 ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
|
||||
#else
|
||||
builtin_error ("arrays not available");
|
||||
return (EXECUTION_FAILURE);
|
||||
#endif
|
||||
}
|
||||
|
||||
char *loadassoc_doc[] = {
|
||||
"Assign arguments as keys and values of an associative array.",
|
||||
"",
|
||||
"Take arguments and assign them as keys and corresponding values to",
|
||||
"an associative array. The array name is supplied as the argument to",
|
||||
"the -A option. ASSOC is the default associative array name.",
|
||||
"",
|
||||
"If the -a option is supplied, the values are added to the existing",
|
||||
"value of the array; if it is not supplied, the array is unset before",
|
||||
"assigning any values.",
|
||||
"",
|
||||
"The return status is true if the assignment is performed successfully;",
|
||||
"false if an error occurs or if the array variable is invalid or",
|
||||
"readonly.",
|
||||
|
||||
(char *)NULL
|
||||
};
|
||||
|
||||
struct builtin loadassoc_struct = {
|
||||
"loadassoc", /* builtin name */
|
||||
loadassoc_builtin, /* function implementing the builtin */
|
||||
BUILTIN_ENABLED, /* initial flags for builtin */
|
||||
loadassoc_doc, /* array of long documentation strings. */
|
||||
"loadassoc [-A aname] [-a] key value ...", /* usage synopsis; becomes short_doc */
|
||||
0 /* reserved for internal use */
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
/* general.h -- defines that everybody likes to use. */
|
||||
|
||||
/* Copyright (C) 1993-2025 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993-2026 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ getnow(void)
|
||||
# define timerisunset(tvp) ((tvp)->tv_sec == 0 && (tvp)->tv_usec == 0)
|
||||
#endif
|
||||
#if !defined (timerset)
|
||||
# define timerset(tvp, s, u) do { tvp->tv_sec = s; tvp->tv_usec = u; } while (0)
|
||||
# define timerset(tvp, s, u) do { (tvp)->tv_sec = s; (tvp)->tv_usec = u; } while (0)
|
||||
#endif
|
||||
|
||||
#ifndef TIMEVAL_TO_TIMESPEC
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet.ramey@case.edu
|
||||
.\"
|
||||
.\" Last Change: Mon Oct 6 09:58:21 EDT 2025
|
||||
.\" Last Change: Mon Aug 10 10:05:09 EDT 2026
|
||||
.\"
|
||||
.TH READLINE 3 "2025 October 6" "GNU Readline 8.3"
|
||||
.TH READLINE 3 "2026 August 10" "GNU Readline 8.3"
|
||||
.\" Ensure this string is initialized to avoid groff warnings.
|
||||
.ds zX \" empty
|
||||
.\"
|
||||
@@ -1166,14 +1166,30 @@ This command sets the region to the matched text and activates the region.
|
||||
.TP
|
||||
.B non\-incremental\-reverse\-search\-history (M\-p)
|
||||
Search backward through the history starting at the current line
|
||||
using a non-incremental search for a string supplied by the user.
|
||||
using a non-incremental search
|
||||
for a string supplied by the user.
|
||||
The search string may match anywhere in a history line.
|
||||
.TP
|
||||
.B non\-incremental\-forward\-search\-history (M\-n)
|
||||
Search forward through the history using a non-incremental search
|
||||
Search forward through the history starting at the current line
|
||||
using a non-incremental search
|
||||
for a string supplied by the user.
|
||||
The search string may match anywhere in a history line.
|
||||
.TP
|
||||
.B non\-incremental\-reverse\-search\-history\-again ()
|
||||
Search backward through the history starting at the current line
|
||||
using a non-incremental search
|
||||
for the last non-incremental search string used.
|
||||
If there is no previous search string, this command returns an error.
|
||||
The search string may match anywhere in a history line.
|
||||
.TP
|
||||
.B non\-incremental\-forward\-search\-history\-again ()
|
||||
Search forward through the history starting at the current line
|
||||
using a non-incremental search
|
||||
for the last non-incremental search string used.
|
||||
If there is no previous search string, this command returns an error.
|
||||
The search string may match anywhere in a history line.
|
||||
.TP
|
||||
.B history\-search\-backward
|
||||
Search backward through the history for the string of characters
|
||||
between the start of the current line and the point.
|
||||
|
||||
@@ -1449,7 +1449,6 @@ This command sets the region to the matched text and activates the region.
|
||||
|
||||
@item non-incremental-reverse-search-history (M-p)
|
||||
Search backward starting at the current line and moving ``up''
|
||||
|
||||
through the history as necessary using a non-incremental search
|
||||
for a string supplied by the user.
|
||||
The search string may match anywhere in a history line.
|
||||
@@ -1460,6 +1459,20 @@ through the history as necessary using a non-incremental search
|
||||
for a string supplied by the user.
|
||||
The search string may match anywhere in a history line.
|
||||
|
||||
@item non-incremental-reverse-search-history-again ()
|
||||
Search backward starting at the current line and moving ``up''
|
||||
through the history as necessary using a non-incremental search
|
||||
for the last non-incremental search string used.
|
||||
If there is no previous search string, this command returns an error.
|
||||
The search string may match anywhere in a history line.
|
||||
|
||||
@item non-incremental-forward-search-history-again ()
|
||||
Search forward starting at the current line and moving ``down''
|
||||
through the history as necessary using a non-incremental search
|
||||
for the last non-incremental search string used.
|
||||
If there is no previous search string, this command returns an error.
|
||||
The search string may match anywhere in a history line.
|
||||
|
||||
@item history-search-backward ()
|
||||
Search backward through the history for the string of characters
|
||||
between the start of the current line and the point.
|
||||
|
||||
@@ -5,7 +5,7 @@ Copyright (C) 1988-2026 Free Software Foundation, Inc.
|
||||
@set EDITION 8.3
|
||||
@set VERSION 8.3
|
||||
|
||||
@set UPDATED 9 July 2026
|
||||
@set UPDATED-MONTH July 2026
|
||||
@set UPDATED 10 August
|
||||
@set UPDATED-MONTH August 2026
|
||||
|
||||
@set LASTCHANGE Thu Jul 9 09:20:35 EDT 2026
|
||||
@set LASTCHANGE Mon Aug 10 10:08:56 EDT 2026
|
||||
|
||||
+1
-1
@@ -25,6 +25,6 @@
|
||||
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
|
||||
looks for to find the patch level (for the sccs version string). */
|
||||
|
||||
#define PATCHLEVEL 9
|
||||
#define PATCHLEVEL 0
|
||||
|
||||
#endif /* _PATCHLEVEL_H_ */
|
||||
|
||||
@@ -7,7 +7,7 @@ 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-02-01 10:59+0400\n"
|
||||
"PO-Revision-Date: 2026-08-09 13:44+0400\n"
|
||||
"Last-Translator: Zayed Al-Saidi <zayed.alsaidi@gmail.com>\n"
|
||||
"Language-Team: Arabic <(nothing)>\n"
|
||||
"Language: ar\n"
|
||||
@@ -16,7 +16,7 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100 >= 3 && n%100<=10 ? 3 : n%100 >= 11 && n%100<=99 ? 4 : 5;\n"
|
||||
"X-Generator: Lokalize 23.08.5\n"
|
||||
"X-Generator: Lokalize 25.12.3\n"
|
||||
|
||||
#: arrayfunc.c:63
|
||||
msgid "bad array subscript"
|
||||
@@ -2293,7 +2293,7 @@ msgstr "builtin [أمر_قشرة_داخلي [وسيط ...]]"
|
||||
|
||||
#: builtins.c:63
|
||||
msgid "caller [expr]"
|
||||
msgstr "المستدعَي [expr]"
|
||||
msgstr "caller [تعبير]"
|
||||
|
||||
#: builtins.c:66
|
||||
msgid "cd [-L|[-P [-e]]] [-@] [dir]"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* redir.c -- Functions to perform input and output redirection. */
|
||||
|
||||
/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1997-2026 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
|
||||
@@ -10121,7 +10121,7 @@ parameter_brace_expand (char *string, size_t *indexp, int quoted, int pflags, in
|
||||
sindex = *indexp;
|
||||
t_index = ++sindex;
|
||||
/* ${#var} doesn't have any of the other parameter expansions on it. */
|
||||
if (string[t_index] == '#' && legal_variable_starter (string[t_index+1])) /* {{ */
|
||||
if (string[t_index] == '#' && legal_variable_starter ((unsigned char)string[t_index+1])) /* {{ */
|
||||
name = string_extract (string, &t_index, "}", SX_VARNAME);
|
||||
else
|
||||
#if defined (CASEMOD_EXPANSIONS)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* syntax.h -- Syntax definitions for the shell */
|
||||
|
||||
/* Copyright (C) 2000, 2001, 2005, 2008, 2009-2020 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2000, 2001, 2005, 2008, 2009-2020, 2026 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
|
||||
+1
-1
@@ -515,7 +515,7 @@ declare -a e=([0]="Darwin")
|
||||
declare -A a=([0]="a b" )
|
||||
declare -A b=([0]="/scratch/bash" )
|
||||
declare -A c=([1]="2" )
|
||||
declare -A d=(["a b"]="" )
|
||||
declare -A d=([a]="b" )
|
||||
declare -A e=([Darwin]="" )
|
||||
array20.sub
|
||||
a+b+c
|
||||
|
||||
+9
-9
@@ -277,20 +277,20 @@ declare -Arx foo=([two]="2" [three]="3" [one]="1" )
|
||||
assoc12.sub
|
||||
declare -A v1=(["1 2"]="3" )
|
||||
declare -A v2=(["1 2"]="3" )
|
||||
declare -A v3=(["1 2"]="3" )
|
||||
declare -A v3=([3]="" [1]="2" )
|
||||
declare -A v1=(["1 2"]="3 4 5" )
|
||||
declare -A v2=(["1 2"]="3 4 5" )
|
||||
declare -A v3=([5]="" [3]="4" [1]="2" )
|
||||
declare -A v1=(["1 2"]="3 4 5" )
|
||||
declare -A v2=(["1 2"]="3 4 5" )
|
||||
declare -A v3=([4]="5" ["1 2"]="3" )
|
||||
declare -A v1=(["1 2"]="3 4 5" )
|
||||
declare -A v2=(["1 2"]="3 4 5" )
|
||||
declare -A v3=(["1 2"]="3 4 5" )
|
||||
declare -A v1=(["1 2"]="3 4 5" )
|
||||
declare -A v2=(["1 2"]="3 4 5" )
|
||||
declare -A v3=(["1 2"]="3 4 5" )
|
||||
declare -A v1=(["1 2"]="3 4 5" )
|
||||
declare -A v2=(["1 2"]="3 4 5" )
|
||||
declare -A v3=(["1 2"]="3 4 5" )
|
||||
declare -A v1=(["20 40 80"]="xtra" ["1 2"]="3 4 5" )
|
||||
declare -A v1=([80]="xtra" ["1 2"]="3 4 5" [20]="40" )
|
||||
declare -A v2=(["20 40 80"]="xtra" ["1 2"]="3 4 5" )
|
||||
declare -A v3=(["1 2"]="3 4 5" ["\$xtra"]="xtra" )
|
||||
declare -A v1=(["20 40 80"]="new xtra" ["1 2"]="3 4 5" )
|
||||
declare -A v1=([80]="xtra" ["20 40 80"]="new xtra" ["1 2"]="3 4 5" [20]="40" )
|
||||
declare -A v2=(["20 40 80"]="new xtra" ["1 2"]="3 4 5" )
|
||||
declare -A v3=(["1 2"]="3 4 5" ["\$xtra"]="new xtra" )
|
||||
assoc13.sub
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ func
|
||||
loaddict()
|
||||
{
|
||||
dict=( '"' dquote '`' bquote "'" squote '\' bslash)
|
||||
dict+=( '$' dol @ at * star \{ lbrace \} rbrace ? quest)
|
||||
dict+=( '$' dol @ at \* star \{ lbrace \} rbrace \? quest)
|
||||
|
||||
declare -p dict
|
||||
echo dict=\( ${dict[@]@K} \)
|
||||
|
||||
@@ -211,6 +211,7 @@ hostcomplete
|
||||
huponexit
|
||||
inherit_errexit
|
||||
interactive_comments
|
||||
kvpair_split
|
||||
lastpipe
|
||||
lithist
|
||||
localvar_inherit
|
||||
|
||||
@@ -73,9 +73,9 @@ this-bash this-bash
|
||||
$- for -c includes c
|
||||
invocation1.sub
|
||||
bash: line 0: badopt: invalid shell option name
|
||||
checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath
|
||||
checkhash:checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath
|
||||
cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath
|
||||
checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:kvpair_split:patsub_replacement:progcomp:promptvars:sourcepath
|
||||
checkhash:checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:kvpair_split:patsub_replacement:progcomp:promptvars:sourcepath
|
||||
cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:kvpair_split:patsub_replacement:progcomp:promptvars:sourcepath
|
||||
./invocation1.sub: line 40: BASHOPTS: readonly variable
|
||||
invocation2.sub
|
||||
braceexpand:hashall:interactive-comments
|
||||
|
||||
@@ -40,6 +40,7 @@ shopt -s hostcomplete
|
||||
shopt -u huponexit
|
||||
shopt -u inherit_errexit
|
||||
shopt -s interactive_comments
|
||||
shopt -s kvpair_split
|
||||
shopt -u lastpipe
|
||||
shopt -u lithist
|
||||
shopt -u localvar_inherit
|
||||
@@ -75,6 +76,7 @@ shopt -s globasciiranges
|
||||
shopt -s globskipdots
|
||||
shopt -s hostcomplete
|
||||
shopt -s interactive_comments
|
||||
shopt -s kvpair_split
|
||||
shopt -s patsub_replacement
|
||||
shopt -s progcomp
|
||||
shopt -s promptvars
|
||||
@@ -310,5 +312,9 @@ xtrace off
|
||||
--
|
||||
./shopt.tests: line 106: shopt: xyz1: invalid shell option name
|
||||
./shopt.tests: line 107: shopt: xyz1: invalid option name
|
||||
40c40
|
||||
< kvpair_split off
|
||||
---
|
||||
> kvpair_split on
|
||||
expand_aliases on
|
||||
expand_aliases on
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* trap.c -- Not the trap command, but useful functions for manipulating
|
||||
those objects. The trap command is in builtins/trap.def. */
|
||||
|
||||
/* Copyright (C) 1987-2025 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1987-2026 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user