fix for @E transformation; fixes for failures in arith for and for commands; style changes to man page; fix for bug in read builtin if it assigns to IFS

This commit is contained in:
Chet Ramey
2023-10-10 12:00:19 -04:00
parent 2eb9a3699b
commit 09c32bc946
29 changed files with 4726 additions and 4538 deletions
+44
View File
@@ -7203,6 +7203,7 @@ lib/readline/complete.c
- rl_filename_completion_function: if the application sets a filename
rewrite hook, use it to rewrite the filename we're matching as well
as filenames read with readdir().
[SUPERSEDED BY CHANGE OF 10/4/2023]
From a report by Grisha Levit <grishalevit@gmail.com>
7/21
@@ -7734,3 +7735,46 @@ bashline.c
lib/readline/doc/rltech.texi
- rl_completion_rewrite_hook: document
10/5
----
lib/readline/complete.c
- rl_complete_internal: use `%' as an op character to indicate that
we should just display the completions, like '?' in previous versions
(nothing uses this yet)
- rl_possible_completions: set last_completion_failed to 0 before we
pass '?' to rl_complete_internal so we don't worry about trying to
insert a single completion
10/6
----
subst.c
- string_transform: use ansicstr directly for the `E' transformation
so we don't accidentally remove too many escapes.
From a report and patch from Grisha Levit <grishalevit@gmail.com>
execute_cmd.c
- execute_arith_for_command: make sure a failed init expression resets
loop_level so break and continue work correctly
From a report and patch from Grisha Levit <grishalevit@gmail.com>
- execute_for_command: set line_number for invalid identifier error
messages; restore before returning error
From a report and patch from Grisha Levit <grishalevit@gmail.com>
lib/readline/misc.c
- _rl_set_insert_mode: manage RL_STATE_OVERWRITE when modifiying
insert mode
doc/bash.1,doc/bashref.texi
- some style and formatting changes from Bjarni Ingi Gislason
<bjarniig@simnet.is>
subst.c
- getifs: now returns allocated memory to insulate it from changes to
$IFS
builtins/read.def
- read_builtin: since getifs now returns allocated memory, note when
we need to free ifs_chars and free it before returning.
Reported by Robert Elz <kre@munnari.OZ.AU> in
https://www.austingroupbugs.net/view.php?id=1778#c6513
+1
View File
@@ -1432,6 +1432,7 @@ tests/read6.sub f
tests/read7.sub f
tests/read8.sub f
tests/read9.sub f
tests/read10.sub f
tests/redir.tests f
tests/redir.right f
tests/redir1.sub f
+12 -3
View File
@@ -218,6 +218,7 @@ read_builtin (WORD_LIST *list)
int input_is_tty, input_is_pipe, unbuffered_read, skip_ctlesc, skip_ctlnul;
int edit, use_bash_completion;
int raw, nchars, silent, have_timeout, ignore_delim, fd;
int free_ifs;
int lastsig, t_errno;
int mb_cur_max;
unsigned int tmsec, tmusec;
@@ -403,12 +404,18 @@ read_builtin (WORD_LIST *list)
delim = -1;
/* IF IFS is unset, we use the default of " \t\n". */
ifs_chars = getifs ();
if (ifs_chars == 0) /* XXX - shouldn't happen */
ifs_chars = "";
free_ifs = 0;
/* If we want to read exactly NCHARS chars, don't split on IFS */
if (ignore_delim)
ifs_chars = "";
else
{
ifs_chars = getifs ();
if (ifs_chars == 0) /* XXX - shouldn't happen */
ifs_chars = "";
else
free_ifs = 1;
}
for (skip_ctlesc = skip_ctlnul = 0, e = ifs_chars; *e; e++)
skip_ctlesc |= *e == CTLESC, skip_ctlnul |= *e == CTLNUL;
@@ -1080,6 +1087,8 @@ assign_vars:
else
retval = EXECUTION_FAILURE;
if (free_ifs)
free (ifs_chars);
FREE (tofree);
free (orig_input_string);
+3055 -3067
View File
File diff suppressed because it is too large Load Diff
+101 -58
View File
@@ -5,14 +5,19 @@
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
.\" Last Change: Wed Sep 13 15:39:24 EDT 2023
.\" Last Change: Fri Oct 6 16:41:20 EDT 2023
.\"
.\" suggested by Bjarni Ingi Gislason <bjarniig@simnet.is>
.if n \{\
.kern 0
.ss 12 0
.\}
.\" bash_builtins, strip all but Built-Ins section
.\" avoid a warning about an undefined register
.\" .if !rzY .nr zY 0
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH BASH 1 "2023 September 13" "GNU Bash 5.3"
.TH BASH 1 "2023 October 6" "GNU Bash 5.3"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -511,8 +516,13 @@ command (only \fBin\fP and \fBdo\fP are valid):
.if t .RS
.PP
.B
.if n ! case coproc do done elif else esac fi for function if in select then until while { } time [[ ]]
.if t ! case coproc do done elif else esac fi for function if in select then until while { } time [[ ]]
.if n ! case coproc do done elif else esac fi for function if in select \
then until while { } time [[ ]]
.if t \{\
.lg 0
! case coproc do done elif else esac fi for function if in select then until while { } time [[ ]]
.lg 1
.\}
.if t .RE
.SH "SHELL GRAMMAR"
This section describes the syntax of the various forms of shell commands.
@@ -1350,8 +1360,8 @@ For instance, if a variable name is passed to a shell function as its first
argument, running
.sp .5
.RS
.if t \f(CWdeclare -n ref=$1\fP
.if n declare -n ref=$1
.if t \f(CWdeclare \-n ref=$1\fP
.if n declare \-n ref=$1
.RE
.sp .5
inside the function creates a nameref variable \fBref\fP whose value is
@@ -1646,7 +1656,7 @@ was invoked.
\fB${BASH_LINENO[\fP\fI$i\fP\fB]}\fP is the line number in the source
file (\fB${BASH_SOURCE[\fP\fI$i+1\fP\fB]}\fP) where
\fB${FUNCNAME[\fP\fI$i\fP\fB]}\fP was called
(or \fB${BASH_LINENO[\fP\fI$i-1\fP\fB]}\fP if referenced within another
(or \fB${BASH_LINENO[\fP\fI$i\-1\fP\fB]}\fP if referenced within another
shell function).
Use
.SM
@@ -2000,7 +2010,7 @@ between 0 and 32767.
Assigning
a value to
.SM
.BR RANDOM
.B RANDOM
initializes (seeds) the sequence of random numbers.
If
.SM
@@ -2010,8 +2020,8 @@ subsequently reset.
.TP
.B READLINE_ARGUMENT
Any numeric argument given to a readline command that was defined using
.if t \f(CWbind -x\fP
.if n "bind -x"
.if t \f(CWbind \-x\fP
.if n "bind \-x"
(see
.SM
.B "SHELL BUILTIN COMMANDS"
@@ -2022,8 +2032,8 @@ when it was invoked.
The contents of the
.B readline
line buffer, for use with
.if t \f(CWbind -x\fP
.if n "bind -x"
.if t \f(CWbind \-x\fP
.if n "bind \-x"
(see
.SM
.B "SHELL BUILTIN COMMANDS"
@@ -2033,8 +2043,8 @@ below).
The position of the mark (saved insertion point) in the
.B readline
line buffer, for use with
.if t \f(CWbind -x\fP
.if n "bind -x"
.if t \f(CWbind \-x\fP
.if n "bind \-x"
(see
.SM
.B "SHELL BUILTIN COMMANDS"
@@ -2046,8 +2056,8 @@ called the \fIregion\fP.
The position of the insertion point in the
.B readline
line buffer, for use with
.if t \f(CWbind -x\fP
.if n "bind -x"
.if t \f(CWbind \-x\fP
.if n "bind \-x"
(see
.SM
.B "SHELL BUILTIN COMMANDS"
@@ -2166,8 +2176,8 @@ is not used to search for the resultant filename.
.B BASH_XTRACEFD
If set to an integer corresponding to a valid file descriptor, \fBbash\fP
will write the trace output generated when
.if t \f(CWset -x\fP
.if n \fIset -x\fP
.if t \f(CWset \-x\fP
.if n \fIset \-x\fP
is enabled to that file descriptor.
The file descriptor is closed when
.SM
@@ -2602,7 +2612,7 @@ not already set.
If this variable is set, and is an array,
the value of each set element is executed as a command
prior to issuing each primary prompt.
If this is set but not an array variable,
If this is set but not an array variable,
its value is used as a command to execute instead.
.TP
.B PROMPT_DIRTRIM
@@ -2705,7 +2715,7 @@ included.
.IP
If this variable is not set, \fBbash\fP acts as if it had the
value \fB$\(aq\enreal\et%3lR\enuser\et%3lU\ensys\et%3lS\(aq\fP.
If the value is null, no timing information is displayed.
If the value is null, \fBbash\fP does not display any timing information.
A trailing newline is added when the format string is displayed.
.PD 0
.TP
@@ -2896,7 +2906,7 @@ array, and an index of \-1 references the last element.
.PP
Referencing an array variable without a subscript is equivalent to
referencing the array with a subscript of 0.
Any reference to a variable using a valid subscript is legal, and
Any reference to a variable using a valid subscript is valid, and
.B bash
will create an array if necessary.
.PP
@@ -4040,7 +4050,6 @@ A
.B ]
may be matched by including it as the first character
in the set.
.br
.if t .sp 0.5
.if n .sp 1
Within
@@ -4053,12 +4062,13 @@ following classes defined in the POSIX standard:
.PP
.RS
.B
.if n alnum alpha ascii blank cntrl digit graph lower print punct space upper word xdigit
.if t alnum alpha ascii blank cntrl digit graph lower print punct space upper word xdigit
.if n alnum alpha ascii blank cntrl digit graph lower print punct space \
upper word xdigit
.if t alnum alpha ascii blank cntrl digit graph lower \
print punct space upper word xdigit
.br
A character class matches any character belonging to that class.
The \fBword\fP character class matches letters, digits, and the character _.
.br
.if t .sp 0.5
.if n .sp 1
Within
@@ -4069,7 +4079,6 @@ an \fIequivalence class\fP can be specified using the syntax
\fB[=\fP\fIc\fP\fB=]\fP, which matches all characters with the
same collation weight (as defined by the current locale) as
the character \fIc\fP.
.br
.if t .sp 0.5
.if n .sp 1
Within
@@ -4635,7 +4644,7 @@ traps (see the description of the
.B trap
builtin under
.SM
.B SHELL BUILTIN COMMANDS
.B "SHELL BUILTIN COMMANDS"
below) are not inherited unless the function has been given the
\fBtrace\fP attribute (see the description of the
.SM
@@ -6240,8 +6249,8 @@ non-printing characters, which can be used to embed a terminal control
sequence into the mode string.
.TP
.B enable\-active\-region (On)
The \fIpoint\fP is the current cursor position, and \fImark\fP refers
to a saved cursor position.
The \fIpoint\fP is the current cursor position, and \fImark\fP refers
to a saved cursor position.
The text between the point and mark is referred to as the \fIregion\fP.
When this variable is set to \fIOn\fP, readline allows certain commands
to designate the region as \fIactive\fP.
@@ -6303,7 +6312,7 @@ regardless of what the terminal claims it can support. The name
is a synonym for this variable.
The default is \fIOff\fP, but readline will set it to \fIOn\fP if the
locale contains eight-bit characters.
This variable is dependent on the \fBLC_CTYPE\fP locale category, and
This variable is dependent on the \fBLC_CTYPE\fP locale category, and
may change if the locale is changed.
.TP
.B isearch\-terminators (``C\-[C\-J'')
@@ -6457,7 +6466,7 @@ The
construct allows bindings to be made based on the
editing mode, the terminal being used, or the application using
readline. The text of the test, after any comparison operator,
extends to the end of the line;
extends to the end of the line;
unless otherwise noted, no characters are required to isolate it.
.RS
.IP \fBmode\fP
@@ -7394,11 +7403,11 @@ completion function would load completions dynamically:
.br
{
.br
. "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124
. "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124
.br
}
.br
complete -D -F _completion_loader -o bashdefault -o default
complete \-D \-F _completion_loader -o bashdefault -o default
.br
\fP
.SH HISTORY
@@ -8827,8 +8836,8 @@ binary found via the
.SM
.B PATH
instead of the shell builtin version, run
.if t \f(CWenable -n test\fP.
.if n ``enable -n test''.
.if t \f(CWenable \-n test\fP.
.if n ``enable \-n test''.
The
.B \-f
option means to load the new builtin command
@@ -8857,7 +8866,7 @@ If no options are supplied and a \fIname\fP is not a shell builtin,
\fBenable\fP will attempt to load \fIname\fP from a shared object named
\fIname\fP, as if the command were
.if t \f(CWenable \-f\fP \fIname name\fP .
.if n ``enable -f \fIname name\fP .
.if n ``enable \-f \fIname name\fP .
The return value is 0 unless a
.I name
is not a shell builtin or there is an error loading a new builtin
@@ -9030,7 +9039,7 @@ In the second form, \fIcommand\fP is re-executed after each instance
of \fIpat\fP is replaced by \fIrep\fP.
\fICommand\fP is interpreted the same as \fIfirst\fP above.
A useful alias to use with this is
.if n ``r="fc -s"'',
.if n ``r="fc \-s"'',
.if t \f(CWr='fc \-s'\fP,
so that typing
.if n ``r cc''
@@ -9301,7 +9310,7 @@ Delete the history entry at position \fIoffset\fP.
If \fIoffset\fP is negative, it is interpreted as relative to one greater
than the last history position, so negative indices count back from the
end of the history, and an index of \-1 refers to the current
\fBhistory -d\fP command.
\fBhistory \-d\fP command.
.TP
\fB\-d\fP \fIstart\fP\-\fIend\fP
Delete the range of history entries between positions \fIstart\fP and
@@ -9617,16 +9626,16 @@ Removes the \fIn\fPth entry counting from the right of the list
shown by
.BR dirs ,
starting with zero. For example:
.if n ``popd -0''
.if t \f(CWpopd -0\fP
.if n ``popd \-0''
.if t \f(CWpopd \-0\fP
removes the last directory,
.if n ``popd -1''
.if t \f(CWpopd -1\fP
.if n ``popd \-1''
.if t \f(CWpopd \-1\fP
the next to last.
.PD
.PP
If the top element of the directory stack is modified, and
the \fI-n\fP option was not supplied, \fBpopd\fP uses the \fBcd\fP
the \fI\-n\fP option was not supplied, \fBpopd\fP uses the \fBcd\fP
builtin to change to the directory at the top of the stack.
If the \fBcd\fP fails, \fBpopd\fP returns a non-zero value.
.PP
@@ -11300,8 +11309,8 @@ if
.I name
were specified as a command name,
or nothing if
.if t \f(CWtype -t name\fP
.if n ``type -t name''
.if t \f(CWtype \-t name\fP
.if n ``type \-t name''
would not return
.IR file .
The
@@ -11310,8 +11319,8 @@ option forces a
.SM
.B PATH
search for each \fIname\fP, even if
.if t \f(CWtype -t name\fP
.if n ``type -t name''
.if t \f(CWtype \-t name\fP
.if n ``type \-t name''
would not return
.IR file .
If a command is hashed,
@@ -11629,7 +11638,7 @@ specified as a set of options to the shopt builtin (
.BR compat41 ,
and so on).
There is only one current
compatibility level -- each option is mutually exclusive.
compatibility level \(en each option is mutually exclusive.
The compatibility level is intended to allow users to select behavior
from previous versions that is incompatible with newer versions
while they migrate scripts to use current features and
@@ -11699,11 +11708,9 @@ has no special effect
.PD 0
.RS
.IP \(bu
interrupting a command list such as "a ; b ; c" causes the execution
of the next command in the list (in bash-4.0 and later versions,
the shell acts as if it received the interrupt, so
interrupting one command in a list aborts the execution of the
entire list)
the \fB<\fP and \fB>\fP operators to the \fB[[\fP command do not
consider the current locale when comparing strings; they use ASCII
ordering.
.RE
.PD
.TP
@@ -11758,7 +11765,7 @@ are not special within double-quoted word expansions
.IP \(bu
the shell does not print a warning message if an attempt is made to
use a quoted compound assignment as an argument to declare
(e.g., declare -a foo=\(aq(1 2)\(aq). Later versions warn that this usage is
(e.g., declare \-a foo=\(aq(1 2)\(aq). Later versions warn that this usage is
deprecated
.IP \(bu
word expansion errors are considered non-fatal errors that cause the
@@ -11826,6 +11833,42 @@ when the \fB\-l\fP option is supplied.
The \fBunset\fP builtin treats attempts to unset array subscripts \fB@\fP
and \fB*\fP differently depending on whether the array is indexed or
associative, and differently than in previous versions.
.IP \(bu
arithmetic commands ( ((...)) ) and the expressions in an arithmetic for
statement can be expanded more than once
.IP \(bu
expressions used as arguments to arithmetic operators in the \fB[[\fP
conditional command can be expanded more than once
.IP \(bu
the expressions in substring parameter brace expansion can be
expanded more than once
.IP \(bu
the expressions in the $(( ... )) word expansion can be expanded
more than once
.IP \(bu
arithmetic expressions used as indexed array subscripts can be
expanded more than once
.IP \(bu
\fBtest \-v\fP, when given an argument of \fBA[@]\fP, where \fBA\P is
an existing associative array, will return true if the array has any set
elements.
Bash-5.2 will look for and report on a key named \fB@\fP.
.IP \(bu
the ${\fIparameter\fP\fB[:]=\fP\fIvalue\fP} word expansion will return
\fIvalue\fP, before any variable-specific transformations have been
performed (e.g., converting to lowercase).
Bash-5.2 will return the final value assigned to the variable.
.IP \(bu
Parsing command substitutions will behave as if extended globbing
(see the description of the
.B shopt
builtin above)
is enabled, so that parsing a command substitution containing an extglob
pattern (say, as part of a shell function) will not fail.
This assumes the intent is to enable extglob before the command is executed
and word expansions are performed.
It will fail at word expansion time if extglob hasn't been
enabled by the time the command is executed.
.RE
.PD
.\" bash_builtins
@@ -11912,7 +11955,7 @@ option to the
builtin command
.IP \(bu
turning off restricted mode with
\fBset +r\fP or \fBshopt -u restricted_shell\fP.
\fBset +r\fP or \fBshopt \-u restricted_shell\fP.
.PP
These restrictions are enforced after any startup files are read.
.PP
@@ -11922,7 +11965,7 @@ These restrictions are enforced after any startup files are read.
.SM
.B "COMMAND EXECUTION"
above),
\}
.\}
.B rbash
turns off any restrictions in the shell spawned to execute the
script.
@@ -11940,7 +11983,7 @@ script.
\fIPortable Operating System Interface (POSIX) Part 2: Shell and Utilities\fP, IEEE --
http://pubs.opengroup.org/onlinepubs/9699919799/
.TP
http://tiswww.case.edu/\(tichet/bash/POSIX -- a description of posix mode
http://tiswww.case.edu/\(tichet/bash/POSIX \(en a description of posix mode
.TP
\fIsh\fP(1), \fIksh\fP(1), \fIcsh\fP(1)
.TP
@@ -11983,7 +12026,7 @@ Chet Ramey, Case Western Reserve University
chet.ramey@case.edu
.SH BUG REPORTS
If you find a bug in
.B bash,
.BR bash ,
you should report it. But first, you should
make sure that it really is a bug, and that it appears in the latest
version of
+70 -29
View File
@@ -3,7 +3,7 @@
</HEAD>
<BODY><TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2023 August 31<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2023 October 6<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<BR><A HREF="#index">Index</A>
@@ -680,7 +680,13 @@ command (only <B>in</B> and <B>do</B> are valid):
<B>
</B>
! case coproc do done elif else esac fi for function if in select then until while { } time [[ ]]
<BR>&nbsp;!&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;&nbsp;&nbsp;&nbsp;coproc&nbsp;&nbsp;&nbsp;&nbsp;do&nbsp;&nbsp;&nbsp;&nbsp;done&nbsp;&nbsp;&nbsp;&nbsp;elif&nbsp;&nbsp;&nbsp;&nbsp;else&nbsp;&nbsp;&nbsp;&nbsp;esac&nbsp;&nbsp;&nbsp;&nbsp;fi&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;&nbsp;&nbsp;&nbsp;in&nbsp;&nbsp;&nbsp;&nbsp;select&nbsp;&nbsp;&nbsp;&nbsp;then&nbsp;&nbsp;&nbsp;&nbsp;until&nbsp;&nbsp;&nbsp;&nbsp;while&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;time&nbsp;&nbsp;&nbsp;&nbsp;[[&nbsp;&nbsp;&nbsp;&nbsp;]]
</DL>
@@ -3284,7 +3290,7 @@ not already set.
If this variable is set, and is an array,
the value of each set element is executed as a command
prior to issuing each primary prompt.
If this is set but not an array variable,
If this is set but not an array variable,
its value is used as a command to execute instead.
<DT><B>PROMPT_DIRTRIM</B>
@@ -3413,7 +3419,7 @@ included.
<DT><DD>
If this variable is not set, <B>bash</B> acts as if it had the
value <B>$aq\nreal\t%3lR\nuser\t%3lU\nsys\t%3lSaq</B>.
If the value is null, no timing information is displayed.
If the value is null, <B>bash</B> does not display any timing information.
A trailing newline is added when the format string is displayed.
<DT><B>TMOUT</B>
@@ -3646,7 +3652,7 @@ array, and an index of -1 references the last element.
Referencing an array variable without a subscript is equivalent to
referencing the array with a subscript of 0.
Any reference to a variable using a valid subscript is legal, and
Any reference to a variable using a valid subscript is valid, and
<B>bash</B>
will create an array if necessary.
@@ -5060,8 +5066,6 @@ A
may be matched by including it as the first character
in the set.
<BR>
<P>
@@ -5086,8 +5090,6 @@ alnum alpha ascii blank cntrl digit graph lower print punct
A character class matches any character belonging to that class.
The <B>word</B> character class matches letters, digits, and the character _.
<BR>
<P>
@@ -5101,8 +5103,6 @@ an <I>equivalence class</I> can be specified using the syntax
<B>[=</B><I>c</I><B>=]</B>, which matches all characters with the
same collation weight (as defined by the current locale) as
the character <I>c</I>.
<BR>
<P>
@@ -7921,8 +7921,8 @@ sequence into the mode string.
<DT><B>enable-active-region (On)</B>
<DD>
The <I>point</I> is the current cursor position, and <I>mark</I> refers
to a saved cursor position.
The <I>point</I> is the current cursor position, and <I>mark</I> refers
to a saved cursor position.
The text between the point and mark is referred to as the <I>region</I>.
When this variable is set to <I>On</I>, readline allows certain commands
to designate the region as <I>active</I>.
@@ -7993,7 +7993,7 @@ regardless of what the terminal claims it can support. The name
is a synonym for this variable.
The default is <I>Off</I>, but readline will set it to <I>On</I> if the
locale contains eight-bit characters.
This variable is dependent on the <B>LC_CTYPE</B> locale category, and
This variable is dependent on the <B>LC_CTYPE</B> locale category, and
may change if the locale is changed.
<DT><B>isearch-terminators (``C-[C-J'')</B>
@@ -8177,7 +8177,7 @@ The
construct allows bindings to be made based on the
editing mode, the terminal being used, or the application using
readline. The text of the test, after any comparison operator,
<BR>&nbsp;extends&nbsp;to&nbsp;the&nbsp;end&nbsp;of&nbsp;the&nbsp;line;
extends to the end of the line;
unless otherwise noted, no characters are required to isolate it.
<DL COMPACT><DT><DD>
<DL COMPACT>
@@ -9345,7 +9345,7 @@ completion function would load completions dynamically:
{
<BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>. &quot;/etc/bash_completion.d/$1.sh&quot; &gt;/dev/null 2&gt;&amp;1 &amp;&amp; return 124<BR>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;&quot;/etc/bash_completion.d/$1.sh&quot;&nbsp;&gt;/dev/null&nbsp;2&gt;&amp;1&nbsp;&amp;&amp;&nbsp;return&nbsp;124
<BR>
}
@@ -11566,10 +11566,10 @@ and remembered. Any previously-remembered pathname is discarded.
If the
<B>-p</B>
option is supplied, no path search is performed, and
option is supplied, <B>hash</B> uses
<I>filename</I>
is used as the full filename of the command.
as the full filename of the command.
The
<B>-r</B>
@@ -11592,6 +11592,11 @@ The
option causes output to be displayed in a format that may be reused as input.
If no arguments are given, or if only <B>-l</B> is supplied,
information about remembered commands is printed.
The <B>-t</B>, <B>-d</B>, and <B>-p</B> options (the options that
act on the <I>name</I> arguments) are mutually exclusive.
Only one will be active.
If more than one is supplied, <B>-t</B> has higher priority than
<B>-p</B>, and both are higher priority than <B>-d</B>.
The return status is true unless a
<I>name</I>
@@ -14600,7 +14605,7 @@ specified as a set of options to the shopt builtin (
and so on).
There is only one current
compatibility level -- each option is mutually exclusive.
compatibility level en each option is mutually exclusive.
The compatibility level is intended to allow users to select behavior
from previous versions that is incompatible with newer versions
while they migrate scripts to use current features and
@@ -14682,11 +14687,9 @@ has no special effect
<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>*<DD>
interrupting a command list such as &quot;a ; b ; c&quot; causes the execution
of the next command in the list (in bash-4.0 and later versions,
the shell acts as if it received the interrupt, so
interrupting one command in a list aborts the execution of the
entire list)
the <B>&lt;</B> and <B>&gt;</B> operators to the <B>[[</B> command do not
consider the current locale when comparing strings; they use ASCII
ordering.
</DL></DL>
@@ -14822,6 +14825,43 @@ when the <B>-l</B> option is supplied.
The <B>unset</B> builtin treats attempts to unset array subscripts <B>@</B>
and <B>*</B> differently depending on whether the array is indexed or
associative, and differently than in previous versions.
<DT>*<DD>
arithmetic commands ( ((...)) ) and the expressions in an arithmetic for
statement can be expanded more than once
<DT>*<DD>
expressions used as arguments to arithmetic operators in the <B>[[</B>
conditional command can be expanded more than once
<DT>*<DD>
the expressions in substring parameter brace expansion can be
expanded more than once
<DT>*<DD>
the expressions in the $(( ... )) word expansion can be expanded
more than once
<DT>*<DD>
arithmetic expressions used as indexed array subscripts can be
expanded more than once
<DT>*<DD>
<B>test -v</B>, when given an argument of <B>A[@]</B>, where <B>AP is
an existing associative array, will return true if the array has any set
elements.
Bash-5.2 will look for and report on a key named @</B>.
<DT>*<DD>
the ${<I>parameter</I><B>[:]=</B><I>value</I>} word expansion will return
<I>value</I>, before any variable-specific transformations have been
performed (e.g., converting to lowercase).
Bash-5.2 will return the final value assigned to the variable.
<DT>*<DD>
Parsing command substitutions will behave as if extended globbing
(see the description of the
<B>shopt</B>
builtin above)
is enabled, so that parsing a command substitution containing an extglob
pattern (say, as part of a shell function) will not fail.
This assumes the intent is to enable extglob before the command is executed
and word expansions are performed.
It will fail at word expansion time if extglob hasn't been
enabled by the time the command is executed.
</DL></DL>
@@ -14952,6 +14992,7 @@ These restrictions are enforced after any startup files are read.
above),
<B>rbash</B>
turns off any restrictions in the shell spawned to execute the
@@ -14968,7 +15009,7 @@ script.
<DT><I>The Gnu History Library</I>, Brian Fox and Chet Ramey<DD>
<DT><I>Portable Operating System Interface (POSIX) Part 2: Shell and Utilities</I>, IEEE --<DD>
<A HREF="http://pubs.opengroup.org/onlinepubs/9699919799/">http://pubs.opengroup.org/onlinepubs/9699919799/</A>
<DT><A HREF="http://tiswww.case.edu/tichet/bash/POSIX">http://tiswww.case.edu/tichet/bash/POSIX</A> -- a description of posix mode<DD>
<DT><A HREF="http://tiswww.case.edu/tichet/bash/POSIX">http://tiswww.case.edu/tichet/bash/POSIX</A> en a description of posix mode<DD>
<DT><I>sh</I>(1), <I>ksh</I>(1), <I>csh</I>(1)<DD>
<DT><I>emacs</I>(1), <I>vi</I>(1)<DD>
<DT><I>readline</I>(3)<DD>
@@ -15034,7 +15075,7 @@ Chet Ramey, Case Western Reserve University
<H3>BUG REPORTS</H3>
If you find a bug in
<B>bash,</B>
<B>bash</B>,
you should report it. But first, you should
make sure that it really is a bug, and that it appears in the latest
@@ -15126,7 +15167,7 @@ There may be only one active coprocess at a time.
<HR>
<TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>GNU Bash 5.3<TH ALIGN=CENTER width=33%>2023 August 31<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>GNU Bash 5.3<TH ALIGN=CENTER width=33%>2023 October 6<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<HR>
@@ -15232,7 +15273,7 @@ There may be only one active coprocess at a time.
<DT><A HREF="#lbDI">BUGS</A><DD>
</DL>
<HR>
This document was created by man2html from /usr/local/src/bash/bash-20230907/doc/bash.1.<BR>
Time: 10 September 2023 17:14:39 EDT
This document was created by man2html from /usr/local/src/bash/bash-20231004/doc/bash.1.<BR>
Time: 06 October 2023 16:59:04 EDT
</BODY>
</HTML>
+86 -86
View File
@@ -1,9 +1,9 @@
This is bash.info, produced by makeinfo version 6.8 from bashref.texi.
This text is a brief description of the features that are present in the
Bash shell (version 5.3, 2 October 2023).
Bash shell (version 5.3, 6 October 2023).
This is Edition 5.3, last updated 2 October 2023, of 'The GNU Bash
This is Edition 5.3, last updated 6 October 2023, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.3.
Copyright (C) 1988-2023 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, 2 October 2023). The Bash home page is
Bash shell (version 5.3, 6 October 2023). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.3, last updated 2 October 2023, of 'The GNU Bash
This is Edition 5.3, last updated 6 October 2023, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.3.
Bash contains features that appear in other popular shells, and some
@@ -6071,8 +6071,8 @@ Variables::).
If this variable is not set, Bash acts as if it had the value
$'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS'
If the value is null, no timing information is displayed. A
trailing newline is added when the format string is displayed.
If the value is null, Bash does not display any timing information.
A trailing newline is added when the format string is displayed.
'TMOUT'
If set to a value greater than zero, 'TMOUT' is treated as the
@@ -6924,7 +6924,7 @@ array, and an index of -1 refers to the last element.
Referencing an array variable without a subscript is equivalent to
referencing with a subscript of 0. Any reference to a variable using a
valid subscript is legal, and Bash will create an array if necessary.
valid subscript is valid, and Bash will create an array if necessary.
An array variable is considered set if a subscript has been assigned
a value. The null string is a valid value.
@@ -7732,14 +7732,14 @@ required for bash-5.1 and later versions.
before any variable-specific transformations have been
performed (e.g., converting to lowercase). Bash-5.2 will
return the final value assigned to the variable.
* Parsing command substitutions will behave as if extended glob
(*note The Shopt Builtin::) is enabled, so that parsing a
command substitution containing an extglob pattern (say, as
part of a shell function) will not fail. This assumes the
intent is to enable extglob before the command is executed and
word expansions are performed. It will fail at word expansion
time if extglob hasn't been enabled by the time the command is
executed.
* Parsing command substitutions will behave as if extended
globbing (*note The Shopt Builtin::) is enabled, so that
parsing a command substitution containing an extglob pattern
(say, as part of a shell function) will not fail. This
assumes the intent is to enable extglob before the command is
executed and word expansions are performed. It will fail at
word expansion time if extglob hasn't been enabled by the time
the command is executed.

File: bash.info, Node: Job Control, Next: Command Line Editing, Prev: Bash Features, Up: Top
@@ -12936,77 +12936,77 @@ Node: Special Builtins225846
Node: Shell Variables226822
Node: Bourne Shell Variables227256
Node: Bash Variables229357
Node: Bash Features264413
Node: Invoking Bash265423
Node: Bash Startup Files271459
Node: Interactive Shells276587
Node: What is an Interactive Shell?276995
Node: Is this Shell Interactive?277641
Node: Interactive Shell Behavior278453
Node: Bash Conditional Expressions282079
Node: Shell Arithmetic286989
Node: Aliases289947
Node: Arrays292838
Node: The Directory Stack299469
Node: Directory Stack Builtins300250
Node: Controlling the Prompt304507
Node: The Restricted Shell307469
Node: Bash POSIX Mode310076
Node: Shell Compatibility Mode326330
Node: Job Control334571
Node: Job Control Basics335028
Node: Job Control Builtins340027
Node: Job Control Variables345819
Node: Command Line Editing346972
Node: Introduction and Notation348640
Node: Readline Interaction350260
Node: Readline Bare Essentials351448
Node: Readline Movement Commands353234
Node: Readline Killing Commands354191
Node: Readline Arguments356109
Node: Searching357150
Node: Readline Init File359333
Node: Readline Init File Syntax360591
Node: Conditional Init Constructs384613
Node: Sample Init File388806
Node: Bindable Readline Commands391927
Node: Commands For Moving393128
Node: Commands For History395176
Node: Commands For Text400167
Node: Commands For Killing404142
Node: Numeric Arguments406843
Node: Commands For Completion407979
Node: Keyboard Macros412167
Node: Miscellaneous Commands412852
Node: Readline vi Mode418887
Node: Programmable Completion419791
Node: Programmable Completion Builtins427568
Node: A Programmable Completion Example438685
Node: Using History Interactively443930
Node: Bash History Facilities444611
Node: Bash History Builtins447619
Node: History Interaction452707
Node: Event Designators456517
Node: Word Designators458052
Node: Modifiers459914
Node: Installing Bash461719
Node: Basic Installation462853
Node: Compilers and Options466572
Node: Compiling For Multiple Architectures467310
Node: Installation Names468999
Node: Specifying the System Type471105
Node: Sharing Defaults471819
Node: Operation Controls472489
Node: Optional Features473444
Node: Reporting Bugs484660
Node: Major Differences From The Bourne Shell485991
Node: GNU Free Documentation License502846
Node: Indexes528020
Node: Builtin Index528471
Node: Reserved Word Index535569
Node: Variable Index538014
Node: Function Index555145
Node: Concept Index568863
Node: Bash Features264422
Node: Invoking Bash265432
Node: Bash Startup Files271468
Node: Interactive Shells276596
Node: What is an Interactive Shell?277004
Node: Is this Shell Interactive?277650
Node: Interactive Shell Behavior278462
Node: Bash Conditional Expressions282088
Node: Shell Arithmetic286998
Node: Aliases289956
Node: Arrays292847
Node: The Directory Stack299478
Node: Directory Stack Builtins300259
Node: Controlling the Prompt304516
Node: The Restricted Shell307478
Node: Bash POSIX Mode310085
Node: Shell Compatibility Mode326339
Node: Job Control334584
Node: Job Control Basics335041
Node: Job Control Builtins340040
Node: Job Control Variables345832
Node: Command Line Editing346985
Node: Introduction and Notation348653
Node: Readline Interaction350273
Node: Readline Bare Essentials351461
Node: Readline Movement Commands353247
Node: Readline Killing Commands354204
Node: Readline Arguments356122
Node: Searching357163
Node: Readline Init File359346
Node: Readline Init File Syntax360604
Node: Conditional Init Constructs384626
Node: Sample Init File388819
Node: Bindable Readline Commands391940
Node: Commands For Moving393141
Node: Commands For History395189
Node: Commands For Text400180
Node: Commands For Killing404155
Node: Numeric Arguments406856
Node: Commands For Completion407992
Node: Keyboard Macros412180
Node: Miscellaneous Commands412865
Node: Readline vi Mode418900
Node: Programmable Completion419804
Node: Programmable Completion Builtins427581
Node: A Programmable Completion Example438698
Node: Using History Interactively443943
Node: Bash History Facilities444624
Node: Bash History Builtins447632
Node: History Interaction452720
Node: Event Designators456530
Node: Word Designators458065
Node: Modifiers459927
Node: Installing Bash461732
Node: Basic Installation462866
Node: Compilers and Options466585
Node: Compiling For Multiple Architectures467323
Node: Installation Names469012
Node: Specifying the System Type471118
Node: Sharing Defaults471832
Node: Operation Controls472502
Node: Optional Features473457
Node: Reporting Bugs484673
Node: Major Differences From The Bourne Shell486004
Node: GNU Free Documentation License502859
Node: Indexes528033
Node: Builtin Index528484
Node: Reserved Word Index535582
Node: Variable Index538027
Node: Function Index555158
Node: Concept Index568876

End Tag Table
BIN
View File
Binary file not shown.
+15 -9
View File
@@ -4,9 +4,9 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- This text is a brief description of the features that are present in
the Bash shell (version 5.3, 31 August 2023).
the Bash shell (version 5.3, 6 October 2023).
This is Edition 5.3, last updated 31 August 2023,
This is Edition 5.3, last updated 6 October 2023,
of The GNU Bash Reference Manual,
for Bash, Version 5.3.
@@ -77,10 +77,10 @@ Next: <a href="#Introduction" accesskey="n" rel="next">Introduction</a>, Previou
<span id="Bash-Features-1"></span><h1 class="top">Bash Features</h1>
<p>This text is a brief description of the features that are present in
the Bash shell (version 5.3, 31 August 2023).
the Bash shell (version 5.3, 6 October 2023).
The Bash home page is <a href="http://www.gnu.org/software/bash/">http://www.gnu.org/software/bash/</a>.
</p>
<p>This is Edition 5.3, last updated 31 August 2023,
<p>This is Edition 5.3, last updated 6 October 2023,
of <cite>The GNU Bash Reference Manual</cite>,
for <code>Bash</code>, Version 5.3.
</p>
@@ -4620,6 +4620,11 @@ The <samp>-l</samp> option causes output to be displayed in a format
that may be reused as input.
If no arguments are given, or if only <samp>-l</samp> is supplied,
information about remembered commands is printed.
The <samp>-t</samp>, <samp>-d</samp>, and <samp>-p</samp> options (the options that
act on the <var>name</var> arguments) are mutually exclusive.
Only one will be active.
If more than one is supplied, <samp>-t</samp> has higher priority than
<samp>-p</samp>, and both are higher priority than <samp>-d</samp>.
The return status is zero unless a <var>name</var> is not found or an invalid
option is supplied.
</p>
@@ -7905,7 +7910,7 @@ The value of <var>p</var> determines whether or not the fraction is included.
</p><div class="example">
<pre class="example"><code>$'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS'</code>
</pre></div>
<p>If the value is null, no timing information is displayed.
<p>If the value is null, Bash does not display any timing information.
A trailing newline is added when the format string is displayed.
</p>
</dd>
@@ -8987,7 +8992,7 @@ and an index of -1 refers to the last element.
</p>
<p>Referencing an array variable without a subscript is equivalent to
referencing with a subscript of 0.
Any reference to a variable using a valid subscript is legal, and
Any reference to a variable using a valid subscript is valid, and
Bash will create an array if necessary.
</p>
<p>An array variable is considered set if a subscript has been assigned a
@@ -9530,7 +9535,8 @@ entering <small>POSIX</small> mode, the shell will not execute a function whose
contains one or more slashes.
</li><li> <small>POSIX</small> special builtins are found before shell functions
during command lookup.
during command lookup, including output printed by the <code>type</code>
and <code>command</code> builtins.
</li><li> When printing shell function definitions (e.g., by <code>type</code>), Bash does
not print the <code>function</code> keyword.
@@ -9583,7 +9589,7 @@ command in which the error occurred&quot;).
</li><li> A non-interactive shell exits with an error status if the iteration
variable in a <code>for</code> statement or the selection variable in a
<code>select</code> statement is a readonly variable.
<code>select</code> statement is a readonly variable or has an invalid name.
</li><li> Non-interactive shells exit if <var>filename</var> in <code>.</code> <var>filename</var>
is not found.
@@ -9944,7 +9950,7 @@ Bash-5.2 will look for and report on a key named &lsquo;<samp>@</samp>&rsquo;
<var>value</var>, before any variable-specific transformations have been
performed (e.g., converting to lowercase).
Bash-5.2 will return the final value assigned to the variable.
</li><li> Parsing command substitutions will behave as if extended glob
</li><li> Parsing command substitutions will behave as if extended globbing
(see <a href="#The-Shopt-Builtin">The Shopt Builtin</a>)
is enabled, so that parsing a command substitution containing an extglob
pattern (say, as part of a shell function) will not fail.
+86 -86
View File
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 6.8 from
bashref.texi.
This text is a brief description of the features that are present in the
Bash shell (version 5.3, 2 October 2023).
Bash shell (version 5.3, 6 October 2023).
This is Edition 5.3, last updated 2 October 2023, of 'The GNU Bash
This is Edition 5.3, last updated 6 October 2023, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.3.
Copyright (C) 1988-2023 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, 2 October 2023). The Bash home page is
Bash shell (version 5.3, 6 October 2023). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.3, last updated 2 October 2023, of 'The GNU Bash
This is Edition 5.3, last updated 6 October 2023, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.3.
Bash contains features that appear in other popular shells, and some
@@ -6072,8 +6072,8 @@ Variables::).
If this variable is not set, Bash acts as if it had the value
$'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS'
If the value is null, no timing information is displayed. A
trailing newline is added when the format string is displayed.
If the value is null, Bash does not display any timing information.
A trailing newline is added when the format string is displayed.
'TMOUT'
If set to a value greater than zero, 'TMOUT' is treated as the
@@ -6925,7 +6925,7 @@ array, and an index of -1 refers to the last element.
Referencing an array variable without a subscript is equivalent to
referencing with a subscript of 0. Any reference to a variable using a
valid subscript is legal, and Bash will create an array if necessary.
valid subscript is valid, and Bash will create an array if necessary.
An array variable is considered set if a subscript has been assigned
a value. The null string is a valid value.
@@ -7733,14 +7733,14 @@ required for bash-5.1 and later versions.
before any variable-specific transformations have been
performed (e.g., converting to lowercase). Bash-5.2 will
return the final value assigned to the variable.
* Parsing command substitutions will behave as if extended glob
(*note The Shopt Builtin::) is enabled, so that parsing a
command substitution containing an extglob pattern (say, as
part of a shell function) will not fail. This assumes the
intent is to enable extglob before the command is executed and
word expansions are performed. It will fail at word expansion
time if extglob hasn't been enabled by the time the command is
executed.
* Parsing command substitutions will behave as if extended
globbing (*note The Shopt Builtin::) is enabled, so that
parsing a command substitution containing an extglob pattern
(say, as part of a shell function) will not fail. This
assumes the intent is to enable extglob before the command is
executed and word expansions are performed. It will fail at
word expansion time if extglob hasn't been enabled by the time
the command is executed.

File: bashref.info, Node: Job Control, Next: Command Line Editing, Prev: Bash Features, Up: Top
@@ -12937,77 +12937,77 @@ Node: Special Builtins226020
Node: Shell Variables226999
Node: Bourne Shell Variables227436
Node: Bash Variables229540
Node: Bash Features264599
Node: Invoking Bash265612
Node: Bash Startup Files271651
Node: Interactive Shells276782
Node: What is an Interactive Shell?277193
Node: Is this Shell Interactive?277842
Node: Interactive Shell Behavior278657
Node: Bash Conditional Expressions282286
Node: Shell Arithmetic287199
Node: Aliases290160
Node: Arrays293054
Node: The Directory Stack299688
Node: Directory Stack Builtins300472
Node: Controlling the Prompt304732
Node: The Restricted Shell307697
Node: Bash POSIX Mode310307
Node: Shell Compatibility Mode326564
Node: Job Control334808
Node: Job Control Basics335268
Node: Job Control Builtins340270
Node: Job Control Variables346065
Node: Command Line Editing347221
Node: Introduction and Notation348892
Node: Readline Interaction350515
Node: Readline Bare Essentials351706
Node: Readline Movement Commands353495
Node: Readline Killing Commands354455
Node: Readline Arguments356376
Node: Searching357420
Node: Readline Init File359606
Node: Readline Init File Syntax360867
Node: Conditional Init Constructs384892
Node: Sample Init File389088
Node: Bindable Readline Commands392212
Node: Commands For Moving393416
Node: Commands For History395467
Node: Commands For Text400461
Node: Commands For Killing404439
Node: Numeric Arguments407143
Node: Commands For Completion408282
Node: Keyboard Macros412473
Node: Miscellaneous Commands413161
Node: Readline vi Mode419199
Node: Programmable Completion420106
Node: Programmable Completion Builtins427886
Node: A Programmable Completion Example439006
Node: Using History Interactively444254
Node: Bash History Facilities444938
Node: Bash History Builtins447949
Node: History Interaction453040
Node: Event Designators456853
Node: Word Designators458391
Node: Modifiers460256
Node: Installing Bash462064
Node: Basic Installation463201
Node: Compilers and Options466923
Node: Compiling For Multiple Architectures467664
Node: Installation Names469356
Node: Specifying the System Type471465
Node: Sharing Defaults472182
Node: Operation Controls472855
Node: Optional Features473813
Node: Reporting Bugs485032
Node: Major Differences From The Bourne Shell486366
Node: GNU Free Documentation License503224
Node: Indexes528401
Node: Builtin Index528855
Node: Reserved Word Index535956
Node: Variable Index538404
Node: Function Index555538
Node: Concept Index569259
Node: Bash Features264608
Node: Invoking Bash265621
Node: Bash Startup Files271660
Node: Interactive Shells276791
Node: What is an Interactive Shell?277202
Node: Is this Shell Interactive?277851
Node: Interactive Shell Behavior278666
Node: Bash Conditional Expressions282295
Node: Shell Arithmetic287208
Node: Aliases290169
Node: Arrays293063
Node: The Directory Stack299697
Node: Directory Stack Builtins300481
Node: Controlling the Prompt304741
Node: The Restricted Shell307706
Node: Bash POSIX Mode310316
Node: Shell Compatibility Mode326573
Node: Job Control334821
Node: Job Control Basics335281
Node: Job Control Builtins340283
Node: Job Control Variables346078
Node: Command Line Editing347234
Node: Introduction and Notation348905
Node: Readline Interaction350528
Node: Readline Bare Essentials351719
Node: Readline Movement Commands353508
Node: Readline Killing Commands354468
Node: Readline Arguments356389
Node: Searching357433
Node: Readline Init File359619
Node: Readline Init File Syntax360880
Node: Conditional Init Constructs384905
Node: Sample Init File389101
Node: Bindable Readline Commands392225
Node: Commands For Moving393429
Node: Commands For History395480
Node: Commands For Text400474
Node: Commands For Killing404452
Node: Numeric Arguments407156
Node: Commands For Completion408295
Node: Keyboard Macros412486
Node: Miscellaneous Commands413174
Node: Readline vi Mode419212
Node: Programmable Completion420119
Node: Programmable Completion Builtins427899
Node: A Programmable Completion Example439019
Node: Using History Interactively444267
Node: Bash History Facilities444951
Node: Bash History Builtins447962
Node: History Interaction453053
Node: Event Designators456866
Node: Word Designators458404
Node: Modifiers460269
Node: Installing Bash462077
Node: Basic Installation463214
Node: Compilers and Options466936
Node: Compiling For Multiple Architectures467677
Node: Installation Names469369
Node: Specifying the System Type471478
Node: Sharing Defaults472195
Node: Operation Controls472868
Node: Optional Features473826
Node: Reporting Bugs485045
Node: Major Differences From The Bourne Shell486379
Node: GNU Free Documentation License503237
Node: Indexes528414
Node: Builtin Index528868
Node: Reserved Word Index535969
Node: Variable Index538417
Node: Function Index555551
Node: Concept Index569272

End Tag Table
+17 -17
View File
@@ -1,12 +1,12 @@
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/MacPorts 2021.58693_0) (preloaded format=pdfetex 2021.8.30) 13 SEP 2023 15:40
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/MacPorts 2021.58693_0) (preloaded format=pdfetex 2021.8.30) 6 OCT 2023 16:58
entering extended mode
restricted \write18 enabled.
file:line:error style messages enabled.
%&-line parsing enabled.
**\input /usr/local/src/bash/bash-20230911/doc/bashref.texi \input /usr/local/s
rc/bash/bash-20230911/doc/bashref.texi
(/usr/local/src/bash/bash-20230911/doc/bashref.texi
(/usr/local/src/bash/bash-20230911/doc/texinfo.tex
**\input /usr/local/src/bash/bash-20231004/doc/bashref.texi \input /usr/local/s
rc/bash/bash-20231004/doc/bashref.texi
(/usr/local/src/bash/bash-20231004/doc/bashref.texi
(/usr/local/src/bash/bash-20231004/doc/texinfo.tex
Loading texinfo [version 2015-11-22.14]:
\outerhsize=\dimen16
\outervsize=\dimen17
@@ -162,15 +162,15 @@ This is `epsf.tex' v2.7.4 <14 February 2011>
texinfo.tex: doing @include of version.texi
(/usr/local/src/bash/bash-20230911/doc/version.texi) [1{/opt/local/var/db/texmf
(/usr/local/src/bash/bash-20231004/doc/version.texi) [1{/opt/local/var/db/texmf
/fonts/map/pdftex/updmap/pdftex.map}] [2]
(/usr/local/build/bash/bash-20230911/doc/bashref.toc [-1] [-2] [-3]) [-4]
(/usr/local/build/bash/bash-20230911/doc/bashref.toc)
(/usr/local/build/bash/bash-20230911/doc/bashref.toc) Chapter 1
(/usr/local/build/bash/bash-20231004/doc/bashref.toc [-1] [-2] [-3]) [-4]
(/usr/local/build/bash/bash-20231004/doc/bashref.toc)
(/usr/local/build/bash/bash-20231004/doc/bashref.toc) Chapter 1
\openout0 = `bashref.toc'.
(/usr/local/build/bash/bash-20230911/doc/bashref.aux)
(/usr/local/build/bash/bash-20231004/doc/bashref.aux)
\openout1 = `bashref.aux'.
Chapter 2 [1] [2]
@@ -262,7 +262,7 @@ Overfull \hbox (38.26585pt too wide) in paragraph at lines 5413--5413
[119] [120]
texinfo.tex: doing @include of rluser.texi
(/usr/local/src/bash/bash-20230911/lib/readline/doc/rluser.texi
(/usr/local/src/bash/bash-20231004/lib/readline/doc/rluser.texi
Chapter 8 [121] [122] [123] [124] [125] [126] [127] [128] [129] [130] [131]
[132]
Underfull \hbox (badness 7540) in paragraph at lines 878--884
@@ -312,10 +312,10 @@ gnored[]
texinfo.tex: doing @include of hsuser.texi
(/usr/local/src/bash/bash-20230911/lib/readline/doc/hsuser.texi Chapter 9
(/usr/local/src/bash/bash-20231004/lib/readline/doc/hsuser.texi Chapter 9
[158] [159] [160] [161] [162] [163]) Chapter 10 [164] [165] [166] [167]
[168]
Underfull \hbox (badness 10000) in paragraph at lines 9748--9757
Underfull \hbox (badness 10000) in paragraph at lines 9749--9758
[]@textrm All of the fol-low-ing op-tions ex-cept for `@texttt alt-array-implem
entation[]@textrm '[],
@@ -328,7 +328,7 @@ entation[]@textrm '[],
.etc.
Underfull \hbox (badness 10000) in paragraph at lines 9748--9757
Underfull \hbox (badness 10000) in paragraph at lines 9749--9758
@textrm `@texttt disabled-builtins[]@textrm '[], `@texttt direxpand-default[]@t
extrm '[], `@texttt strict-posix-default[]@textrm '[], and
@@ -344,13 +344,13 @@ extrm '[], `@texttt strict-posix-default[]@textrm '[], and
[178] [179] Appendix C [180]
texinfo.tex: doing @include of fdl.texi
(/usr/local/src/bash/bash-20230911/doc/fdl.texi
(/usr/local/src/bash/bash-20231004/doc/fdl.texi
[181] [182] [183] [184] [185] [186] [187]) Appendix D [188] [189] [190]
[191] [192] [193] [194] [195] [196] [197] )
Here is how much of TeX's memory you used:
4104 strings out of 497086
47614 string characters out of 6206517
142185 words of memory out of 5000000
142179 words of memory out of 5000000
4869 multiletter control sequences out of 15000+600000
34315 words of font info for 116 fonts, out of 8000000 for 9000
51 hyphenation exceptions out of 8191
@@ -372,7 +372,7 @@ texlive/fonts/type1/public/amsfonts/cm/cmtt12.pfb></opt/local/share/texmf-texli
ve/fonts/type1/public/amsfonts/cm/cmtt9.pfb></opt/local/share/texmf-texlive/fon
ts/type1/public/cm-super/sfrm1095.pfb></opt/local/share/texmf-texlive/fonts/typ
e1/public/cm-super/sfrm1440.pfb>
Output written on bashref.pdf (203 pages, 813912 bytes).
Output written on bashref.pdf (203 pages, 813995 bytes).
PDF statistics:
2824 PDF objects out of 2984 (max. 8388607)
2574 compressed objects within 26 object streams
BIN
View File
Binary file not shown.
+3 -3
View File
@@ -7059,7 +7059,7 @@ If this variable is not set, Bash acts as if it had the value
@example
@code{$'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS'}
@end example
If the value is null, no timing information is displayed.
If the value is null, Bash does not display any timing information.
A trailing newline is added when the format string is displayed.
@item TMOUT
@@ -8029,7 +8029,7 @@ and an index of -1 refers to the last element.
Referencing an array variable without a subscript is equivalent to
referencing with a subscript of 0.
Any reference to a variable using a valid subscript is legal, and
Any reference to a variable using a valid subscript is valid, and
Bash will create an array if necessary.
An array variable is considered set if a subscript has been assigned a
@@ -9012,7 +9012,7 @@ the $@{@var{parameter}[:]=@var{value}@} word expansion will return
performed (e.g., converting to lowercase).
Bash-5.2 will return the final value assigned to the variable.
@item
Parsing command substitutions will behave as if extended glob
Parsing command substitutions will behave as if extended globbing
(@pxref{The Shopt Builtin})
is enabled, so that parsing a command substitution containing an extglob
pattern (say, as part of a shell function) will not fail.
+1055 -1038
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -2,10 +2,10 @@
Copyright (C) 1988-2023 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Mon Oct 2 14:52:49 EDT 2023
@set LASTCHANGE Fri Oct 6 16:41:04 EDT 2023
@set EDITION 5.3
@set VERSION 5.3
@set UPDATED 2 October 2023
@set UPDATED 6 October 2023
@set UPDATED-MONTH October 2023
+8 -2
View File
@@ -117,12 +117,13 @@ kvfile (SHELL_VAR *v, int fd, char *delims, char *rs)
int
kv_builtin (WORD_LIST *list)
{
int opt, rval;
int opt, rval, free_delims;
char *array_name, *delims, *rs;
SHELL_VAR *v;
array_name = delims = rs = 0;
rval = EXECUTION_SUCCESS;
free_delims = 0;
reset_internal_getopt ();
while ((opt = internal_getopt (list, "A:s:d:")) != -1)
@@ -163,7 +164,10 @@ kv_builtin (WORD_LIST *list)
}
if (delims == 0)
delims = getifs ();
{
delims = getifs ();
free_delims = 1;
}
if (rs == 0)
rs = "\n";
@@ -185,6 +189,8 @@ kv_builtin (WORD_LIST *list)
rval = kvfile (v, 0, delims, rs);
if (free_delims)
free (delims); /* getifs returns allocated memory */
return (rval > 0 ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
}
+7 -18
View File
@@ -2912,8 +2912,11 @@ execute_for_command (FOR_COM *for_command)
#endif
save_line_number = line_number;
line_number = for_command->line; /* for expansion error messages */
if (check_identifier (for_command->name, 1) == 0)
{
line_number = save_line_number;
if (posixly_correct && interactive_shell == 0)
{
last_command_exit_value = EX_BADUSAGE;
@@ -2925,7 +2928,6 @@ execute_for_command (FOR_COM *for_command)
loop_level++; interrupt_execution++; retain_fifos++;
identifier = for_command->name->word;
line_number = for_command->line; /* for expansion error messages */
list = releaser = expand_words_no_vars (for_command->map_list);
begin_unwind_frame ("for");
@@ -3156,13 +3158,8 @@ execute_arith_for_command (ARITH_FOR_COM *arith_for_command)
/* Evaluate the initialization expression. */
expresult = eval_arith_for_expr (arith_for_command->init, &expok);
if (expok == 0)
{
line_number = save_lineno;
return (EXECUTION_FAILURE);
}
while (1)
while (expok)
{
/* Evaluate the test expression. */
line_number = arith_lineno;
@@ -3170,10 +3167,8 @@ execute_arith_for_command (ARITH_FOR_COM *arith_for_command)
line_number = save_lineno;
if (expok == 0)
{
body_status = EXECUTION_FAILURE;
break;
}
break;
REAP ();
if (expresult == 0)
break;
@@ -3201,18 +3196,12 @@ execute_arith_for_command (ARITH_FOR_COM *arith_for_command)
line_number = arith_lineno;
expresult = eval_arith_for_expr (arith_for_command->step, &expok);
line_number = save_lineno;
if (expok == 0)
{
body_status = EXECUTION_FAILURE;
break;
}
}
loop_level--; interrupt_execution--;
line_number = save_lineno;
return (body_status);
return (expok ? body_status : EXECUTION_FAILURE);
}
#endif
+4 -1
View File
@@ -473,6 +473,7 @@ rl_complete (int ignore, int invoking_key)
int
rl_possible_completions (int ignore, int invoking_key)
{
last_completion_failed = 0;
rl_completion_invoking_key = invoking_key;
return (rl_complete_internal ('?'));
}
@@ -2187,7 +2188,9 @@ rl_complete_internal (int what_to_do)
append_to_match (matches[0], delimiter, quote_char, nontrivial_lcd);
break;
}
/*FALLTHROUGH*/
case '%':
do_display = 1;
break;
+3
View File
@@ -810,7 +810,10 @@ _rl_set_insert_mode (int im, int force)
_rl_set_cursor (im, force);
#endif
RL_UNSETSTATE (RL_STATE_OVERWRITE);
rl_insert_mode = im;
if (rl_insert_mode == RL_IM_OVERWRITE)
RL_SETSTATE (RL_STATE_OVERWRITE);
}
/* Toggle overwrite mode. A positive explicit argument selects overwrite
+3 -5
View File
@@ -8608,7 +8608,7 @@ pos_params_assignment (WORD_LIST *list, int itype, int quoted)
static char *
string_transform (int xc, SHELL_VAR *v, char *s)
{
char *ret, flags[MAX_ATTRIBUTES], *t;
char *ret, flags[MAX_ATTRIBUTES];
int i;
if (((xc == 'A' || xc == 'a') && v == 0))
@@ -8632,9 +8632,7 @@ string_transform (int xc, SHELL_VAR *v, char *s)
break;
/* Transformations that modify the variable's value */
case 'E':
t = ansiexpand (s, 0, strlen (s), 0);
ret = dequote_escapes (t);
free (t);
ret = ansicstr (s, strlen (s), 0, 0, 0);
break;
case 'P':
ret = decode_prompt_string (s);
@@ -12174,7 +12172,7 @@ setifs (SHELL_VAR *v)
char *
getifs (void)
{
return ifs_value;
return ifs_value ? savestring (ifs_value) : ifs_value;
}
/* This splits a single word into a WORD LIST on $IFS, but only if the word
+4
View File
@@ -90,3 +90,7 @@ ok1
./arith-for.tests: line 134: ((: i < 4/0: division by 0 (error token is "0")
./arith-for.tests: line 135: ((: i=2/0: division by 0 (error token is "0")
./arith-for.tests: line 137: ((: 7=4 : attempted assignment to non-variable (error token is "=4 ")
./arith-for.tests: line 139: ((: j=: arithmetic syntax error: operand expected (error token is "=")
X
./arith-for.tests: line 141: break: only meaningful in a `for', `while', or `until' loop
Y
+5
View File
@@ -135,3 +135,8 @@ for (( i=2; i < 4/0; 7++ )); do echo whoops1 ; done
for (( i=2/0; i < 4; 7++ )); do echo whoops2 ; done
for (( 7=4 ; 7 > 7; )); do echo whoops3; done
for ((j=;;)); do :; done
echo X
break
echo Y
+112 -112
View File
@@ -6,145 +6,145 @@ unalias: usage: unalias [-a] name [name ...]
./errors.tests: line 33: alias: hoowah: not found
./errors.tests: line 34: unalias: hoowah: not found
./errors.tests: line 37: `1': not a valid identifier
./errors.tests: line 38: `f\1': not a valid identifier
./errors.tests: line 42: `invalid-name': not a valid identifier
./errors.tests: line 44: `f\1': not a valid identifier
./errors.tests: line 47: `1': not a valid identifier
./errors.tests: line 48: `f\1': not a valid identifier
./errors.tests: line 49: `invalid-name': not a valid identifier
./errors.tests: line 51: `1': not a valid identifier
./errors.tests: line 52: `f\1': not a valid identifier
./errors.tests: line 56: `$1': not a valid identifier
./errors.tests: line 41: `f\1': not a valid identifier
./errors.tests: line 45: `invalid-name': not a valid identifier
./errors.tests: line 47: `f\1': not a valid identifier
./errors.tests: line 50: `1': not a valid identifier
./errors.tests: line 51: `f\1': not a valid identifier
./errors.tests: line 52: `invalid-name': not a valid identifier
./errors.tests: line 54: `1': not a valid identifier
./errors.tests: line 55: `f\1': not a valid identifier
./errors.tests: line 59: `$1': not a valid identifier
declare -fr func
./errors.tests: line 73: func: readonly function
./errors.tests: line 76: unset: -x: invalid option
./errors.tests: line 76: func: readonly function
./errors.tests: line 79: unset: -x: invalid option
unset: usage: unset [-f] [-v] [-n] [name ...]
./errors.tests: line 79: unset: func: cannot unset: readonly function
./errors.tests: line 82: declare: func: readonly function
./errors.tests: line 86: declare: -a: invalid option
./errors.tests: line 87: declare: -i: invalid option
./errors.tests: line 91: unset: XPATH: cannot unset: readonly variable
./errors.tests: line 97: unset: cannot simultaneously unset a function and a variable
./errors.tests: line 100: declare: -z: invalid option
./errors.tests: line 82: unset: func: cannot unset: readonly function
./errors.tests: line 85: declare: func: readonly function
./errors.tests: line 89: declare: -a: invalid option
./errors.tests: line 90: declare: -i: invalid option
./errors.tests: line 94: unset: XPATH: cannot unset: readonly variable
./errors.tests: line 100: unset: cannot simultaneously unset a function and a variable
./errors.tests: line 103: declare: -z: invalid option
declare: usage: declare [-aAfFgiIlnrtux] [name[=value] ...] or declare -p [-aAfFilnrtux] [name ...]
./errors.tests: line 102: declare: `-z': not a valid identifier
./errors.tests: line 103: declare: `/bin/sh': not a valid identifier
./errors.tests: line 107: declare: cannot use `-f' to make functions
./errors.tests: line 110: exec: -i: invalid option
./errors.tests: line 105: declare: `-z': not a valid identifier
./errors.tests: line 106: declare: `/bin/sh': not a valid identifier
./errors.tests: line 110: declare: cannot use `-f' to make functions
./errors.tests: line 113: exec: -i: invalid option
exec: usage: exec [-cl] [-a name] [command [argument ...]] [redirection ...]
./errors.tests: line 117: export: XPATH: not a function
./errors.tests: line 120: break: only meaningful in a `for', `while', or `until' loop
./errors.tests: line 121: continue: only meaningful in a `for', `while', or `until' loop
./errors.tests: line 124: shift: label: numeric argument required
./errors.tests: line 129: shift: too many arguments
./errors.tests: line 135: let: expression expected
./errors.tests: line 138: local: can only be used in a function
./errors.tests: line 141: logout: not login shell: use `exit'
./errors.tests: line 144: hash: notthere: not found
./errors.tests: line 147: hash: -v: invalid option
./errors.tests: line 120: export: XPATH: not a function
./errors.tests: line 123: break: only meaningful in a `for', `while', or `until' loop
./errors.tests: line 124: continue: only meaningful in a `for', `while', or `until' loop
./errors.tests: line 127: shift: label: numeric argument required
./errors.tests: line 132: shift: too many arguments
./errors.tests: line 138: let: expression expected
./errors.tests: line 141: local: can only be used in a function
./errors.tests: line 144: logout: not login shell: use `exit'
./errors.tests: line 147: hash: notthere: not found
./errors.tests: line 150: hash: -v: invalid option
hash: usage: hash [-lr] [-p pathname] [-dt] [name ...]
./errors.tests: line 150: hash: -d: option requires an argument
./errors.tests: line 154: hash: hashing disabled
./errors.tests: line 157: export: `AA[4]': not a valid identifier
./errors.tests: line 158: readonly: `AA[4]': not a valid identifier
./errors.tests: line 159: export: `invalid-var=4': not a valid identifier
./errors.tests: line 160: readonly: `invalid-var=4': not a valid identifier
./errors.tests: line 161: export: `invalid-var': not a valid identifier
./errors.tests: line 162: readonly: `invalid-var': not a valid identifier
./errors.tests: line 165: unset: [-2]: bad array subscript
./errors.tests: line 169: AA: readonly variable
./errors.tests: line 173: AA: readonly variable
./errors.tests: line 181: shift: 5: shift count out of range
./errors.tests: line 182: shift: -2: shift count out of range
./errors.tests: line 183: shift: 5: shift count out of range
./errors.tests: line 184: shift: -2: shift count out of range
./errors.tests: line 187: shopt: no_such_option: invalid shell option name
./errors.tests: line 188: shopt: no_such_option: invalid shell option name
./errors.tests: line 189: shopt: no_such_option: invalid option name
./errors.tests: line 192: umask: 09: octal number out of range
./errors.tests: line 193: umask: `:': invalid symbolic mode character
./errors.tests: line 194: umask: `:': invalid symbolic mode operator
./errors.tests: line 197: umask: -i: invalid option
./errors.tests: line 153: hash: -d: option requires an argument
./errors.tests: line 157: hash: hashing disabled
./errors.tests: line 160: export: `AA[4]': not a valid identifier
./errors.tests: line 161: readonly: `AA[4]': not a valid identifier
./errors.tests: line 162: export: `invalid-var=4': not a valid identifier
./errors.tests: line 163: readonly: `invalid-var=4': not a valid identifier
./errors.tests: line 164: export: `invalid-var': not a valid identifier
./errors.tests: line 165: readonly: `invalid-var': not a valid identifier
./errors.tests: line 168: unset: [-2]: bad array subscript
./errors.tests: line 172: AA: readonly variable
./errors.tests: line 176: AA: readonly variable
./errors.tests: line 184: shift: 5: shift count out of range
./errors.tests: line 185: shift: -2: shift count out of range
./errors.tests: line 186: shift: 5: shift count out of range
./errors.tests: line 187: shift: -2: shift count out of range
./errors.tests: line 190: shopt: no_such_option: invalid shell option name
./errors.tests: line 191: shopt: no_such_option: invalid shell option name
./errors.tests: line 192: shopt: no_such_option: invalid option name
./errors.tests: line 195: umask: 09: octal number out of range
./errors.tests: line 196: umask: `:': invalid symbolic mode character
./errors.tests: line 197: umask: `:': invalid symbolic mode operator
./errors.tests: line 200: umask: -i: invalid option
umask: usage: umask [-p] [-S] [mode]
./errors.tests: line 201: umask: `p': invalid symbolic mode character
./errors.tests: line 210: VAR: readonly variable
./errors.tests: line 213: declare: VAR: readonly variable
./errors.tests: line 214: declare: VAR: readonly variable
./errors.tests: line 216: declare: unset: not found
./errors.tests: line 219: VAR: readonly variable
./errors.tests: line 204: umask: `p': invalid symbolic mode character
./errors.tests: line 213: VAR: readonly variable
./errors.tests: line 216: declare: VAR: readonly variable
./errors.tests: line 217: declare: VAR: readonly variable
./errors.tests: line 219: declare: unset: not found
./errors.tests: line 222: VAR: readonly variable
comsub: -c: line 1: syntax error near unexpected token `)'
comsub: -c: line 1: `: $( for z in 1 2 3; do )'
comsub: -c: line 1: syntax error near unexpected token `done'
comsub: -c: line 1: `: $( for z in 1 2 3; done )'
./errors.tests: line 226: cd: HOME not set
./errors.tests: line 227: cd: /tmp/xyz.bash: No such file or directory
./errors.tests: line 229: cd: OLDPWD not set
./errors.tests: line 230: cd: /bin/sh: Not a directory
./errors.tests: line 232: cd: /tmp/cd-notthere: No such file or directory
./errors.tests: line 234: cd: too many arguments
./errors.tests: line 229: cd: HOME not set
./errors.tests: line 230: cd: /tmp/xyz.bash: No such file or directory
./errors.tests: line 232: cd: OLDPWD not set
./errors.tests: line 233: cd: /bin/sh: Not a directory
./errors.tests: line 235: cd: /tmp/cd-notthere: No such file or directory
./errors.tests: line 237: cd: too many arguments
bash: line 1: PWD: readonly variable
1
bash: line 1: OLDPWD: readonly variable
1
./errors.tests: line 241: .: filename argument required
./errors.tests: line 244: .: filename argument required
.: usage: . filename [arguments]
./errors.tests: line 242: source: filename argument required
./errors.tests: line 245: source: filename argument required
source: usage: source filename [arguments]
./errors.tests: line 245: .: -i: invalid option
./errors.tests: line 248: .: -i: invalid option
.: usage: . filename [arguments]
./errors.tests: line 248: set: -q: invalid option
./errors.tests: line 251: set: -q: invalid option
set: usage: set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]
./errors.tests: line 251: enable: sh: not a shell builtin
./errors.tests: line 251: enable: bash: not a shell builtin
./errors.tests: line 254: shopt: cannot set and unset shell options simultaneously
./errors.tests: line 257: read: -x: invalid option
./errors.tests: line 254: enable: sh: not a shell builtin
./errors.tests: line 254: enable: bash: not a shell builtin
./errors.tests: line 257: shopt: cannot set and unset shell options simultaneously
./errors.tests: line 260: read: -x: invalid option
read: usage: read [-Eers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]
./errors.tests: line 260: read: var: invalid timeout specification
./errors.tests: line 263: read: `/bin/sh': not a valid identifier
./errors.tests: line 264: read: `/bin/sh': not a valid identifier
./errors.tests: line 265: read: `invalid-name': not a valid identifier
./errors.tests: line 268: VAR: readonly variable
./errors.tests: line 271: read: XX: invalid file descriptor specification
./errors.tests: line 272: read: 42: invalid file descriptor: Bad file descriptor
./errors.tests: line 275: mapfile: XX: invalid file descriptor specification
./errors.tests: line 276: mapfile: 42: invalid file descriptor: Bad file descriptor
./errors.tests: line 280: mapfile: empty array variable name
./errors.tests: line 281: mapfile: `invalid-var': not a valid identifier
./errors.tests: line 284: readonly: -x: invalid option
./errors.tests: line 263: read: var: invalid timeout specification
./errors.tests: line 266: read: `/bin/sh': not a valid identifier
./errors.tests: line 267: read: `/bin/sh': not a valid identifier
./errors.tests: line 268: read: `invalid-name': not a valid identifier
./errors.tests: line 271: VAR: readonly variable
./errors.tests: line 274: read: XX: invalid file descriptor specification
./errors.tests: line 275: read: 42: invalid file descriptor: Bad file descriptor
./errors.tests: line 278: mapfile: XX: invalid file descriptor specification
./errors.tests: line 279: mapfile: 42: invalid file descriptor: Bad file descriptor
./errors.tests: line 283: mapfile: empty array variable name
./errors.tests: line 284: mapfile: `invalid-var': not a valid identifier
./errors.tests: line 287: readonly: -x: invalid option
readonly: usage: readonly [-aAf] [name[=value] ...] or readonly -p
./errors.tests: line 287: eval: -i: invalid option
./errors.tests: line 290: eval: -i: invalid option
eval: usage: eval [arg ...]
./errors.tests: line 288: command: -i: invalid option
./errors.tests: line 291: command: -i: invalid option
command: usage: command [-pVv] command [arg ...]
./errors.tests: line 291: /bin/sh + 0: arithmetic syntax error: operand expected (error token is "/bin/sh + 0")
./errors.tests: line 292: /bin/sh + 0: arithmetic syntax error: operand expected (error token is "/bin/sh + 0")
./errors.tests: line 295: trap: NOSIG: invalid signal specification
./errors.tests: line 298: trap: -s: invalid option
./errors.tests: line 294: /bin/sh + 0: arithmetic syntax error: operand expected (error token is "/bin/sh + 0")
./errors.tests: line 295: /bin/sh + 0: arithmetic syntax error: operand expected (error token is "/bin/sh + 0")
./errors.tests: line 298: trap: NOSIG: invalid signal specification
./errors.tests: line 301: trap: -s: invalid option
trap: usage: trap [-Plp] [[action] signal_spec ...]
./errors.tests: line 304: return: can only `return' from a function or sourced script
./errors.tests: line 308: break: 0: loop count out of range
./errors.tests: line 312: continue: 0: loop count out of range
./errors.tests: line 317: builtin: -x: invalid option
./errors.tests: line 307: return: can only `return' from a function or sourced script
./errors.tests: line 311: break: 0: loop count out of range
./errors.tests: line 315: continue: 0: loop count out of range
./errors.tests: line 320: builtin: -x: invalid option
builtin: usage: builtin [shell-builtin [arg ...]]
./errors.tests: line 320: builtin: bash: not a shell builtin
./errors.tests: line 324: bg: no job control
./errors.tests: line 325: fg: no job control
./errors.tests: line 323: builtin: bash: not a shell builtin
./errors.tests: line 327: bg: no job control
./errors.tests: line 328: fg: no job control
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
./errors.tests: line 329: kill: -s: option requires an argument
./errors.tests: line 331: kill: S: invalid signal specification
./errors.tests: line 333: kill: `': not a pid or valid job spec
./errors.tests: line 332: kill: -s: option requires an argument
./errors.tests: line 334: kill: S: invalid signal specification
./errors.tests: line 336: kill: `': not a pid or valid job spec
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
./errors.tests: line 337: kill: SIGBAD: invalid signal specification
./errors.tests: line 339: kill: BAD: invalid signal specification
./errors.tests: line 341: kill: @12: arguments must be process or job IDs
./errors.tests: line 344: unset: BASH_LINENO: cannot unset
./errors.tests: line 344: unset: BASH_SOURCE: cannot unset
./errors.tests: line 347: set: trackall: invalid option name
./errors.tests: line 348: set: -q: invalid option
./errors.tests: line 340: kill: SIGBAD: invalid signal specification
./errors.tests: line 342: kill: BAD: invalid signal specification
./errors.tests: line 344: kill: @12: arguments must be process or job IDs
./errors.tests: line 347: unset: BASH_LINENO: cannot unset
./errors.tests: line 347: unset: BASH_SOURCE: cannot unset
./errors.tests: line 350: set: trackall: invalid option name
./errors.tests: line 351: set: -q: invalid option
set: usage: set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]
./errors.tests: line 349: set: -i: invalid option
./errors.tests: line 352: set: -i: invalid option
set: usage: set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]
./errors.tests: line 353: xx: readonly variable
./errors.tests: line 356: xx: readonly variable
1
./errors1.sub: line 14: .: -i: invalid option
.: usage: . filename [arguments]
@@ -277,4 +277,4 @@ sh: line 1: unset: `a-b': not a valid identifier
sh: line 1: /nosuchfile: No such file or directory
sh: line 1: trap: SIGNOSIG: invalid signal specification
after trap
./errors.tests: line 392: `!!': not a valid identifier
./errors.tests: line 395: `!!': not a valid identifier
+4 -1
View File
@@ -34,7 +34,10 @@ alias hoowah
unalias hoowah
# the iteration variable must be a valid identifier
for 1 in a b c; do echo $1; done
for 1 in a b c
do
echo $1
done
for f\1 in a b c ; do echo $f ; done
# in posix mode, it's a fatal error
+2 -1
View File
@@ -632,6 +632,7 @@ bash: line 1: ${x@C}: bad substitution
<
>
<$' \t\n'>
$'\001\001'
declare -r x='ab '\''cd'\'' ef'
set -- 'ab' 'cd ef' '' 'gh'
declare -a A=([0]="ab" [1]="cd ef" [2]="" [3]="gh")
@@ -656,7 +657,7 @@ argv[1] = <^A[0]~$ >
argv[1] = <^A^G^B[0:1]~\$ >
argv[1] = </ bash$ >
argv[1] = <1^J/ bash$ >
./new-exp10.sub: line 149: ${V@}: bad substitution
./new-exp10.sub: line 153: ${V@}: bad substitution
abcxxxdef
abcådef
ḅć
+4
View File
@@ -51,6 +51,10 @@ E=$' \t\n'
printf "<%s>" "${E@E}" ; echo
printf "<%s>" "${E@Q}" ; echo
v=$'\1\1'
printf '%q\n' "${v@E}"
unset -v v
declare x
declare -r x="ab 'cd' ef"
printf "%s" "${x@A}" ; echo
+3
View File
@@ -87,3 +87,6 @@ one
two three four
one
two three four
IFS=[,] var=[abc] rest=[def,ghi]
IFS=[] var=[abc] rest=[def,ghi]
IFS=[ ] var=[ abc] rest=[def,ghi ]
+3
View File
@@ -122,3 +122,6 @@ ${THIS_SH} ./read8.sub
# test behavior of trailing IFS whitespace - POSIX conformance
${THIS_SH} ./read9.sub
# test behavior of read builtin modifying $IFS
${THIS_SH} ./read10.sub
+17
View File
@@ -0,0 +1,17 @@
# the read builtin uses a consistent value of IFS to split the input line
# into fields
IFS=:
INPUT=',:abc:def,ghi'
read -r IFS var rest <<<"$INPUT"
printf 'IFS=[%s] var=[%s] rest=[%s]\n' "$IFS" "$var" "$rest"
IFS=:
INPUT=':abc:def,ghi'
read -r IFS var rest <<<"$INPUT"
printf 'IFS=[%s] var=[%s] rest=[%s]\n' "$IFS" "$var" "$rest"
IFS=:
INPUT=' : abc:def,ghi '
read -r IFS var rest <<<"$INPUT"
printf 'IFS=[%s] var=[%s] rest=[%s]\n' "$IFS" "$var" "$rest"