doc changes for --rcfile; fix isearch undo list incompatibility with bash-5.2; non-inc search preserves undo lists in history entries

This commit is contained in:
Chet Ramey
2024-07-06 12:54:57 -04:00
parent dbff8b786e
commit a91b8b0773
20 changed files with 1048 additions and 1029 deletions
-4
View File
@@ -516,10 +516,6 @@ compat42
single quotes are not special within double-quoted word expansions
compat43
- the shell does not print a warning message if an attempt is made to
use a quoted compound assignment as an argument to declare
(declare -a foo='(1 2)'). Later versions warn that this usage is
deprecated.
- word expansion errors are considered non-fatal errors that cause the
current command to fail, even in posix mode (the default behavior is
to make them fatal errors that cause the shell to exit)
+25
View File
@@ -9734,3 +9734,28 @@ lib/readline/examples/excallback.c,lib/readline/examples/rlptytest.c
execute_cmd.c:
- ADJUST_LINE_NUMBER: encapsulate code that adjusts line_number in
shell functions executed in interactive shells into a macro
7/2
---
doc/bash.1,doc/bashref.texi
- changes to the --rcfile description to avoid the use of `force' and
stay away from the word `replace'
lib/readline/misc.c
- _rl_maybe_replace_line: old rl_maybe_replace_line, now takes an
argument saying whether or not to clear rl_undo_list
- rl_maybe_replace_line: now calls _rl_maybe_replace_line with a 0
argument for backwards compatibility
lib/readline/rlprivate.h
- _rl_maybe_replace_line: extern declaration
lib/readline/search.c
- _rl_nsearch_init,rl_history_search_internal: call _rl_maybe_replace_line
with a 1 argument so these searches can manage rl_undo_list and
restore it appropriately
- rl_history_search_internal: don't set the history offset back to
oldpos if the history search is successful; we want the history offset
to be set to the position of the last matching line, like isearch
+538 -541
View File
File diff suppressed because it is too large Load Diff
+5 -10
View File
@@ -5,14 +5,14 @@
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
.\" Last Change: Mon Jul 1 09:46:16 EDT 2024
.\" Last Change: Tue Jul 2 14:28:46 EDT 2024
.\"
.\" 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 "2024 July 1" "GNU Bash 5.3"
.TH BASH 1 "2024 July 2" "GNU Bash 5.3"
.\"
.ie \n(.g \{\
.ds ' \(aq
@@ -353,7 +353,7 @@ This may be inhibited by using the
option.
The \fB\-\-rcfile\fP \fIfile\fP option will cause
.B bash
to replace \fI\*~/.bashrc\fP with \fIfile\fP.
to use \fIfile\fP instead of \fI\*~/.bashrc\fP.
.PP
When
.B bash
@@ -448,8 +448,8 @@ The
.B \-\-norc
option may be used to inhibit this behavior, and the
.B \-\-rcfile
option will make \fBbash\fP replace \fI\*~/.bashrc\fP with a different file,
but neither
option will make \fBbash\fP use a different file instead of
\fI\*~/.bashrc\fP, but neither
\fIrshd\fP nor \fIsshd\fP generally invoke the shell with those options
or allow them to be specified.
.PP
@@ -12002,11 +12002,6 @@ are not special within double-quoted word expansions
.PD 0
.RS
.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=\*'(1 2)\*'). Later versions warn that this usage is
deprecated
.IP \(bu
word expansion errors are considered non-fatal errors that cause the
current command to fail, even in posix mode
(the default behavior is to make them fatal errors that cause the shell
+67 -79
View File
@@ -3,7 +3,7 @@
</HEAD>
<BODY><TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2024 April 23<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2024 July 2<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<BR><A HREF="#index">Index</A>
@@ -28,31 +28,6 @@
@@ -465,10 +440,10 @@ This may be inhibited by using the
<B>--norc</B>
option.
The <B>--rcfile</B> <I>file</I> option will force
The <B>--rcfile</B> <I>file</I> option will cause
<B>bash</B>
to read and execute commands from <I>file</I> instead of <A HREF="file:~/.bashrc"><I>~/.bashrc</I></A>.
to use <I>file</I> instead of <A HREF="file:~/.bashrc"><I>~/.bashrc</I></A>.
<P>
When
@@ -601,7 +576,8 @@ The
option may be used to inhibit this behavior, and the
<B>--rcfile</B>
option may be used to force another file to be read, but neither
option will make <B>bash</B> use a different file instead of
<A HREF="file:~/.bashrc"><I>~/.bashrc</I></A>, but neither
<I>rshd</I> nor <I>sshd</I> generally invoke the shell with those options
or allow them to be specified.
<P>
@@ -978,8 +954,7 @@ The words between the <B>[[</B> and <B>]]</B> do not undergo word splitting
and pathname expansion.
The shell performs tilde expansion, parameter and
variable expansion, arithmetic expansion, command substitution, process
substitution, and quote removal on those words
(the expansions that would occur if the words were enclosed in double quotes).
substitution, and quote removal on those words.
Conditional operators such as <B>-f</B> must be unquoted to be recognized
as primaries.
<DT><DD>
@@ -2936,17 +2911,21 @@ it is removed from the list of matches.
<DT><B>GLOBSORT</B>
<DD>
Control how the results of pathname expansion are sorted.
The value of this variable specifies the sort criteria and sort order for
the results of pathname expansion.
If this variable is unset or set to the null string, pathname expansion
uses the historical behavior of sorting by name.
<DT><DD>
If set, a valid value begins with an optional <I>+</I>, which is ignored,
or <I>-</I>, which reverses the sort order from ascending to descending,
followed by a sort specifier.
The valid sort specifiers are
<I>name</I>,
<I>numeric</I>,
<I>size</I>,
<I>mtime</I>,
@@ -2958,16 +2937,28 @@ The valid sort specifiers are
and
<I>blocks</I>,
which sort the files on name, file size, modification time, access time,
which sort the files on name, names in numeric rather than lexicographic order,
file size, modification time, access time,
inode change time, and number of blocks, respectively.
If any of the non-name keys compare as equal (e.g., if two files are
the same size), sorting uses the name as a secondary sort key.
For example, a value of <I>-mtime</I> sorts the results in descending
order by modification time (newest first).
<DT><DD>
The <I>numeric</I> specifier treats names consisting solely of digits as
numbers and sorts them using the numeric value (so &quot;2&quot; will sort before
&quot;10&quot;, for example).
When using <I>numeric</I>, names containing non-digits sort after all
the all-digit names and are sorted by name using the traditional behavior.
<DT><DD>
A sort specifier of <I>nosort</I> disables sorting completely; the results
are returned in the order they are read from the file system,.
are returned in the order they are read from the file system,
and any leading <I>+</I> or <I>-</I> is ignored.
If the sort specifier is missing, it defaults to <I>name</I>,
so a value of <I>+</I> is equivalent to the null string,
and a value of <I>-</I> sorts by name in descending order.
Any invalid value restores the historical sorting behavior.
<DT><B>HISTCONTROL</B>
<DD>
@@ -8552,10 +8543,12 @@ The text between the point and mark is referred to as the <I>region</I>.
<DD>
Move to the start of the current line.
This may also be bound to the Home key on some keyboards.
<DT><B>end-of-line (C-e)</B>
<DD>
Move to the end of the line.
This may also be bound to the End key on some keyboards.
<DT><B>forward-char (C-f)</B>
<DD>
@@ -8690,18 +8683,20 @@ using a non-incremental search for a string supplied by the user.
<DD>
Search forward through the history using a non-incremental search for
a string supplied by the user.
<DT><B>history-search-forward</B>
<DD>
Search forward through the history for the string of characters
between the start of the current line and the point.
This is a non-incremental search.
<DT><B>history-search-backward</B>
<DD>
Search backward through the history for the string of characters
between the start of the current line and the point.
This is a non-incremental search.
This may be bound to the Page Up key on some keyboards.
<DT><B>history-search-forward</B>
<DD>
Search forward through the history for the string of characters
between the start of the current line and the point.
This is a non-incremental search.
This may be bound to the Page Down key on some keyboards.
<DT><B>history-substring-search-backward</B>
<DD>
@@ -8896,15 +8891,18 @@ capitalize the previous word, but do not move point.
<DT><B>overwrite-mode</B>
<DD>
Toggle overwrite mode. With an explicit positive numeric argument,
switches to overwrite mode. With an explicit non-positive numeric
argument, switches to insert mode. This command affects only
<B>emacs</B> mode; <B>vi</B> mode does overwrite differently.
Toggle overwrite mode.
With an explicit positive numeric argument, switches to overwrite mode.
With an explicit non-positive numeric argument, switches to insert mode.
This command affects only <B>emacs</B> mode;
<B>vi</B> mode does overwrite differently.
Each call to <I>readline()</I> starts in insert mode.
In overwrite mode, characters bound to <B>self-insert</B> replace
the text at point rather than pushing the text to the right.
Characters bound to <B>backward-delete-char</B> replace the character
before point with a space. By default, this command is unbound.
before point with a space.
By default, this command is unbound,
but may be bound to the Insert key on some keyboards.
</DL>
<A NAME="lbCQ">&nbsp;</A>
@@ -10203,53 +10201,47 @@ No effect; the command does nothing beyond expanding
and performing any specified
redirections.
The return status is zero.
<DT><B>. </B> <I>filename</I> [<I>arguments</I>]<DD>
<DT><B>. </B> [<B>-p</B> <I>path</I>] <I>filename</I> [<I>arguments</I>]<DD>
<DT><B>source</B> <I>filename</I> [<I>arguments</I>]<DD>
<DT><B>source</B> [<B>-p</B> <I>path</I>] <I>filename</I> [<I>arguments</I>]<DD>
Read and execute commands from
The <B>. </B> command (<B>source</B>) reads and execute commands from
<I>filename</I>
in the current
shell environment and return the exit status of the last command
executed from
in the current shell environment and returns the exit status of the
last command executed from
<I>filename</I>.
If
<I>filename</I>
does not contain a slash, filenames in
If <I>filename</I> does not contain a slash, <B>. </B> searchs for it.
If the <B>-p</B> option is supplied, <B>. </B> treats <I>path</I>
as a colon-separated list of directories in which to find <I>filename</I>;
otherwise, <B>. </B> uses the entries in
<FONT SIZE=-1><B>PATH</B>
</FONT>
are used to find the directory containing
<I>filename</I>,
to find the directory containing
<I>filename</I>.
but <I>filename</I> does not need to be executable.
The file searched for in
<FONT SIZE=-1><B>PATH</B>
</FONT>
need not be executable.
<I>filename</I> does not need to be executable.
When <B>bash</B> is not in <I>posix mode</I>, it searches
the current directory if no file is found in
<FONT SIZE=-1><B>PATH</B>.
<FONT SIZE=-1><B>PATH</B>,
</FONT>
but does not search the current directory if <B>-p</B> is supplied.
If the
<B>sourcepath</B>
option to the
<B>shopt</B>
builtin command is turned off, the
<FONT SIZE=-1><B>PATH</B>
builtin command is turned off, <B>. </B> does not search
<FONT SIZE=-1><B>PATH</B>.
</FONT>
is not searched.
If any <I>arguments</I> are supplied, they become the positional
parameters when <I>filename</I> is executed. Otherwise the positional
parameters are unchanged.
parameters when <I>filename</I> is executed.
Otherwise the positional parameters are unchanged.
If the <B>-T</B> option is enabled, <B>.</B> inherits any trap on
<B>DEBUG</B>; if it is not, any <B>DEBUG</B> trap string is saved and
restored around the call to <B>.</B>, and <B>.</B> unsets the
@@ -12498,8 +12490,8 @@ any supplied field width and precision in terms of characters, not bytes.
Arguments to non-string format specifiers are treated as C constants,
except that a leading plus or minus sign is allowed, and if the leading
character is a single or double quote, the value is the ASCII value of
the following character.
character is a single or double quote, the value is the numeric value of
the following character, using the current locale.
<P>
The <I>format</I> is reused as necessary to consume all of the <I>arguments</I>.
@@ -14083,7 +14075,8 @@ If set, the
<FONT SIZE=-1><B>PATH</B>
</FONT>
to find the directory containing the file supplied as an argument.
to find the directory containing the file supplied as an argument when
the <B>-p</B> option is not supplied.
This option is enabled by default.
<DT><B>varredir_close</B>
@@ -15051,11 +15044,6 @@ are not special within double-quoted word expansions
<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>*<DD>
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='(1 2)'). Later versions warn that this usage is
deprecated
<DT>*<DD>
word expansion errors are considered non-fatal errors that cause the
current command to fail, even in posix mode
(the default behavior is to make them fatal errors that cause the shell
@@ -15496,7 +15484,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%>2024 April 23<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>GNU Bash 5.3<TH ALIGN=CENTER width=33%>2024 July 2<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<HR>
@@ -15602,7 +15590,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-20240422/doc/bash.1.<BR>
Time: 23 April 2024 17:29:53 EDT
This document was created by man2html from /usr/local/src/bash/bash-20240701/doc/bash.1.<BR>
Time: 03 July 2024 10:54:15 EDT
</BODY>
</HTML>
+150 -154
View File
@@ -1,9 +1,9 @@
This is bash.info, produced by makeinfo version 7.1 from bashref.texi.
This text is a brief description of the features that are present in the
Bash shell (version 5.3, 12 June 2024).
Bash shell (version 5.3, 2 July 2024).
This is Edition 5.3, last updated 12 June 2024, of The GNU Bash
This is Edition 5.3, last updated 2 July 2024, of The GNU Bash
Reference Manual, for Bash, Version 5.3.
Copyright © 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, 12 June 2024). The Bash home page is
Bash shell (version 5.3, 2 July 2024). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.3, last updated 12 June 2024, of The GNU Bash
This is Edition 5.3, last updated 2 July 2024, of The GNU Bash
Reference Manual, for Bash, Version 5.3.
Bash contains features that appear in other popular shells, and some
@@ -4274,7 +4274,8 @@ standard.
Arguments to non-string format specifiers are treated as C language
constants, except that a leading plus or minus sign is allowed, and
if the leading character is a single or double quote, the value is
the ASCII value of the following character.
the numeric value of the following character, using the current
locale.
The FORMAT is reused as necessary to consume all of the ARGUMENTS.
If the FORMAT requires more ARGUMENTS than are supplied, the extra
@@ -6341,8 +6342,7 @@ Invoked as an interactive non-login shell
When an interactive shell that is not a login shell is started, Bash
reads and executes commands from ~/.bashrc, if that file exists. This
may be inhibited by using the --norc option. The --rcfile FILE
option will force Bash to read and execute commands from FILE instead of
~/.bashrc.
option will cause Bash to use FILE instead of ~/.bashrc.
So, typically, your ~/.bash_profile contains the line
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
@@ -6404,10 +6404,10 @@ remote shell daemon, usually rshd, or the secure shell daemon sshd.
If Bash determines it is being run non-interactively in this fashion, it
reads and executes commands from ~/.bashrc, if that file exists and is
readable. It will not do this if invoked as sh. The --norc option
may be used to inhibit this behavior, and the --rcfile option may be
used to force another file to be read, but neither rshd nor sshd
generally invoke the shell with those options or allow them to be
specified.
may be used to inhibit this behavior, and the --rcfile option will
make Bash use a different file instead of ~/.bashrc, but neither
rshd nor sshd generally invoke the shell with those options or allow
them to be specified.
Invoked with unequal effective and real UID/GIDs
................................................
@@ -7722,10 +7722,6 @@ required for bash-5.1 and later versions.
double-quoted word expansions
compat43
• 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='(1 2)'). Later versions warn
that this usage is deprecated
• word expansion errors are considered non-fatal errors that
cause the current command to fail, even in posix mode (the
default behavior is to make them fatal errors that cause the
@@ -12294,8 +12290,8 @@ D.1 Index of Shell Builtin Commands
(line 69)
* pwd: Bourne Shell Builtins.
(line 226)
* read: Bash Builtins. (line 523)
* readarray: Bash Builtins. (line 629)
* read: Bash Builtins. (line 524)
* readarray: Bash Builtins. (line 630)
* readonly: Bourne Shell Builtins.
(line 236)
* return: Bourne Shell Builtins.
@@ -12304,7 +12300,7 @@ D.1 Index of Shell Builtin Commands
* shift: Bourne Shell Builtins.
(line 276)
* shopt: The Shopt Builtin. (line 9)
* source: Bash Builtins. (line 638)
* source: Bash Builtins. (line 639)
* suspend: Job Control Builtins.
(line 116)
* test: Bourne Shell Builtins.
@@ -12315,12 +12311,12 @@ D.1 Index of Shell Builtin Commands
(line 397)
* true: Bourne Shell Builtins.
(line 459)
* type: Bash Builtins. (line 643)
* typeset: Bash Builtins. (line 681)
* ulimit: Bash Builtins. (line 687)
* type: Bash Builtins. (line 644)
* typeset: Bash Builtins. (line 682)
* ulimit: Bash Builtins. (line 688)
* umask: Bourne Shell Builtins.
(line 464)
* unalias: Bash Builtins. (line 793)
* unalias: Bash Builtins. (line 794)
* unset: Bourne Shell Builtins.
(line 482)
* wait: Job Control Builtins.
@@ -12998,138 +12994,138 @@ D.5 Concept Index

Tag Table:
Node: Top893
Node: Introduction2826
Node: What is Bash?3039
Node: What is a shell?4180
Node: Definitions6759
Node: Basic Shell Features9935
Node: Shell Syntax11155
Node: Shell Operation12182
Node: Quoting13480
Node: Escape Character14793
Node: Single Quotes15291
Node: Double Quotes15640
Node: ANSI-C Quoting16983
Node: Locale Translation18368
Node: Creating Internationalized Scripts19712
Node: Comments23910
Node: Shell Commands24545
Node: Reserved Words25484
Node: Simple Commands26349
Node: Pipelines27008
Node: Lists30071
Node: Compound Commands31943
Node: Looping Constructs32952
Node: Conditional Constructs35496
Node: Command Grouping50317
Node: Coprocesses51804
Node: GNU Parallel54500
Node: Shell Functions55418
Node: Shell Parameters63524
Node: Positional Parameters68057
Node: Special Parameters68992
Node: Shell Expansions72298
Node: Brace Expansion74487
Node: Tilde Expansion77150
Node: Shell Parameter Expansion79916
Node: Command Substitution99023
Node: Arithmetic Expansion102556
Node: Process Substitution103521
Node: Word Splitting104658
Node: Filename Expansion106799
Node: Pattern Matching109895
Node: Quote Removal115128
Node: Redirections115432
Node: Executing Commands125241
Node: Simple Command Expansion125908
Node: Command Search and Execution128019
Node: Command Execution Environment130427
Node: Environment133736
Node: Exit Status135440
Node: Signals137225
Node: Shell Scripts140839
Node: Shell Builtin Commands143931
Node: Bourne Shell Builtins146042
Node: Bash Builtins170812
Node: Modifying Shell Behavior205793
Node: The Set Builtin206135
Node: The Shopt Builtin217650
Node: Special Builtins234437
Node: Shell Variables235426
Node: Bourne Shell Variables235860
Node: Bash Variables238053
Node: Bash Features275218
Node: Invoking Bash276232
Node: Bash Startup Files282631
Node: Interactive Shells287943
Node: What is an Interactive Shell?288351
Node: Is this Shell Interactive?289017
Node: Interactive Shell Behavior289841
Node: Bash Conditional Expressions293595
Node: Shell Arithmetic298769
Node: Aliases301851
Node: Arrays304806
Node: The Directory Stack311605
Node: Directory Stack Builtins312402
Node: Controlling the Prompt316851
Node: The Restricted Shell319989
Node: Bash POSIX Mode322776
Node: Shell Compatibility Mode340287
Node: Job Control349306
Node: Job Control Basics349763
Node: Job Control Builtins354937
Node: Job Control Variables360897
Node: Command Line Editing362074
Node: Introduction and Notation363778
Node: Readline Interaction365422
Node: Readline Bare Essentials366610
Node: Readline Movement Commands368428
Node: Readline Killing Commands369425
Node: Readline Arguments371403
Node: Searching372460
Node: Readline Init File374689
Node: Readline Init File Syntax375971
Node: Conditional Init Constructs400909
Node: Sample Init File405274
Node: Bindable Readline Commands408395
Node: Commands For Moving409620
Node: Commands For History411847
Node: Commands For Text417052
Node: Commands For Killing421186
Node: Numeric Arguments423987
Node: Commands For Completion425139
Node: Keyboard Macros429455
Node: Miscellaneous Commands430156
Node: Readline vi Mode436810
Node: Programmable Completion437762
Node: Programmable Completion Builtins445719
Node: A Programmable Completion Example457285
Node: Using History Interactively462630
Node: Bash History Facilities463311
Node: Bash History Builtins466423
Node: History Interaction471666
Node: Event Designators475991
Node: Word Designators477574
Node: Modifiers479560
Node: Installing Bash481469
Node: Basic Installation482603
Node: Compilers and Options486482
Node: Compiling For Multiple Architectures487232
Node: Installation Names488981
Node: Specifying the System Type491215
Node: Sharing Defaults491961
Node: Operation Controls492675
Node: Optional Features493694
Node: Reporting Bugs505496
Node: Major Differences From The Bourne Shell506845
Node: GNU Free Documentation License526580
Node: Indexes551757
Node: Builtin Index552208
Node: Reserved Word Index559306
Node: Variable Index561751
Node: Function Index578882
Node: Concept Index592738
Node: Top891
Node: Introduction2822
Node: What is Bash?3035
Node: What is a shell?4176
Node: Definitions6755
Node: Basic Shell Features9931
Node: Shell Syntax11151
Node: Shell Operation12178
Node: Quoting13476
Node: Escape Character14789
Node: Single Quotes15287
Node: Double Quotes15636
Node: ANSI-C Quoting16979
Node: Locale Translation18364
Node: Creating Internationalized Scripts19708
Node: Comments23906
Node: Shell Commands24541
Node: Reserved Words25480
Node: Simple Commands26345
Node: Pipelines27004
Node: Lists30067
Node: Compound Commands31939
Node: Looping Constructs32948
Node: Conditional Constructs35492
Node: Command Grouping50313
Node: Coprocesses51800
Node: GNU Parallel54496
Node: Shell Functions55414
Node: Shell Parameters63520
Node: Positional Parameters68053
Node: Special Parameters68988
Node: Shell Expansions72294
Node: Brace Expansion74483
Node: Tilde Expansion77146
Node: Shell Parameter Expansion79912
Node: Command Substitution99019
Node: Arithmetic Expansion102552
Node: Process Substitution103517
Node: Word Splitting104654
Node: Filename Expansion106795
Node: Pattern Matching109891
Node: Quote Removal115124
Node: Redirections115428
Node: Executing Commands125237
Node: Simple Command Expansion125904
Node: Command Search and Execution128015
Node: Command Execution Environment130423
Node: Environment133732
Node: Exit Status135436
Node: Signals137221
Node: Shell Scripts140835
Node: Shell Builtin Commands143927
Node: Bourne Shell Builtins146038
Node: Bash Builtins170808
Node: Modifying Shell Behavior205822
Node: The Set Builtin206164
Node: The Shopt Builtin217679
Node: Special Builtins234466
Node: Shell Variables235455
Node: Bourne Shell Variables235889
Node: Bash Variables238082
Node: Bash Features275247
Node: Invoking Bash276261
Node: Bash Startup Files282660
Node: Interactive Shells287963
Node: What is an Interactive Shell?288371
Node: Is this Shell Interactive?289037
Node: Interactive Shell Behavior289861
Node: Bash Conditional Expressions293615
Node: Shell Arithmetic298789
Node: Aliases301871
Node: Arrays304826
Node: The Directory Stack311625
Node: Directory Stack Builtins312422
Node: Controlling the Prompt316871
Node: The Restricted Shell320009
Node: Bash POSIX Mode322796
Node: Shell Compatibility Mode340307
Node: Job Control349074
Node: Job Control Basics349531
Node: Job Control Builtins354705
Node: Job Control Variables360665
Node: Command Line Editing361842
Node: Introduction and Notation363546
Node: Readline Interaction365190
Node: Readline Bare Essentials366378
Node: Readline Movement Commands368196
Node: Readline Killing Commands369193
Node: Readline Arguments371171
Node: Searching372228
Node: Readline Init File374457
Node: Readline Init File Syntax375739
Node: Conditional Init Constructs400677
Node: Sample Init File405042
Node: Bindable Readline Commands408163
Node: Commands For Moving409388
Node: Commands For History411615
Node: Commands For Text416820
Node: Commands For Killing420954
Node: Numeric Arguments423755
Node: Commands For Completion424907
Node: Keyboard Macros429223
Node: Miscellaneous Commands429924
Node: Readline vi Mode436578
Node: Programmable Completion437530
Node: Programmable Completion Builtins445487
Node: A Programmable Completion Example457053
Node: Using History Interactively462398
Node: Bash History Facilities463079
Node: Bash History Builtins466191
Node: History Interaction471434
Node: Event Designators475759
Node: Word Designators477342
Node: Modifiers479328
Node: Installing Bash481237
Node: Basic Installation482371
Node: Compilers and Options486250
Node: Compiling For Multiple Architectures487000
Node: Installation Names488749
Node: Specifying the System Type490983
Node: Sharing Defaults491729
Node: Operation Controls492443
Node: Optional Features493462
Node: Reporting Bugs505264
Node: Major Differences From The Bourne Shell506613
Node: GNU Free Documentation License526348
Node: Indexes551525
Node: Builtin Index551976
Node: Reserved Word Index559074
Node: Variable Index561519
Node: Function Index578650
Node: Concept Index592506

End Tag Table
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -188,11 +188,11 @@
@xrdef{Interactive Shells-snt}{Section@tie 6.3}
@xrdef{What is an Interactive Shell?-title}{What is an Interactive Shell?}
@xrdef{What is an Interactive Shell?-snt}{Section@tie 6.3.1}
@xrdef{Interactive Shells-pg}{97}
@xrdef{Is this Shell Interactive?-title}{Is this Shell Interactive?}
@xrdef{Is this Shell Interactive?-snt}{Section@tie 6.3.2}
@xrdef{Interactive Shell Behavior-title}{Interactive Shell Behavior}
@xrdef{Interactive Shell Behavior-snt}{Section@tie 6.3.3}
@xrdef{Interactive Shells-pg}{98}
@xrdef{What is an Interactive Shell?-pg}{98}
@xrdef{Is this Shell Interactive?-pg}{98}
@xrdef{Interactive Shell Behavior-pg}{98}
+2 -2
View File
@@ -78,8 +78,8 @@
\entry{login shell}{96}{login shell}
\entry{interactive shell}{96}{interactive shell}
\entry{startup files}{96}{startup files}
\entry{interactive shell}{97}{interactive shell}
\entry{shell, interactive}{97}{shell, interactive}
\entry{interactive shell}{98}{interactive shell}
\entry{shell, interactive}{98}{shell, interactive}
\entry{expressions, conditional}{99}{expressions, conditional}
\entry{arithmetic, shell}{101}{arithmetic, shell}
\entry{shell arithmetic}{101}{shell arithmetic}
+2 -2
View File
@@ -73,7 +73,7 @@
\entry{initialization file, readline}{125}
\entry{installation}{165}
\entry{interaction, readline}{122}
\entry{interactive shell}{96, 97}
\entry{interactive shell}{96, 98}
\entry{internationalization}{7}
\entry{internationalized scripts}{7}
\initial {J}
@@ -125,7 +125,7 @@
\entry{shell function}{19}
\entry{shell script}{47}
\entry{shell variable}{21}
\entry{shell, interactive}{97}
\entry{shell, interactive}{98}
\entry{signal}{4}
\entry{signal handling}{46}
\entry{special builtin}{4, 80}
+62 -41
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, 23 April 2024).
the Bash shell (version 5.3, 2 July 2024).
This is Edition 5.3, last updated 23 April 2024,
This is Edition 5.3, last updated 2 July 2024,
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
<h1 class="top" id="Bash-Features-1"><span>Bash Features<a class="copiable-link" href="#Bash-Features-1"> &para;</a></span></h1>
<p>This text is a brief description of the features that are present in
the Bash shell (version 5.3, 23 April 2024).
the Bash shell (version 5.3, 2 July 2024).
The Bash home page is <a class="url" href="http://www.gnu.org/software/bash/">http://www.gnu.org/software/bash/</a>.
</p>
<p>This is Edition 5.3, last updated 23 April 2024,
<p>This is Edition 5.3, last updated 2 July 2024,
of <cite class="cite">The GNU Bash Reference Manual</cite>,
for <code class="code">Bash</code>, Version 5.3.
</p>
@@ -1482,8 +1482,7 @@ The words between the <code class="code">[[</code> and <code class="code">]]</co
and filename expansion.
The shell performs tilde expansion, parameter and
variable expansion, arithmetic expansion, command substitution, process
substitution, and quote removal on those words
(the expansions that would occur if the words were enclosed in double quotes).
substitution, and quote removal on those words.
Conditional operators such as &lsquo;<samp class="samp">-f</samp>&rsquo; must be unquoted to be recognized
as primaries.
</p>
@@ -4375,18 +4374,24 @@ The return status is zero.
</dd>
<dt><a id="index-_002e"></a><span><code class="code">. <span class="r">(a period)</span></code><a class="copiable-link" href="#index-_002e"> &para;</a></span></dt>
<dd><div class="example">
<pre class="example-preformatted">. <var class="var">filename</var> [<var class="var">arguments</var>]
<pre class="example-preformatted">. [-p <var class="var">path</var>] <var class="var">filename</var> [<var class="var">arguments</var>]
</pre></div>
<p>Read and execute commands from the <var class="var">filename</var> argument in the
current shell context. If <var class="var">filename</var> does not contain a slash,
the <code class="env">PATH</code> variable is used to find <var class="var">filename</var>,
but <var class="var">filename</var> does not need to be executable.
current shell context.
If <var class="var">filename</var> does not contain a slash, <code class="code">.</code> searches for it.
If <samp class="option">-p</samp> is supplied, <code class="code">.</code> treats <var class="var">path</var>
as a colon-separated list of directories in which to find <var class="var">filename</var>;
otherwise, <code class="code">.</code> uses the directories in <code class="env">PATH</code> to find <var class="var">filename</var>.
<var class="var">filename</var> does not need to be executable.
When Bash is not in <small class="sc">POSIX</small> mode, it searches the current directory
if <var class="var">filename</var> is not found in <code class="env">$PATH</code>.
if <var class="var">filename</var> is not found in <code class="env">$PATH</code>,
but does not search the current directory if <samp class="option">-p</samp> is supplied.
If the <code class="code">sourcepath</code> option (see <a class="pxref" href="#The-Shopt-Builtin">The Shopt Builtin</a>) is turned off
<code class="code">.</code> does not search <code class="env">PATH</code>.
If any <var class="var">arguments</var> are supplied, they become the positional
parameters when <var class="var">filename</var> is executed. Otherwise the positional
parameters are unchanged.
parameters when <var class="var">filename</var> is executed.
Otherwise the positional parameters are unchanged.
If the <samp class="option">-T</samp> option is enabled, <code class="code">.</code> inherits any trap on
<code class="code">DEBUG</code>; if it is not, any <code class="code">DEBUG</code> trap string is saved and
restored around the call to <code class="code">.</code>, and <code class="code">.</code> unsets the
@@ -5655,8 +5660,8 @@ any supplied field width and precision in terms of characters, not bytes.
<p>Arguments to non-string format specifiers are treated as C language constants,
except that a leading plus or minus sign is allowed, and if the leading
character is a single or double quote, the value is the ASCII value of
the following character.
character is a single or double quote, the value is the numeric value of
the following character, using the current locale.
</p>
<p>The <var class="var">format</var> is reused as necessary to consume all of the <var class="var">arguments</var>.
If the <var class="var">format</var> requires more <var class="var">arguments</var> than are supplied, the
@@ -5813,7 +5818,7 @@ if the <samp class="option">-u</samp> option is supplied.
</dd>
<dt><a id="index-source"></a><span><code class="code">source</code><a class="copiable-link" href="#index-source"> &para;</a></span></dt>
<dd><div class="example">
<pre class="example-preformatted">source <var class="var">filename</var>
<pre class="example-preformatted">source [-p <var class="var">path</var>] <var class="var">filename</var> [<var class="var">arguments</var>]
</pre></div>
<p>A synonym for <code class="code">.</code> (see <a class="pxref" href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a>).
@@ -6835,7 +6840,8 @@ number of positional parameters.
</dd>
<dt><code class="code">sourcepath</code></dt>
<dd><p>If set, the <code class="code">.</code> (<code class="code">source</code>) builtin uses the value of <code class="env">PATH</code>
to find the directory containing the file supplied as an argument.
to find the directory containing the file supplied as an argument
when the <samp class="option">-p</samp> option is not supplied.
This option is enabled by default.
</p>
</dd>
@@ -7480,20 +7486,31 @@ or &lsquo;<samp class="samp">-</samp>&rsquo;, which reverses the sort order from
followed by a sort specifier.
The valid sort specifiers are
&lsquo;<samp class="samp">name</samp>&rsquo;,
&lsquo;<samp class="samp">numeric</samp>&rsquo;,
&lsquo;<samp class="samp">size</samp>&rsquo;,
&lsquo;<samp class="samp">mtime</samp>&rsquo;,
&lsquo;<samp class="samp">atime</samp>&rsquo;,
&lsquo;<samp class="samp">ctime</samp>&rsquo;,
and
&lsquo;<samp class="samp">blocks</samp>&rsquo;,
which sort the files on name, file size, modification time, access time,
which sort the files on name, names in numeric rather than lexicographic order,
file size, modification time, access time,
inode change time, and number of blocks, respectively.
If any of the non-name keys compare as equal (e.g., if two files are
the same size), sorting uses the name as a secondary sort key.
</p>
<p>For example, a value of <code class="code">-mtime</code> sorts the results in descending
order by modification time (newest first).
</p>
<p>The &lsquo;<samp class="samp">numeric</samp>&rsquo; specifier treats names consisting solely of digits as
numbers and sorts them using the numeric value (so &quot;2&quot; will sort before
&quot;10&quot;, for example).
When using &lsquo;<samp class="samp">numeric</samp>&rsquo;, names containing non-digits sort after all
the all-digit names and are sorted by name using the traditional behavior.
</p>
<p>A sort specifier of &lsquo;<samp class="samp">nosort</samp>&rsquo; disables sorting completely; the results
are returned in the order they are read from the file system,.
are returned in the order they are read from the file system,
and any leading &lsquo;<samp class="samp">-</samp>&rsquo; is ignored.
</p>
<p>If the sort specifier is missing, it defaults to <var class="var">name</var>,
so a value of &lsquo;<samp class="samp">+</samp>&rsquo; is equivalent to the null string,
@@ -8243,8 +8260,9 @@ the file <samp class="file">~/.bash_logout</samp>, if it exists.
<p>When an interactive shell that is not a login shell is started, Bash
reads and executes commands from <samp class="file">~/.bashrc</samp>, if that file exists.
This may be inhibited by using the <samp class="option">--norc</samp> option.
The <samp class="option">--rcfile <var class="var">file</var></samp> option will force Bash to read and
execute commands from <var class="var">file</var> instead of <samp class="file">~/.bashrc</samp>.
The <samp class="option">--rcfile <var class="var">file</var></samp> option will
cause Bash to
use <var class="var">file</var> instead of <samp class="file">~/.bashrc</samp>.
</p>
<p>So, typically, your <samp class="file">~/.bash_profile</samp> contains the line
</p><div class="example">
@@ -8314,8 +8332,10 @@ it reads and executes commands from <samp class="file">~/.bashrc</samp>, if that
file exists and is readable.
It will not do this if invoked as <code class="code">sh</code>.
The <samp class="option">--norc</samp> option may be used to inhibit this behavior, and the
<samp class="option">--rcfile</samp> option may be used to force another file to be read, but
neither <code class="code">rshd</code> nor <code class="code">sshd</code> generally invoke the shell with those
<samp class="option">--rcfile</samp> option
will make Bash use a different file instead of
<samp class="file">~/.bashrc</samp>, but neither
<code class="code">rshd</code> nor <code class="code">sshd</code> generally invoke the shell with those
options or allow them to be specified.
</p>
<h4 class="subsubheading" id="Invoked-with-unequal-effective-and-real-uid_002fgids"><span>Invoked with unequal effective and real <small class="sc">UID/GID</small>s<a class="copiable-link" href="#Invoked-with-unequal-effective-and-real-uid_002fgids"> &para;</a></span></h4>
@@ -9944,11 +9964,7 @@ are not special within double-quoted word expansions
</dd>
<dt><code class="code">compat43</code></dt>
<dd><ul class="itemize mark-bullet">
<li>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=&rsquo;(1 2)&rsquo;). Later versions warn that this usage is
deprecated
</li><li>word expansion errors are considered non-fatal errors that cause the
<li>word expansion errors are considered non-fatal errors that cause the
current command to fail, even in posix mode
(the default behavior is to make them fatal errors that cause the shell
to exit)
@@ -11680,10 +11696,12 @@ Next: <a href="#Commands-For-History" accesskey="n" rel="next">Commands For Mani
<dl class="ftable">
<dt><a id="index-beginning_002dof_002dline-_0028C_002da_0029"></a><span><code class="code">beginning-of-line (C-a)</code><a class="copiable-link" href="#index-beginning_002dof_002dline-_0028C_002da_0029"> &para;</a></span></dt>
<dd><p>Move to the start of the current line.
This may also be bound to the Home key on some keyboards.
</p>
</dd>
<dt><a id="index-end_002dof_002dline-_0028C_002de_0029"></a><span><code class="code">end-of-line (C-e)</code><a class="copiable-link" href="#index-end_002dof_002dline-_0028C_002de_0029"> &para;</a></span></dt>
<dd><p>Move to the end of the line.
This may also be bound to the End key on some keyboards.
</p>
</dd>
<dt><a id="index-forward_002dchar-_0028C_002df_0029"></a><span><code class="code">forward-char (C-f)</code><a class="copiable-link" href="#index-forward_002dchar-_0028C_002df_0029"> &para;</a></span></dt>
@@ -11809,32 +11827,34 @@ for a string supplied by the user.
The search string may match anywhere in a history line.
</p>
</dd>
<dt><a id="index-history_002dsearch_002dforward-_0028_0029"></a><span><code class="code">history-search-forward ()</code><a class="copiable-link" href="#index-history_002dsearch_002dforward-_0028_0029"> &para;</a></span></dt>
<dd><p>Search forward through the history for the string of characters
between the start of the current line and the point.
The search string must match at the beginning of a history line.
This is a non-incremental search.
By default, this command is unbound.
</p>
</dd>
<dt><a id="index-history_002dsearch_002dbackward-_0028_0029"></a><span><code class="code">history-search-backward ()</code><a class="copiable-link" href="#index-history_002dsearch_002dbackward-_0028_0029"> &para;</a></span></dt>
<dd><p>Search backward through the history for the string of characters
between the start of the current line and the point.
The search string must match at the beginning of a history line.
This is a non-incremental search.
By default, this command is unbound.
By default, this command is unbound, but may be bound to the Page Down
key on some keyboards.
</p>
</dd>
<dt><a id="index-history_002dsubstring_002dsearch_002dforward-_0028_0029"></a><span><code class="code">history-substring-search-forward ()</code><a class="copiable-link" href="#index-history_002dsubstring_002dsearch_002dforward-_0028_0029"> &para;</a></span></dt>
<dt><a id="index-history_002dsearch_002dforward-_0028_0029"></a><span><code class="code">history-search-forward ()</code><a class="copiable-link" href="#index-history_002dsearch_002dforward-_0028_0029"> &para;</a></span></dt>
<dd><p>Search forward through the history for the string of characters
between the start of the current line and the point.
The search string must match at the beginning of a history line.
This is a non-incremental search.
By default, this command is unbound, but may be bound to the Page Up
key on some keyboards.
</p>
</dd>
<dt><a id="index-history_002dsubstring_002dsearch_002dbackward-_0028_0029"></a><span><code class="code">history-substring-search-backward ()</code><a class="copiable-link" href="#index-history_002dsubstring_002dsearch_002dbackward-_0028_0029"> &para;</a></span></dt>
<dd><p>Search backward through the history for the string of characters
between the start of the current line and the point.
The search string may match anywhere in a history line.
This is a non-incremental search.
By default, this command is unbound.
</p>
</dd>
<dt><a id="index-history_002dsubstring_002dsearch_002dbackward-_0028_0029"></a><span><code class="code">history-substring-search-backward ()</code><a class="copiable-link" href="#index-history_002dsubstring_002dsearch_002dbackward-_0028_0029"> &para;</a></span></dt>
<dd><p>Search backward through the history for the string of characters
<dt><a id="index-history_002dsubstring_002dsearch_002dforward-_0028_0029"></a><span><code class="code">history-substring-search-forward ()</code><a class="copiable-link" href="#index-history_002dsubstring_002dsearch_002dforward-_0028_0029"> &para;</a></span></dt>
<dd><p>Search forward through the history for the string of characters
between the start of the current line and the point.
The search string may match anywhere in a history line.
This is a non-incremental search.
@@ -11993,7 +12013,8 @@ the text at point rather than pushing the text to the right.
Characters bound to <code class="code">backward-delete-char</code> replace the character
before point with a space.
</p>
<p>By default, this command is unbound.
<p>By default, this command is unbound, but may be bound to the Insert
key on some keyboards.
</p>
</dd>
</dl>
+150 -154
View File
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 7.1 from
bashref.texi.
This text is a brief description of the features that are present in the
Bash shell (version 5.3, 12 June 2024).
Bash shell (version 5.3, 2 July 2024).
This is Edition 5.3, last updated 12 June 2024, of The GNU Bash
This is Edition 5.3, last updated 2 July 2024, of The GNU Bash
Reference Manual, for Bash, Version 5.3.
Copyright © 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, 12 June 2024). The Bash home page is
Bash shell (version 5.3, 2 July 2024). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.3, last updated 12 June 2024, of The GNU Bash
This is Edition 5.3, last updated 2 July 2024, of The GNU Bash
Reference Manual, for Bash, Version 5.3.
Bash contains features that appear in other popular shells, and some
@@ -4275,7 +4275,8 @@ standard.
Arguments to non-string format specifiers are treated as C language
constants, except that a leading plus or minus sign is allowed, and
if the leading character is a single or double quote, the value is
the ASCII value of the following character.
the numeric value of the following character, using the current
locale.
The FORMAT is reused as necessary to consume all of the ARGUMENTS.
If the FORMAT requires more ARGUMENTS than are supplied, the extra
@@ -6342,8 +6343,7 @@ Invoked as an interactive non-login shell
When an interactive shell that is not a login shell is started, Bash
reads and executes commands from ~/.bashrc, if that file exists. This
may be inhibited by using the --norc option. The --rcfile FILE
option will force Bash to read and execute commands from FILE instead of
~/.bashrc.
option will cause Bash to use FILE instead of ~/.bashrc.
So, typically, your ~/.bash_profile contains the line
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
@@ -6405,10 +6405,10 @@ remote shell daemon, usually rshd, or the secure shell daemon sshd.
If Bash determines it is being run non-interactively in this fashion, it
reads and executes commands from ~/.bashrc, if that file exists and is
readable. It will not do this if invoked as sh. The --norc option
may be used to inhibit this behavior, and the --rcfile option may be
used to force another file to be read, but neither rshd nor sshd
generally invoke the shell with those options or allow them to be
specified.
may be used to inhibit this behavior, and the --rcfile option will
make Bash use a different file instead of ~/.bashrc, but neither
rshd nor sshd generally invoke the shell with those options or allow
them to be specified.
Invoked with unequal effective and real UID/GIDs
................................................
@@ -7723,10 +7723,6 @@ required for bash-5.1 and later versions.
double-quoted word expansions
compat43
• 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='(1 2)'). Later versions warn
that this usage is deprecated
• word expansion errors are considered non-fatal errors that
cause the current command to fail, even in posix mode (the
default behavior is to make them fatal errors that cause the
@@ -12295,8 +12291,8 @@ D.1 Index of Shell Builtin Commands
(line 69)
* pwd: Bourne Shell Builtins.
(line 226)
* read: Bash Builtins. (line 523)
* readarray: Bash Builtins. (line 629)
* read: Bash Builtins. (line 524)
* readarray: Bash Builtins. (line 630)
* readonly: Bourne Shell Builtins.
(line 236)
* return: Bourne Shell Builtins.
@@ -12305,7 +12301,7 @@ D.1 Index of Shell Builtin Commands
* shift: Bourne Shell Builtins.
(line 276)
* shopt: The Shopt Builtin. (line 9)
* source: Bash Builtins. (line 638)
* source: Bash Builtins. (line 639)
* suspend: Job Control Builtins.
(line 116)
* test: Bourne Shell Builtins.
@@ -12316,12 +12312,12 @@ D.1 Index of Shell Builtin Commands
(line 397)
* true: Bourne Shell Builtins.
(line 459)
* type: Bash Builtins. (line 643)
* typeset: Bash Builtins. (line 681)
* ulimit: Bash Builtins. (line 687)
* type: Bash Builtins. (line 644)
* typeset: Bash Builtins. (line 682)
* ulimit: Bash Builtins. (line 688)
* umask: Bourne Shell Builtins.
(line 464)
* unalias: Bash Builtins. (line 793)
* unalias: Bash Builtins. (line 794)
* unset: Bourne Shell Builtins.
(line 482)
* wait: Job Control Builtins.
@@ -12999,138 +12995,138 @@ D.5 Concept Index

Tag Table:
Node: Top896
Node: Introduction2832
Node: What is Bash?3048
Node: What is a shell?4192
Node: Definitions6774
Node: Basic Shell Features9953
Node: Shell Syntax11176
Node: Shell Operation12206
Node: Quoting13507
Node: Escape Character14823
Node: Single Quotes15324
Node: Double Quotes15676
Node: ANSI-C Quoting17022
Node: Locale Translation18410
Node: Creating Internationalized Scripts19757
Node: Comments23958
Node: Shell Commands24596
Node: Reserved Words25538
Node: Simple Commands26406
Node: Pipelines27068
Node: Lists30134
Node: Compound Commands32009
Node: Looping Constructs33021
Node: Conditional Constructs35568
Node: Command Grouping50392
Node: Coprocesses51882
Node: GNU Parallel54581
Node: Shell Functions55502
Node: Shell Parameters63611
Node: Positional Parameters68147
Node: Special Parameters69085
Node: Shell Expansions72394
Node: Brace Expansion74586
Node: Tilde Expansion77252
Node: Shell Parameter Expansion80021
Node: Command Substitution99131
Node: Arithmetic Expansion102667
Node: Process Substitution103635
Node: Word Splitting104775
Node: Filename Expansion106919
Node: Pattern Matching110018
Node: Quote Removal115254
Node: Redirections115561
Node: Executing Commands125373
Node: Simple Command Expansion126043
Node: Command Search and Execution128157
Node: Command Execution Environment130568
Node: Environment133880
Node: Exit Status135587
Node: Signals137375
Node: Shell Scripts140992
Node: Shell Builtin Commands144087
Node: Bourne Shell Builtins146201
Node: Bash Builtins170974
Node: Modifying Shell Behavior205958
Node: The Set Builtin206303
Node: The Shopt Builtin217821
Node: Special Builtins234611
Node: Shell Variables235603
Node: Bourne Shell Variables236040
Node: Bash Variables238236
Node: Bash Features275404
Node: Invoking Bash276421
Node: Bash Startup Files282823
Node: Interactive Shells288138
Node: What is an Interactive Shell?288549
Node: Is this Shell Interactive?289218
Node: Interactive Shell Behavior290045
Node: Bash Conditional Expressions293802
Node: Shell Arithmetic298979
Node: Aliases302064
Node: Arrays305022
Node: The Directory Stack311824
Node: Directory Stack Builtins312624
Node: Controlling the Prompt317076
Node: The Restricted Shell320217
Node: Bash POSIX Mode323007
Node: Shell Compatibility Mode340521
Node: Job Control349543
Node: Job Control Basics350003
Node: Job Control Builtins355180
Node: Job Control Variables361143
Node: Command Line Editing362323
Node: Introduction and Notation364030
Node: Readline Interaction365677
Node: Readline Bare Essentials366868
Node: Readline Movement Commands368689
Node: Readline Killing Commands369689
Node: Readline Arguments371670
Node: Searching372730
Node: Readline Init File374962
Node: Readline Init File Syntax376247
Node: Conditional Init Constructs401188
Node: Sample Init File405556
Node: Bindable Readline Commands408680
Node: Commands For Moving409908
Node: Commands For History412138
Node: Commands For Text417346
Node: Commands For Killing421483
Node: Numeric Arguments424287
Node: Commands For Completion425442
Node: Keyboard Macros429761
Node: Miscellaneous Commands430465
Node: Readline vi Mode437122
Node: Programmable Completion438077
Node: Programmable Completion Builtins446037
Node: A Programmable Completion Example457606
Node: Using History Interactively462954
Node: Bash History Facilities463638
Node: Bash History Builtins466753
Node: History Interaction471999
Node: Event Designators476327
Node: Word Designators477913
Node: Modifiers479902
Node: Installing Bash481814
Node: Basic Installation482951
Node: Compilers and Options486833
Node: Compiling For Multiple Architectures487586
Node: Installation Names489338
Node: Specifying the System Type491575
Node: Sharing Defaults492324
Node: Operation Controls493041
Node: Optional Features494063
Node: Reporting Bugs505868
Node: Major Differences From The Bourne Shell507220
Node: GNU Free Documentation License526958
Node: Indexes552138
Node: Builtin Index552592
Node: Reserved Word Index559693
Node: Variable Index562141
Node: Function Index579275
Node: Concept Index593134
Node: Top894
Node: Introduction2828
Node: What is Bash?3044
Node: What is a shell?4188
Node: Definitions6770
Node: Basic Shell Features9949
Node: Shell Syntax11172
Node: Shell Operation12202
Node: Quoting13503
Node: Escape Character14819
Node: Single Quotes15320
Node: Double Quotes15672
Node: ANSI-C Quoting17018
Node: Locale Translation18406
Node: Creating Internationalized Scripts19753
Node: Comments23954
Node: Shell Commands24592
Node: Reserved Words25534
Node: Simple Commands26402
Node: Pipelines27064
Node: Lists30130
Node: Compound Commands32005
Node: Looping Constructs33017
Node: Conditional Constructs35564
Node: Command Grouping50388
Node: Coprocesses51878
Node: GNU Parallel54577
Node: Shell Functions55498
Node: Shell Parameters63607
Node: Positional Parameters68143
Node: Special Parameters69081
Node: Shell Expansions72390
Node: Brace Expansion74582
Node: Tilde Expansion77248
Node: Shell Parameter Expansion80017
Node: Command Substitution99127
Node: Arithmetic Expansion102663
Node: Process Substitution103631
Node: Word Splitting104771
Node: Filename Expansion106915
Node: Pattern Matching110014
Node: Quote Removal115250
Node: Redirections115557
Node: Executing Commands125369
Node: Simple Command Expansion126039
Node: Command Search and Execution128153
Node: Command Execution Environment130564
Node: Environment133876
Node: Exit Status135583
Node: Signals137371
Node: Shell Scripts140988
Node: Shell Builtin Commands144083
Node: Bourne Shell Builtins146197
Node: Bash Builtins170970
Node: Modifying Shell Behavior205987
Node: The Set Builtin206332
Node: The Shopt Builtin217850
Node: Special Builtins234640
Node: Shell Variables235632
Node: Bourne Shell Variables236069
Node: Bash Variables238265
Node: Bash Features275433
Node: Invoking Bash276450
Node: Bash Startup Files282852
Node: Interactive Shells288158
Node: What is an Interactive Shell?288569
Node: Is this Shell Interactive?289238
Node: Interactive Shell Behavior290065
Node: Bash Conditional Expressions293822
Node: Shell Arithmetic298999
Node: Aliases302084
Node: Arrays305042
Node: The Directory Stack311844
Node: Directory Stack Builtins312644
Node: Controlling the Prompt317096
Node: The Restricted Shell320237
Node: Bash POSIX Mode323027
Node: Shell Compatibility Mode340541
Node: Job Control349311
Node: Job Control Basics349771
Node: Job Control Builtins354948
Node: Job Control Variables360911
Node: Command Line Editing362091
Node: Introduction and Notation363798
Node: Readline Interaction365445
Node: Readline Bare Essentials366636
Node: Readline Movement Commands368457
Node: Readline Killing Commands369457
Node: Readline Arguments371438
Node: Searching372498
Node: Readline Init File374730
Node: Readline Init File Syntax376015
Node: Conditional Init Constructs400956
Node: Sample Init File405324
Node: Bindable Readline Commands408448
Node: Commands For Moving409676
Node: Commands For History411906
Node: Commands For Text417114
Node: Commands For Killing421251
Node: Numeric Arguments424055
Node: Commands For Completion425210
Node: Keyboard Macros429529
Node: Miscellaneous Commands430233
Node: Readline vi Mode436890
Node: Programmable Completion437845
Node: Programmable Completion Builtins445805
Node: A Programmable Completion Example457374
Node: Using History Interactively462722
Node: Bash History Facilities463406
Node: Bash History Builtins466521
Node: History Interaction471767
Node: Event Designators476095
Node: Word Designators477681
Node: Modifiers479670
Node: Installing Bash481582
Node: Basic Installation482719
Node: Compilers and Options486601
Node: Compiling For Multiple Architectures487354
Node: Installation Names489106
Node: Specifying the System Type491343
Node: Sharing Defaults492092
Node: Operation Controls492809
Node: Optional Features493831
Node: Reporting Bugs505636
Node: Major Differences From The Bourne Shell506988
Node: GNU Free Documentation License526726
Node: Indexes551906
Node: Builtin Index552360
Node: Reserved Word Index559461
Node: Variable Index561909
Node: Function Index579043
Node: Concept Index592902

End Tag Table
+19 -19
View File
@@ -1,12 +1,12 @@
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/MacPorts 2023.66589_3) (preloaded format=pdfetex 2024.1.2) 12 JUN 2024 15:53
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024/MacPorts 2024.70613_0) (preloaded format=pdfetex 2024.4.9) 3 JUL 2024 10:54
entering extended mode
restricted \write18 enabled.
file:line:error style messages enabled.
%&-line parsing enabled.
**\input /usr/local/src/bash/bash-20240609/doc/bashref.texi \input /usr/local/s
rc/bash/bash-20240609/doc/bashref.texi
(/usr/local/src/bash/bash-20240609/doc/bashref.texi
(/usr/local/src/bash/bash-20240609/doc/texinfo.tex
**\input /usr/local/src/bash/bash-20240701/doc/bashref.texi \input /usr/local/s
rc/bash/bash-20240701/doc/bashref.texi
(/usr/local/src/bash/bash-20240701/doc/bashref.texi
(/usr/local/src/bash/bash-20240701/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-20240609/doc/version.texi) [1{/opt/local/var/db/texmf
(/usr/local/src/bash/bash-20240701/doc/version.texi) [1{/opt/local/var/db/texmf
/fonts/map/pdftex/updmap/pdftex.map}] [2]
(/usr/local/build/bash/bash-20240609/doc/bashref.toc [-1] [-2] [-3]) [-4]
(/usr/local/build/bash/bash-20240609/doc/bashref.toc)
(/usr/local/build/bash/bash-20240609/doc/bashref.toc) Chapter 1
(/usr/local/build/bash/bash-20240701/doc/bashref.toc [-1] [-2] [-3]) [-4]
(/usr/local/build/bash/bash-20240701/doc/bashref.toc)
(/usr/local/build/bash/bash-20240701/doc/bashref.toc) Chapter 1
\openout0 = `bashref.toc'.
(/usr/local/build/bash/bash-20240609/doc/bashref.aux)
(/usr/local/build/bash/bash-20240701/doc/bashref.aux)
\openout1 = `bashref.aux'.
Chapter 2 [1] [2]
@@ -263,7 +263,7 @@ Overfull \hbox (38.26585pt too wide) in paragraph at lines 5447--5447
[119] [120]
texinfo.tex: doing @include of rluser.texi
(/usr/local/src/bash/bash-20240609/lib/readline/doc/rluser.texi
(/usr/local/src/bash/bash-20240701/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 882--888
@@ -313,10 +313,10 @@ gnored[]
texinfo.tex: doing @include of hsuser.texi
(/usr/local/src/bash/bash-20240609/lib/readline/doc/hsuser.texi Chapter 9
(/usr/local/src/bash/bash-20240701/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 9844--9853
Underfull \hbox (badness 10000) in paragraph at lines 9842--9851
[]@textrm All of the fol-low-ing op-tions ex-cept for `@texttt alt-array-implem
entation[]@textrm '[],
@@ -329,7 +329,7 @@ entation[]@textrm '[],
.etc.
Underfull \hbox (badness 10000) in paragraph at lines 9844--9853
Underfull \hbox (badness 10000) in paragraph at lines 9842--9851
@textrm `@texttt disabled-builtins[]@textrm '[], `@texttt direxpand-default[]@t
extrm '[], `@texttt strict-posix-default[]@textrm '[], and
@@ -345,13 +345,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-20240609/doc/fdl.texi
(/usr/local/src/bash/bash-20240701/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:
4105 strings out of 495840
47629 string characters out of 6171739
143252 words of memory out of 5000000
143267 words of memory out of 5000000
5048 multiletter control sequences out of 15000+600000
34315 words of font info for 116 fonts, out of 8000000 for 9000
701 hyphenation exceptions out of 8191
@@ -372,10 +372,10 @@ texmf-texlive/fonts/type1/public/amsfonts/cm/cmtt12.pfb></opt/local/share/texmf
-texlive/fonts/type1/public/amsfonts/cm/cmtt9.pfb></opt/local/share/texmf-texli
ve/fonts/type1/public/cm-super/sfrm1095.pfb></opt/local/share/texmf-texlive/fon
ts/type1/public/cm-super/sfrm1440.pfb>
Output written on bashref.pdf (203 pages, 820685 bytes).
Output written on bashref.pdf (203 pages, 820627 bytes).
PDF statistics:
2835 PDF objects out of 2984 (max. 8388607)
2585 compressed objects within 26 object streams
2836 PDF objects out of 2984 (max. 8388607)
2586 compressed objects within 26 object streams
331 named destinations out of 1000 (max. 500000)
1157 words of extra memory for PDF output out of 10000 (max. 10000000)
BIN
View File
Binary file not shown.
+3 -8
View File
@@ -7370,7 +7370,7 @@ reads and executes commands from @file{~/.bashrc}, if that file exists.
This may be inhibited by using the @option{--norc} option.
The @option{--rcfile @var{file}} option will
cause Bash to
replace @file{~/.bashrc} with @var{file}.
use @var{file} instead of @file{~/.bashrc}.
So, typically, your @file{~/.bash_profile} contains the line
@example
@@ -7443,8 +7443,8 @@ file exists and is readable.
It will not do this if invoked as @code{sh}.
The @option{--norc} option may be used to inhibit this behavior, and the
@option{--rcfile} option
will make Bash replace @file{~/.bashrc} with a different file,
but neither
will make Bash use a different file instead of
@file{~/.bashrc}, but neither
@code{rshd} nor @code{sshd} generally invoke the shell with those
options or allow them to be specified.
@@ -9015,11 +9015,6 @@ are not special within double-quoted word expansions
@item compat43
@itemize @bullet
@item
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='(1 2)'). Later versions warn that this usage is
deprecated
@item
word expansion errors are considered non-fatal errors that cause the
current command to fail, even in posix mode
(the default behavior is to make them fatal errors that cause the shell
+1 -1
View File
@@ -70,7 +70,7 @@
@numchapentry{Bash Features}{6}{Bash Features}{94}
@numsecentry{Invoking Bash}{6.1}{Invoking Bash}{94}
@numsecentry{Bash Startup Files}{6.2}{Bash Startup Files}{96}
@numsecentry{Interactive Shells}{6.3}{Interactive Shells}{97}
@numsecentry{Interactive Shells}{6.3}{Interactive Shells}{98}
@numsubsecentry{What is an Interactive Shell?}{6.3.1}{What is an Interactive Shell?}{98}
@numsubsecentry{Is this Shell Interactive?}{6.3.2}{Is this Shell Interactive?}{98}
@numsubsecentry{Interactive Shell Behavior}{6.3.3}{Interactive Shell Behavior}{98}
+2 -2
View File
@@ -2,10 +2,10 @@
Copyright (C) 1988-2024 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Mon Jul 1 09:45:45 EDT 2024
@set LASTCHANGE Tue Jul 2 14:29:06 EDT 2024
@set EDITION 5.3
@set VERSION 5.3
@set UPDATED 1 July 2024
@set UPDATED 2 July 2024
@set UPDATED-MONTH July 2024
+10 -3
View File
@@ -332,7 +332,7 @@ _rl_free_history_entry (HIST_ENTRY *entry)
/* Perhaps put back the current line if it has changed. */
int
rl_maybe_replace_line (void)
_rl_maybe_replace_line (int clear_undo)
{
HIST_ENTRY *temp;
@@ -350,12 +350,19 @@ rl_maybe_replace_line (void)
if (_rl_saved_line_for_history && (UNDO_LIST *)_rl_saved_line_for_history->data == rl_undo_list)
_rl_saved_line_for_history->data = 0;
/* Do we want to set rl_undo_list = 0 here since we just saved it into
a history entry? */
rl_undo_list = 0;
a history entry? We let the caller decide. */
if (clear_undo)
rl_undo_list = 0;
}
return 0;
}
int
rl_maybe_replace_line (void)
{
return (_rl_maybe_replace_line (0));
}
void
_rl_unsave_line (HIST_ENTRY *entry)
{
+1
View File
@@ -399,6 +399,7 @@ extern void _rl_free_saved_line (HIST_ENTRY *);
extern void _rl_unsave_line (HIST_ENTRY *);
#endif
extern int _rl_free_saved_history_line (void);
extern int _rl_maybe_replace_line (int);
extern void _rl_set_insert_mode (int, int);
+10 -8
View File
@@ -101,7 +101,7 @@ _rl_unsave_saved_search_line (void)
from a history entry. We assume the undo list does not come from a
history entry if we are at the end of the history, entering a new line.
The call to rl_maybe_replace_line() has already ensured that any undo
The call to _rl_maybe_replace_line() has already ensured that any undo
list pointing to a history entry has already been saved back to the
history and set rl_undo_list to NULL. */
@@ -271,8 +271,9 @@ _rl_nsearch_init (int dir, int pchar)
cxt->direction = dir;
cxt->history_pos = cxt->save_line;
/* If the current line has changed, put it back into the history if necessary. */
rl_maybe_replace_line ();
/* If the current line has changed, put it back into the history if necessary
and clear the undo list. */
_rl_maybe_replace_line (1);
_rl_saved_line_for_search = _rl_alloc_saved_line ();
@@ -603,12 +604,15 @@ rl_history_search_internal (int count, int dir)
int ret, oldpos, newcol;
char *t;
/* If the current line has changed, put it back into the history if necessary. */
rl_maybe_replace_line ();
/* If the current line has changed, put it back into the history if necessary
and clear the undo list. */
_rl_maybe_replace_line (1);
_rl_saved_line_for_search = _rl_alloc_saved_line ();
temp = (HIST_ENTRY *)NULL;
oldpos = where_history ();
/* Search COUNT times through the history for a line matching
history_search_string. If history_search_string[0] == '^', the
line must match from the start; otherwise any substring can match.
@@ -623,10 +627,8 @@ rl_history_search_internal (int count, int dir)
/* Get the history entry we found. */
_rl_history_search_pos = ret;
oldpos = where_history ();
history_set_pos (_rl_history_search_pos);
temp = current_history (); /* will never be NULL after successful search */
history_set_pos (oldpos);
/* Don't find multiple instances of the same line. */
if (prev_line_found && STREQ (prev_line_found, temp->line))
@@ -635,7 +637,7 @@ rl_history_search_internal (int count, int dir)
count--;
}
/* If we didn't find anything at all, return. */
/* If we didn't find anything at all, return without changing history offset */
if (temp == 0)
{
_rl_unsave_saved_search_line ();