new BASH_MONOSECONDS, BASH_TRAPSIG variables; make checkwinsize work in subshells of interactive shells; fix for declare -f and function names containing `='

This commit is contained in:
Chet Ramey
2023-06-20 10:10:11 -04:00
parent b91488b51c
commit fc29a02404
24 changed files with 10412 additions and 10148 deletions
+34
View File
@@ -6677,3 +6677,37 @@ execute_cmd.c
doc/bash.1,doc/bashref.texi
- TIMEFORMAT: document that the max precision is now 6
From https://savannah.gnu.org/support/?110343
6/16
----
variables.c
- get_monoseconds: use clock_gettime to return the value of the
system's monotonic clock, if available
- BASH_MONOSECONDS: a new dynamic variable that returns the value of
get_monoseconds
From a suggestion by William Kennington <wak@google.com>
doc/bash.1,doc/bashref.texi
- BASH_MONOSECONDS: document
trap.c
- save_bash_trapsig,set_bash_trapsig,restore_bash_trapsig: functions
to manage value of BASH_TRAPSIG
- run_pending_traps: save and restore the value of BASH_TRAPSIG; set
it to the numeric signal number of the trap being run while it's
executing
From a feature request by Eric Marceau <ericmarceau@rogers.com>
- _run_trap_internal,run_exit_trap: save and restore BASH_TRAPSIG;
make sure it's set appropriately
builtins/declare.def
- declare_internal: if declare is supplied -f and an argument that
looks like an assignment statement, fail only if there is not a
function with that name already defined.
From a report from Emanuele Torre <torreemanuele6@gmail.com>
back in 12/22
jobs.c
- wait_for: make checkwinsize work in subshell commands started from
interactive shells
New feature request by Kerin Millar <kfm@plushkava.net>
+8 -3
View File
@@ -431,9 +431,14 @@ declare_internal (WORD_LIST *list, int local_var)
/* Can't define functions using assignment statements */
if (offset && (flags_on & att_function)) /* declare -f [-rix] foo=bar */
{
builtin_error (_("cannot use `-f' to make functions"));
free (name);
return (EXECUTION_FAILURE);
if (var = find_function (name))
offset = 0;
else
{
builtin_error (_("cannot use `-f' to make functions"));
free (name);
return (EXECUTION_FAILURE);
}
}
/* There should be a way, however, to let people look at a particular
+3
View File
@@ -580,6 +580,9 @@
/* Define if you have the chown function. */
#undef HAVE_CHOWN
/* Define if you have the clock_gettime function. */
#undef HAVE_CLOCK_GETTIME
/* Define if you have the confstr function. */
#undef HAVE_CONFSTR
Vendored
+7 -1
View File
@@ -1,5 +1,5 @@
#! /bin/sh
# From configure.ac for Bash 5.2, version 5.053.
# From configure.ac for Bash 5.3, version 5.054.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for bash 5.3-devel.
#
@@ -15041,6 +15041,12 @@ if test "x$ac_cv_func_bzero" = xyes
then :
printf "%s\n" "#define HAVE_BZERO 1" >>confdefs.h
fi
ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
if test "x$ac_cv_func_clock_gettime" = xyes
then :
printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
fi
ac_fn_c_check_func "$LINENO" "confstr" "ac_cv_func_confstr"
if test "x$ac_cv_func_confstr" = xyes
+2 -2
View File
@@ -21,7 +21,7 @@ dnl Process this file with autoconf to produce a configure script.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
AC_REVISION([for Bash 5.2, version 5.053])dnl
AC_REVISION([for Bash 5.3, version 5.054])dnl
define(bashvers, 5.3)
define(relstatus, devel)
@@ -848,7 +848,7 @@ AC_CHECK_FUNCS(dup2 eaccess fcntl getdtablesize getentropy getgroups \
AC_REPLACE_FUNCS(rename)
dnl checks for c library functions
AC_CHECK_FUNCS(bcopy bzero confstr faccessat fnmatch \
AC_CHECK_FUNCS(bcopy bzero clock_gettime confstr faccessat fnmatch \
getaddrinfo gethostbyname getservbyname getservent inet_aton \
imaxdiv memmove pathconf putenv raise random regcomp regexec \
setenv setlinebuf setlocale setvbuf siginterrupt strchr \
+2624 -2613
View File
File diff suppressed because it is too large Load Diff
+19 -2
View File
@@ -5,12 +5,12 @@
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
.\" Last Change: Thu Jun 15 18:11:33 EDT 2023
.\" Last Change: Fri Jun 16 11:36:28 EDT 2023
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH BASH 1 "2023 June 15" "GNU Bash 5.3"
.TH BASH 1 "2023 June 16" "GNU Bash 5.3"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -1657,6 +1657,15 @@ matching the entire regular expression.
The element with index \fIn\fP is the portion of the
string matching the \fIn\fPth parenthesized subexpression.
.TP
.B BASH_MONOSECONDS
Each time this variable is referenced, it expands to the value returned
by the system's monotonic clock, if one is available.
If there is no monotonic clock, this is equivalent to \fBEPOCHSECONDS\fP.
If
.B BASH_MONOSECONDS
is unset, it loses its special properties, even if it is
subsequently reset.
.TP
.B BASH_SOURCE
An array variable whose members are the source filenames
where the corresponding shell function names in the
@@ -1677,6 +1686,14 @@ If
is unset, it loses its special properties, even if it is
subsequently reset.
.TP
.B BASH_TRAPSIG
Set to the signal number corresponding to the trap action being executed
during its execution.
See the description of \fBtrap\fP under
.SM
.B SHELL BUILTIN COMMANDS
below for information about signal numbers and trap execution.
.TP
.B BASH_VERSINFO
A readonly array variable whose members hold version information for
this instance of
+25 -4
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 June 15<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2023 June 16<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<BR><A HREF="#index">Index</A>
@@ -2111,6 +2111,17 @@ The element with index 0 is the portion of the string
matching the entire regular expression.
The element with index <I>n</I> is the portion of the
string matching the <I>n</I>th parenthesized subexpression.
<DT><B>BASH_MONOSECONDS</B>
<DD>
Each time this variable is referenced, it expands to the value returned
by the system's monotonic clock, if one is available.
If there is no monotonic clock, this is equivalent to <B>EPOCHSECONDS</B>.
If
<B>BASH_MONOSECONDS</B>
is unset, it loses its special properties, even if it is
subsequently reset.
<DT><B>BASH_SOURCE</B>
<DD>
@@ -2135,6 +2146,16 @@ If
is unset, it loses its special properties, even if it is
subsequently reset.
<DT><B>BASH_TRAPSIG</B>
<DD>
Set to the signal number corresponding to the trap action being executed
during its execution.
See the description of <B>trap</B> under
<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
</FONT>
below for information about signal numbers and trap execution.
<DT><B>BASH_VERSINFO</B>
<DD>
@@ -15009,7 +15030,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 June 15<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>GNU Bash 5.3<TH ALIGN=CENTER width=33%>2023 June 16<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<HR>
@@ -15115,7 +15136,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-20230614/doc/bash.1.<BR>
Time: 15 June 2023 18:17:34 EDT
This document was created by man2html from /usr/local/src/bash/bash-20230616/doc/bash.1.<BR>
Time: 16 June 2023 12:13:33 EDT
</BODY>
</HTML>
+174 -159
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, 15 June 2023).
Bash shell (version 5.3, 16 June 2023).
This is Edition 5.3, last updated 15 June 2023, of 'The GNU Bash
This is Edition 5.3, last updated 16 June 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, 15 June 2023). The Bash home page is
Bash shell (version 5.3, 16 June 2023). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.3, last updated 15 June 2023, of 'The GNU Bash
This is Edition 5.3, last updated 16 June 2023, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.3.
Bash contains features that appear in other popular shells, and some
@@ -5406,6 +5406,13 @@ Variables::).
A colon-separated list of directories in which the shell looks for
dynamically loadable builtins specified by the 'enable' command.
'BASH_MONOSECONDS'
Each time this variable is referenced, it expands to the value
returned by the system's monotonic clock, if one is available. If
there is no monotonic clock, this is equivalent to 'EPOCHSECONDS'.
If 'BASH_MONOSECONDS' is unset, it loses its special properties,
even if it is subsequently reset.
'BASH_REMATCH'
An array variable whose members are assigned by the '=~' binary
operator to the '[[' conditional command (*note Conditional
@@ -5427,6 +5434,12 @@ Variables::).
value is 0. If 'BASH_SUBSHELL' is unset, it loses its special
properties, even if it is subsequently reset.
'BASH_TRAPSIG'
Set to the signal number corresponding to the trap action being
executed during its execution. See the description of 'trap'
(*note Bourne Shell Builtins::) for information about signal
numbers and trap execution.
'BASH_VERSINFO'
A readonly array variable (*note Arrays::) whose members hold
version information for this instance of Bash. The values assigned
@@ -12193,12 +12206,14 @@ D.3 Parameter and Variable Index
* BASH_EXECUTION_STRING: Bash Variables. (line 122)
* BASH_LINENO: Bash Variables. (line 125)
* BASH_LOADABLES_PATH: Bash Variables. (line 133)
* BASH_REMATCH: Bash Variables. (line 137)
* BASH_SOURCE: Bash Variables. (line 145)
* BASH_SUBSHELL: Bash Variables. (line 152)
* BASH_VERSINFO: Bash Variables. (line 158)
* BASH_VERSION: Bash Variables. (line 181)
* BASH_XTRACEFD: Bash Variables. (line 184)
* BASH_MONOSECONDS: Bash Variables. (line 137)
* BASH_REMATCH: Bash Variables. (line 144)
* BASH_SOURCE: Bash Variables. (line 152)
* BASH_SUBSHELL: Bash Variables. (line 159)
* BASH_TRAPSIG: Bash Variables. (line 165)
* BASH_VERSINFO: Bash Variables. (line 171)
* BASH_VERSION: Bash Variables. (line 194)
* BASH_XTRACEFD: Bash Variables. (line 197)
* bell-style: Readline Init File Syntax.
(line 64)
* bind-tty-special-chars: Readline Init File Syntax.
@@ -12207,12 +12222,12 @@ D.3 Parameter and Variable Index
(line 76)
* CDPATH: Bourne Shell Variables.
(line 9)
* CHILD_MAX: Bash Variables. (line 195)
* CHILD_MAX: Bash Variables. (line 208)
* colored-completion-prefix: Readline Init File Syntax.
(line 81)
* colored-stats: Readline Init File Syntax.
(line 91)
* COLUMNS: Bash Variables. (line 202)
* COLUMNS: Bash Variables. (line 215)
* comment-begin: Readline Init File Syntax.
(line 97)
* completion-display-width: Readline Init File Syntax.
@@ -12225,25 +12240,25 @@ D.3 Parameter and Variable Index
(line 120)
* completion-query-items: Readline Init File Syntax.
(line 127)
* COMPREPLY: Bash Variables. (line 254)
* COMP_CWORD: Bash Variables. (line 208)
* COMP_KEY: Bash Variables. (line 237)
* COMP_LINE: Bash Variables. (line 214)
* COMP_POINT: Bash Variables. (line 219)
* COMP_TYPE: Bash Variables. (line 227)
* COMP_WORDBREAKS: Bash Variables. (line 241)
* COMP_WORDS: Bash Variables. (line 247)
* COMPREPLY: Bash Variables. (line 267)
* COMP_CWORD: Bash Variables. (line 221)
* COMP_KEY: Bash Variables. (line 250)
* COMP_LINE: Bash Variables. (line 227)
* COMP_POINT: Bash Variables. (line 232)
* COMP_TYPE: Bash Variables. (line 240)
* COMP_WORDBREAKS: Bash Variables. (line 254)
* COMP_WORDS: Bash Variables. (line 260)
* convert-meta: Readline Init File Syntax.
(line 138)
* COPROC: Bash Variables. (line 260)
* DIRSTACK: Bash Variables. (line 264)
* COPROC: Bash Variables. (line 273)
* DIRSTACK: Bash Variables. (line 277)
* disable-completion: Readline Init File Syntax.
(line 148)
* echo-control-characters: Readline Init File Syntax.
(line 153)
* editing-mode: Readline Init File Syntax.
(line 158)
* EMACS: Bash Variables. (line 274)
* EMACS: Bash Variables. (line 287)
* emacs-mode-string: Readline Init File Syntax.
(line 164)
* enable-active-region: Readline Init File Syntax.
@@ -12252,70 +12267,70 @@ D.3 Parameter and Variable Index
(line 187)
* enable-keypad: Readline Init File Syntax.
(line 196)
* ENV: Bash Variables. (line 279)
* EPOCHREALTIME: Bash Variables. (line 284)
* EPOCHSECONDS: Bash Variables. (line 292)
* EUID: Bash Variables. (line 299)
* EXECIGNORE: Bash Variables. (line 303)
* ENV: Bash Variables. (line 292)
* EPOCHREALTIME: Bash Variables. (line 297)
* EPOCHSECONDS: Bash Variables. (line 305)
* EUID: Bash Variables. (line 312)
* EXECIGNORE: Bash Variables. (line 316)
* expand-tilde: Readline Init File Syntax.
(line 207)
* FCEDIT: Bash Variables. (line 316)
* FIGNORE: Bash Variables. (line 320)
* FUNCNAME: Bash Variables. (line 326)
* FUNCNEST: Bash Variables. (line 343)
* GLOBIGNORE: Bash Variables. (line 348)
* GLOBSORT: Bash Variables. (line 355)
* GROUPS: Bash Variables. (line 381)
* histchars: Bash Variables. (line 387)
* HISTCMD: Bash Variables. (line 402)
* HISTCONTROL: Bash Variables. (line 408)
* HISTFILE: Bash Variables. (line 424)
* HISTFILESIZE: Bash Variables. (line 428)
* HISTIGNORE: Bash Variables. (line 439)
* FCEDIT: Bash Variables. (line 329)
* FIGNORE: Bash Variables. (line 333)
* FUNCNAME: Bash Variables. (line 339)
* FUNCNEST: Bash Variables. (line 356)
* GLOBIGNORE: Bash Variables. (line 361)
* GLOBSORT: Bash Variables. (line 368)
* GROUPS: Bash Variables. (line 394)
* histchars: Bash Variables. (line 400)
* HISTCMD: Bash Variables. (line 415)
* HISTCONTROL: Bash Variables. (line 421)
* HISTFILE: Bash Variables. (line 437)
* HISTFILESIZE: Bash Variables. (line 441)
* HISTIGNORE: Bash Variables. (line 452)
* history-preserve-point: Readline Init File Syntax.
(line 211)
* history-size: Readline Init File Syntax.
(line 217)
* HISTSIZE: Bash Variables. (line 459)
* HISTTIMEFORMAT: Bash Variables. (line 466)
* HISTSIZE: Bash Variables. (line 472)
* HISTTIMEFORMAT: Bash Variables. (line 479)
* HOME: Bourne Shell Variables.
(line 13)
* horizontal-scroll-mode: Readline Init File Syntax.
(line 226)
* HOSTFILE: Bash Variables. (line 474)
* HOSTNAME: Bash Variables. (line 485)
* HOSTTYPE: Bash Variables. (line 488)
* HOSTFILE: Bash Variables. (line 487)
* HOSTNAME: Bash Variables. (line 498)
* HOSTTYPE: Bash Variables. (line 501)
* IFS: Bourne Shell Variables.
(line 18)
* IGNOREEOF: Bash Variables. (line 491)
* IGNOREEOF: Bash Variables. (line 504)
* input-meta: Readline Init File Syntax.
(line 235)
* INPUTRC: Bash Variables. (line 501)
* INSIDE_EMACS: Bash Variables. (line 505)
* INPUTRC: Bash Variables. (line 514)
* INSIDE_EMACS: Bash Variables. (line 518)
* isearch-terminators: Readline Init File Syntax.
(line 245)
* keymap: Readline Init File Syntax.
(line 252)
* LANG: Creating Internationalized Scripts.
(line 51)
* LANG <1>: Bash Variables. (line 511)
* LC_ALL: Bash Variables. (line 515)
* LC_COLLATE: Bash Variables. (line 519)
* LC_CTYPE: Bash Variables. (line 526)
* LANG <1>: Bash Variables. (line 524)
* LC_ALL: Bash Variables. (line 528)
* LC_COLLATE: Bash Variables. (line 532)
* LC_CTYPE: Bash Variables. (line 539)
* LC_MESSAGES: Creating Internationalized Scripts.
(line 51)
* LC_MESSAGES <1>: Bash Variables. (line 531)
* LC_NUMERIC: Bash Variables. (line 535)
* LC_TIME: Bash Variables. (line 539)
* LINENO: Bash Variables. (line 543)
* LINES: Bash Variables. (line 548)
* MACHTYPE: Bash Variables. (line 554)
* LC_MESSAGES <1>: Bash Variables. (line 544)
* LC_NUMERIC: Bash Variables. (line 548)
* LC_TIME: Bash Variables. (line 552)
* LINENO: Bash Variables. (line 556)
* LINES: Bash Variables. (line 561)
* MACHTYPE: Bash Variables. (line 567)
* MAIL: Bourne Shell Variables.
(line 22)
* MAILCHECK: Bash Variables. (line 558)
* MAILCHECK: Bash Variables. (line 571)
* MAILPATH: Bourne Shell Variables.
(line 27)
* MAPFILE: Bash Variables. (line 566)
* MAPFILE: Bash Variables. (line 579)
* mark-modified-lines: Readline Init File Syntax.
(line 282)
* mark-symlinked-directories: Readline Init File Syntax.
@@ -12326,46 +12341,46 @@ D.3 Parameter and Variable Index
(line 299)
* meta-flag: Readline Init File Syntax.
(line 235)
* OLDPWD: Bash Variables. (line 570)
* OLDPWD: Bash Variables. (line 583)
* OPTARG: Bourne Shell Variables.
(line 34)
* OPTERR: Bash Variables. (line 573)
* OPTERR: Bash Variables. (line 586)
* OPTIND: Bourne Shell Variables.
(line 38)
* OSTYPE: Bash Variables. (line 577)
* OSTYPE: Bash Variables. (line 590)
* output-meta: Readline Init File Syntax.
(line 304)
* page-completions: Readline Init File Syntax.
(line 312)
* PATH: Bourne Shell Variables.
(line 42)
* PIPESTATUS: Bash Variables. (line 580)
* POSIXLY_CORRECT: Bash Variables. (line 585)
* PPID: Bash Variables. (line 595)
* PROMPT_COMMAND: Bash Variables. (line 599)
* PROMPT_DIRTRIM: Bash Variables. (line 605)
* PS0: Bash Variables. (line 611)
* PIPESTATUS: Bash Variables. (line 593)
* POSIXLY_CORRECT: Bash Variables. (line 598)
* PPID: Bash Variables. (line 608)
* PROMPT_COMMAND: Bash Variables. (line 612)
* PROMPT_DIRTRIM: Bash Variables. (line 618)
* PS0: Bash Variables. (line 624)
* PS1: Bourne Shell Variables.
(line 48)
* PS2: Bourne Shell Variables.
(line 53)
* PS3: Bash Variables. (line 616)
* PS4: Bash Variables. (line 621)
* PWD: Bash Variables. (line 629)
* RANDOM: Bash Variables. (line 632)
* READLINE_ARGUMENT: Bash Variables. (line 638)
* READLINE_LINE: Bash Variables. (line 642)
* READLINE_MARK: Bash Variables. (line 646)
* READLINE_POINT: Bash Variables. (line 652)
* REPLY: Bash Variables. (line 656)
* PS3: Bash Variables. (line 629)
* PS4: Bash Variables. (line 634)
* PWD: Bash Variables. (line 642)
* RANDOM: Bash Variables. (line 645)
* READLINE_ARGUMENT: Bash Variables. (line 651)
* READLINE_LINE: Bash Variables. (line 655)
* READLINE_MARK: Bash Variables. (line 659)
* READLINE_POINT: Bash Variables. (line 665)
* REPLY: Bash Variables. (line 669)
* revert-all-at-newline: Readline Init File Syntax.
(line 322)
* search-ignore-case: Readline Init File Syntax.
(line 329)
* SECONDS: Bash Variables. (line 659)
* SHELL: Bash Variables. (line 668)
* SHELLOPTS: Bash Variables. (line 673)
* SHLVL: Bash Variables. (line 682)
* SECONDS: Bash Variables. (line 672)
* SHELL: Bash Variables. (line 681)
* SHELLOPTS: Bash Variables. (line 686)
* SHLVL: Bash Variables. (line 695)
* show-all-if-ambiguous: Readline Init File Syntax.
(line 334)
* show-all-if-unmodified: Readline Init File Syntax.
@@ -12374,15 +12389,15 @@ D.3 Parameter and Variable Index
(line 349)
* skip-completed-text: Readline Init File Syntax.
(line 355)
* SRANDOM: Bash Variables. (line 687)
* SRANDOM: Bash Variables. (line 700)
* TEXTDOMAIN: Creating Internationalized Scripts.
(line 51)
* TEXTDOMAINDIR: Creating Internationalized Scripts.
(line 51)
* TIMEFORMAT: Bash Variables. (line 696)
* TMOUT: Bash Variables. (line 734)
* TMPDIR: Bash Variables. (line 746)
* UID: Bash Variables. (line 750)
* TIMEFORMAT: Bash Variables. (line 709)
* TMOUT: Bash Variables. (line 747)
* TMPDIR: Bash Variables. (line 759)
* UID: Bash Variables. (line 763)
* vi-cmd-mode-string: Readline Init File Syntax.
(line 368)
* vi-ins-mode-string: Readline Init File Syntax.
@@ -12834,77 +12849,77 @@ Node: Special Builtins223181
Node: Shell Variables224157
Node: Bourne Shell Variables224591
Node: Bash Variables226692
Node: Bash Features260752
Node: Invoking Bash261762
Node: Bash Startup Files267772
Node: Interactive Shells272900
Node: What is an Interactive Shell?273308
Node: Is this Shell Interactive?273954
Node: Interactive Shell Behavior274766
Node: Bash Conditional Expressions278392
Node: Shell Arithmetic283031
Node: Aliases285989
Node: Arrays288880
Node: The Directory Stack295440
Node: Directory Stack Builtins296221
Node: Controlling the Prompt300478
Node: The Restricted Shell303440
Node: Bash POSIX Mode306047
Node: Shell Compatibility Mode321837
Node: Job Control330078
Node: Job Control Basics330535
Node: Job Control Builtins335534
Node: Job Control Variables341326
Node: Command Line Editing342479
Node: Introduction and Notation344147
Node: Readline Interaction345767
Node: Readline Bare Essentials346955
Node: Readline Movement Commands348741
Node: Readline Killing Commands349698
Node: Readline Arguments351616
Node: Searching352657
Node: Readline Init File354840
Node: Readline Init File Syntax356098
Node: Conditional Init Constructs379886
Node: Sample Init File384079
Node: Bindable Readline Commands387200
Node: Commands For Moving388401
Node: Commands For History390449
Node: Commands For Text395440
Node: Commands For Killing399086
Node: Numeric Arguments402116
Node: Commands For Completion403252
Node: Keyboard Macros407440
Node: Miscellaneous Commands408125
Node: Readline vi Mode414160
Node: Programmable Completion415064
Node: Programmable Completion Builtins422841
Node: A Programmable Completion Example433958
Node: Using History Interactively439203
Node: Bash History Facilities439884
Node: Bash History Builtins442886
Node: History Interaction447907
Node: Event Designators451524
Node: Word Designators452875
Node: Modifiers454632
Node: Installing Bash456437
Node: Basic Installation457571
Node: Compilers and Options461290
Node: Compiling For Multiple Architectures462028
Node: Installation Names463717
Node: Specifying the System Type465823
Node: Sharing Defaults466537
Node: Operation Controls467207
Node: Optional Features468162
Node: Reporting Bugs479378
Node: Major Differences From The Bourne Shell480709
Node: GNU Free Documentation License497555
Node: Indexes522729
Node: Builtin Index523180
Node: Reserved Word Index530278
Node: Variable Index532723
Node: Function Index549708
Node: Concept Index563489
Node: Bash Features261344
Node: Invoking Bash262354
Node: Bash Startup Files268364
Node: Interactive Shells273492
Node: What is an Interactive Shell?273900
Node: Is this Shell Interactive?274546
Node: Interactive Shell Behavior275358
Node: Bash Conditional Expressions278984
Node: Shell Arithmetic283623
Node: Aliases286581
Node: Arrays289472
Node: The Directory Stack296032
Node: Directory Stack Builtins296813
Node: Controlling the Prompt301070
Node: The Restricted Shell304032
Node: Bash POSIX Mode306639
Node: Shell Compatibility Mode322429
Node: Job Control330670
Node: Job Control Basics331127
Node: Job Control Builtins336126
Node: Job Control Variables341918
Node: Command Line Editing343071
Node: Introduction and Notation344739
Node: Readline Interaction346359
Node: Readline Bare Essentials347547
Node: Readline Movement Commands349333
Node: Readline Killing Commands350290
Node: Readline Arguments352208
Node: Searching353249
Node: Readline Init File355432
Node: Readline Init File Syntax356690
Node: Conditional Init Constructs380478
Node: Sample Init File384671
Node: Bindable Readline Commands387792
Node: Commands For Moving388993
Node: Commands For History391041
Node: Commands For Text396032
Node: Commands For Killing399678
Node: Numeric Arguments402708
Node: Commands For Completion403844
Node: Keyboard Macros408032
Node: Miscellaneous Commands408717
Node: Readline vi Mode414752
Node: Programmable Completion415656
Node: Programmable Completion Builtins423433
Node: A Programmable Completion Example434550
Node: Using History Interactively439795
Node: Bash History Facilities440476
Node: Bash History Builtins443478
Node: History Interaction448499
Node: Event Designators452116
Node: Word Designators453467
Node: Modifiers455224
Node: Installing Bash457029
Node: Basic Installation458163
Node: Compilers and Options461882
Node: Compiling For Multiple Architectures462620
Node: Installation Names464309
Node: Specifying the System Type466415
Node: Sharing Defaults467129
Node: Operation Controls467799
Node: Optional Features468754
Node: Reporting Bugs479970
Node: Major Differences From The Bourne Shell481301
Node: GNU Free Documentation License498147
Node: Indexes523321
Node: Builtin Index523772
Node: Reserved Word Index530870
Node: Variable Index533315
Node: Function Index550446
Node: Concept Index564227

End Tag Table
+6120 -6101
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+23 -4
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, 15 June 2023).
the Bash shell (version 5.3, 16 June 2023).
This is Edition 5.3, last updated 15 June 2023,
This is Edition 5.3, last updated 16 June 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, 15 June 2023).
the Bash shell (version 5.3, 16 June 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 15 June 2023,
<p>This is Edition 5.3, last updated 16 June 2023,
of <cite>The GNU Bash Reference Manual</cite>,
for <code>Bash</code>, Version 5.3.
</p>
@@ -7066,6 +7066,15 @@ dynamically loadable builtins specified by the
<code>enable</code> command.
</p>
</dd>
<dt id='index-BASH_005fMONOSECONDS'><span><code>BASH_MONOSECONDS</code><a href='#index-BASH_005fMONOSECONDS' class='copiable-anchor'> &para;</a></span></dt>
<dd><p>Each time this variable is referenced, it expands to the value returned
by the system&rsquo;s monotonic clock, if one is available.
If there is no monotonic clock, this is equivalent to <code>EPOCHSECONDS</code>.
If <code>BASH_MONOSECONDS</code>
is unset, it loses its special properties, even if it is
subsequently reset.
</p>
</dd>
<dt id='index-BASH_005fREMATCH'><span><code>BASH_REMATCH</code><a href='#index-BASH_005fREMATCH' class='copiable-anchor'> &para;</a></span></dt>
<dd><p>An array variable whose members are assigned by the &lsquo;<samp>=~</samp>&rsquo; binary
operator to the <code>[[</code> conditional command
@@ -7093,6 +7102,14 @@ is unset, it loses its special properties, even if it is
subsequently reset.
</p>
</dd>
<dt id='index-BASH_005fTRAPSIG'><span><code>BASH_TRAPSIG</code><a href='#index-BASH_005fTRAPSIG' class='copiable-anchor'> &para;</a></span></dt>
<dd><p>Set to the signal number corresponding to the trap action being executed
during its execution.
See the description of <code>trap</code>
(see <a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a>)
for information about signal numbers and trap execution.
</p>
</dd>
<dt id='index-BASH_005fVERSINFO'><span><code>BASH_VERSINFO</code><a href='#index-BASH_005fVERSINFO' class='copiable-anchor'> &para;</a></span></dt>
<dd><p>A readonly array variable (see <a href="#Arrays">Arrays</a>)
whose members hold version information for this instance of Bash.
@@ -15567,9 +15584,11 @@ Next: <a href="#Function-Index" accesskey="n" rel="next">Function Index</a>, Pre
<tr><td></td><td valign="top"><a href="#index-BASH_005fEXECUTION_005fSTRING"><code>BASH_EXECUTION_STRING</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-BASH_005fLINENO"><code>BASH_LINENO</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-BASH_005fLOADABLES_005fPATH"><code>BASH_LOADABLES_PATH</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-BASH_005fMONOSECONDS"><code>BASH_MONOSECONDS</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-BASH_005fREMATCH"><code>BASH_REMATCH</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-BASH_005fSOURCE"><code>BASH_SOURCE</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-BASH_005fSUBSHELL"><code>BASH_SUBSHELL</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-BASH_005fTRAPSIG"><code>BASH_TRAPSIG</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-BASH_005fVERSINFO"><code>BASH_VERSINFO</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-BASH_005fVERSION"><code>BASH_VERSION</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-BASH_005fXTRACEFD"><code>BASH_XTRACEFD</code></a>:</td><td>&nbsp;</td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
+174 -159
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, 15 June 2023).
Bash shell (version 5.3, 16 June 2023).
This is Edition 5.3, last updated 15 June 2023, of 'The GNU Bash
This is Edition 5.3, last updated 16 June 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, 15 June 2023). The Bash home page is
Bash shell (version 5.3, 16 June 2023). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.3, last updated 15 June 2023, of 'The GNU Bash
This is Edition 5.3, last updated 16 June 2023, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.3.
Bash contains features that appear in other popular shells, and some
@@ -5407,6 +5407,13 @@ Variables::).
A colon-separated list of directories in which the shell looks for
dynamically loadable builtins specified by the 'enable' command.
'BASH_MONOSECONDS'
Each time this variable is referenced, it expands to the value
returned by the system's monotonic clock, if one is available. If
there is no monotonic clock, this is equivalent to 'EPOCHSECONDS'.
If 'BASH_MONOSECONDS' is unset, it loses its special properties,
even if it is subsequently reset.
'BASH_REMATCH'
An array variable whose members are assigned by the '=~' binary
operator to the '[[' conditional command (*note Conditional
@@ -5428,6 +5435,12 @@ Variables::).
value is 0. If 'BASH_SUBSHELL' is unset, it loses its special
properties, even if it is subsequently reset.
'BASH_TRAPSIG'
Set to the signal number corresponding to the trap action being
executed during its execution. See the description of 'trap'
(*note Bourne Shell Builtins::) for information about signal
numbers and trap execution.
'BASH_VERSINFO'
A readonly array variable (*note Arrays::) whose members hold
version information for this instance of Bash. The values assigned
@@ -12194,12 +12207,14 @@ D.3 Parameter and Variable Index
* BASH_EXECUTION_STRING: Bash Variables. (line 122)
* BASH_LINENO: Bash Variables. (line 125)
* BASH_LOADABLES_PATH: Bash Variables. (line 133)
* BASH_REMATCH: Bash Variables. (line 137)
* BASH_SOURCE: Bash Variables. (line 145)
* BASH_SUBSHELL: Bash Variables. (line 152)
* BASH_VERSINFO: Bash Variables. (line 158)
* BASH_VERSION: Bash Variables. (line 181)
* BASH_XTRACEFD: Bash Variables. (line 184)
* BASH_MONOSECONDS: Bash Variables. (line 137)
* BASH_REMATCH: Bash Variables. (line 144)
* BASH_SOURCE: Bash Variables. (line 152)
* BASH_SUBSHELL: Bash Variables. (line 159)
* BASH_TRAPSIG: Bash Variables. (line 165)
* BASH_VERSINFO: Bash Variables. (line 171)
* BASH_VERSION: Bash Variables. (line 194)
* BASH_XTRACEFD: Bash Variables. (line 197)
* bell-style: Readline Init File Syntax.
(line 64)
* bind-tty-special-chars: Readline Init File Syntax.
@@ -12208,12 +12223,12 @@ D.3 Parameter and Variable Index
(line 76)
* CDPATH: Bourne Shell Variables.
(line 9)
* CHILD_MAX: Bash Variables. (line 195)
* CHILD_MAX: Bash Variables. (line 208)
* colored-completion-prefix: Readline Init File Syntax.
(line 81)
* colored-stats: Readline Init File Syntax.
(line 91)
* COLUMNS: Bash Variables. (line 202)
* COLUMNS: Bash Variables. (line 215)
* comment-begin: Readline Init File Syntax.
(line 97)
* completion-display-width: Readline Init File Syntax.
@@ -12226,25 +12241,25 @@ D.3 Parameter and Variable Index
(line 120)
* completion-query-items: Readline Init File Syntax.
(line 127)
* COMPREPLY: Bash Variables. (line 254)
* COMP_CWORD: Bash Variables. (line 208)
* COMP_KEY: Bash Variables. (line 237)
* COMP_LINE: Bash Variables. (line 214)
* COMP_POINT: Bash Variables. (line 219)
* COMP_TYPE: Bash Variables. (line 227)
* COMP_WORDBREAKS: Bash Variables. (line 241)
* COMP_WORDS: Bash Variables. (line 247)
* COMPREPLY: Bash Variables. (line 267)
* COMP_CWORD: Bash Variables. (line 221)
* COMP_KEY: Bash Variables. (line 250)
* COMP_LINE: Bash Variables. (line 227)
* COMP_POINT: Bash Variables. (line 232)
* COMP_TYPE: Bash Variables. (line 240)
* COMP_WORDBREAKS: Bash Variables. (line 254)
* COMP_WORDS: Bash Variables. (line 260)
* convert-meta: Readline Init File Syntax.
(line 138)
* COPROC: Bash Variables. (line 260)
* DIRSTACK: Bash Variables. (line 264)
* COPROC: Bash Variables. (line 273)
* DIRSTACK: Bash Variables. (line 277)
* disable-completion: Readline Init File Syntax.
(line 148)
* echo-control-characters: Readline Init File Syntax.
(line 153)
* editing-mode: Readline Init File Syntax.
(line 158)
* EMACS: Bash Variables. (line 274)
* EMACS: Bash Variables. (line 287)
* emacs-mode-string: Readline Init File Syntax.
(line 164)
* enable-active-region: Readline Init File Syntax.
@@ -12253,70 +12268,70 @@ D.3 Parameter and Variable Index
(line 187)
* enable-keypad: Readline Init File Syntax.
(line 196)
* ENV: Bash Variables. (line 279)
* EPOCHREALTIME: Bash Variables. (line 284)
* EPOCHSECONDS: Bash Variables. (line 292)
* EUID: Bash Variables. (line 299)
* EXECIGNORE: Bash Variables. (line 303)
* ENV: Bash Variables. (line 292)
* EPOCHREALTIME: Bash Variables. (line 297)
* EPOCHSECONDS: Bash Variables. (line 305)
* EUID: Bash Variables. (line 312)
* EXECIGNORE: Bash Variables. (line 316)
* expand-tilde: Readline Init File Syntax.
(line 207)
* FCEDIT: Bash Variables. (line 316)
* FIGNORE: Bash Variables. (line 320)
* FUNCNAME: Bash Variables. (line 326)
* FUNCNEST: Bash Variables. (line 343)
* GLOBIGNORE: Bash Variables. (line 348)
* GLOBSORT: Bash Variables. (line 355)
* GROUPS: Bash Variables. (line 381)
* histchars: Bash Variables. (line 387)
* HISTCMD: Bash Variables. (line 402)
* HISTCONTROL: Bash Variables. (line 408)
* HISTFILE: Bash Variables. (line 424)
* HISTFILESIZE: Bash Variables. (line 428)
* HISTIGNORE: Bash Variables. (line 439)
* FCEDIT: Bash Variables. (line 329)
* FIGNORE: Bash Variables. (line 333)
* FUNCNAME: Bash Variables. (line 339)
* FUNCNEST: Bash Variables. (line 356)
* GLOBIGNORE: Bash Variables. (line 361)
* GLOBSORT: Bash Variables. (line 368)
* GROUPS: Bash Variables. (line 394)
* histchars: Bash Variables. (line 400)
* HISTCMD: Bash Variables. (line 415)
* HISTCONTROL: Bash Variables. (line 421)
* HISTFILE: Bash Variables. (line 437)
* HISTFILESIZE: Bash Variables. (line 441)
* HISTIGNORE: Bash Variables. (line 452)
* history-preserve-point: Readline Init File Syntax.
(line 211)
* history-size: Readline Init File Syntax.
(line 217)
* HISTSIZE: Bash Variables. (line 459)
* HISTTIMEFORMAT: Bash Variables. (line 466)
* HISTSIZE: Bash Variables. (line 472)
* HISTTIMEFORMAT: Bash Variables. (line 479)
* HOME: Bourne Shell Variables.
(line 13)
* horizontal-scroll-mode: Readline Init File Syntax.
(line 226)
* HOSTFILE: Bash Variables. (line 474)
* HOSTNAME: Bash Variables. (line 485)
* HOSTTYPE: Bash Variables. (line 488)
* HOSTFILE: Bash Variables. (line 487)
* HOSTNAME: Bash Variables. (line 498)
* HOSTTYPE: Bash Variables. (line 501)
* IFS: Bourne Shell Variables.
(line 18)
* IGNOREEOF: Bash Variables. (line 491)
* IGNOREEOF: Bash Variables. (line 504)
* input-meta: Readline Init File Syntax.
(line 235)
* INPUTRC: Bash Variables. (line 501)
* INSIDE_EMACS: Bash Variables. (line 505)
* INPUTRC: Bash Variables. (line 514)
* INSIDE_EMACS: Bash Variables. (line 518)
* isearch-terminators: Readline Init File Syntax.
(line 245)
* keymap: Readline Init File Syntax.
(line 252)
* LANG: Creating Internationalized Scripts.
(line 51)
* LANG <1>: Bash Variables. (line 511)
* LC_ALL: Bash Variables. (line 515)
* LC_COLLATE: Bash Variables. (line 519)
* LC_CTYPE: Bash Variables. (line 526)
* LANG <1>: Bash Variables. (line 524)
* LC_ALL: Bash Variables. (line 528)
* LC_COLLATE: Bash Variables. (line 532)
* LC_CTYPE: Bash Variables. (line 539)
* LC_MESSAGES: Creating Internationalized Scripts.
(line 51)
* LC_MESSAGES <1>: Bash Variables. (line 531)
* LC_NUMERIC: Bash Variables. (line 535)
* LC_TIME: Bash Variables. (line 539)
* LINENO: Bash Variables. (line 543)
* LINES: Bash Variables. (line 548)
* MACHTYPE: Bash Variables. (line 554)
* LC_MESSAGES <1>: Bash Variables. (line 544)
* LC_NUMERIC: Bash Variables. (line 548)
* LC_TIME: Bash Variables. (line 552)
* LINENO: Bash Variables. (line 556)
* LINES: Bash Variables. (line 561)
* MACHTYPE: Bash Variables. (line 567)
* MAIL: Bourne Shell Variables.
(line 22)
* MAILCHECK: Bash Variables. (line 558)
* MAILCHECK: Bash Variables. (line 571)
* MAILPATH: Bourne Shell Variables.
(line 27)
* MAPFILE: Bash Variables. (line 566)
* MAPFILE: Bash Variables. (line 579)
* mark-modified-lines: Readline Init File Syntax.
(line 282)
* mark-symlinked-directories: Readline Init File Syntax.
@@ -12327,46 +12342,46 @@ D.3 Parameter and Variable Index
(line 299)
* meta-flag: Readline Init File Syntax.
(line 235)
* OLDPWD: Bash Variables. (line 570)
* OLDPWD: Bash Variables. (line 583)
* OPTARG: Bourne Shell Variables.
(line 34)
* OPTERR: Bash Variables. (line 573)
* OPTERR: Bash Variables. (line 586)
* OPTIND: Bourne Shell Variables.
(line 38)
* OSTYPE: Bash Variables. (line 577)
* OSTYPE: Bash Variables. (line 590)
* output-meta: Readline Init File Syntax.
(line 304)
* page-completions: Readline Init File Syntax.
(line 312)
* PATH: Bourne Shell Variables.
(line 42)
* PIPESTATUS: Bash Variables. (line 580)
* POSIXLY_CORRECT: Bash Variables. (line 585)
* PPID: Bash Variables. (line 595)
* PROMPT_COMMAND: Bash Variables. (line 599)
* PROMPT_DIRTRIM: Bash Variables. (line 605)
* PS0: Bash Variables. (line 611)
* PIPESTATUS: Bash Variables. (line 593)
* POSIXLY_CORRECT: Bash Variables. (line 598)
* PPID: Bash Variables. (line 608)
* PROMPT_COMMAND: Bash Variables. (line 612)
* PROMPT_DIRTRIM: Bash Variables. (line 618)
* PS0: Bash Variables. (line 624)
* PS1: Bourne Shell Variables.
(line 48)
* PS2: Bourne Shell Variables.
(line 53)
* PS3: Bash Variables. (line 616)
* PS4: Bash Variables. (line 621)
* PWD: Bash Variables. (line 629)
* RANDOM: Bash Variables. (line 632)
* READLINE_ARGUMENT: Bash Variables. (line 638)
* READLINE_LINE: Bash Variables. (line 642)
* READLINE_MARK: Bash Variables. (line 646)
* READLINE_POINT: Bash Variables. (line 652)
* REPLY: Bash Variables. (line 656)
* PS3: Bash Variables. (line 629)
* PS4: Bash Variables. (line 634)
* PWD: Bash Variables. (line 642)
* RANDOM: Bash Variables. (line 645)
* READLINE_ARGUMENT: Bash Variables. (line 651)
* READLINE_LINE: Bash Variables. (line 655)
* READLINE_MARK: Bash Variables. (line 659)
* READLINE_POINT: Bash Variables. (line 665)
* REPLY: Bash Variables. (line 669)
* revert-all-at-newline: Readline Init File Syntax.
(line 322)
* search-ignore-case: Readline Init File Syntax.
(line 329)
* SECONDS: Bash Variables. (line 659)
* SHELL: Bash Variables. (line 668)
* SHELLOPTS: Bash Variables. (line 673)
* SHLVL: Bash Variables. (line 682)
* SECONDS: Bash Variables. (line 672)
* SHELL: Bash Variables. (line 681)
* SHELLOPTS: Bash Variables. (line 686)
* SHLVL: Bash Variables. (line 695)
* show-all-if-ambiguous: Readline Init File Syntax.
(line 334)
* show-all-if-unmodified: Readline Init File Syntax.
@@ -12375,15 +12390,15 @@ D.3 Parameter and Variable Index
(line 349)
* skip-completed-text: Readline Init File Syntax.
(line 355)
* SRANDOM: Bash Variables. (line 687)
* SRANDOM: Bash Variables. (line 700)
* TEXTDOMAIN: Creating Internationalized Scripts.
(line 51)
* TEXTDOMAINDIR: Creating Internationalized Scripts.
(line 51)
* TIMEFORMAT: Bash Variables. (line 696)
* TMOUT: Bash Variables. (line 734)
* TMPDIR: Bash Variables. (line 746)
* UID: Bash Variables. (line 750)
* TIMEFORMAT: Bash Variables. (line 709)
* TMOUT: Bash Variables. (line 747)
* TMPDIR: Bash Variables. (line 759)
* UID: Bash Variables. (line 763)
* vi-cmd-mode-string: Readline Init File Syntax.
(line 368)
* vi-ins-mode-string: Readline Init File Syntax.
@@ -12835,77 +12850,77 @@ Node: Special Builtins223355
Node: Shell Variables224334
Node: Bourne Shell Variables224771
Node: Bash Variables226875
Node: Bash Features260938
Node: Invoking Bash261951
Node: Bash Startup Files267964
Node: Interactive Shells273095
Node: What is an Interactive Shell?273506
Node: Is this Shell Interactive?274155
Node: Interactive Shell Behavior274970
Node: Bash Conditional Expressions278599
Node: Shell Arithmetic283241
Node: Aliases286202
Node: Arrays289096
Node: The Directory Stack295659
Node: Directory Stack Builtins296443
Node: Controlling the Prompt300703
Node: The Restricted Shell303668
Node: Bash POSIX Mode306278
Node: Shell Compatibility Mode322071
Node: Job Control330315
Node: Job Control Basics330775
Node: Job Control Builtins335777
Node: Job Control Variables341572
Node: Command Line Editing342728
Node: Introduction and Notation344399
Node: Readline Interaction346022
Node: Readline Bare Essentials347213
Node: Readline Movement Commands349002
Node: Readline Killing Commands349962
Node: Readline Arguments351883
Node: Searching352927
Node: Readline Init File355113
Node: Readline Init File Syntax356374
Node: Conditional Init Constructs380165
Node: Sample Init File384361
Node: Bindable Readline Commands387485
Node: Commands For Moving388689
Node: Commands For History390740
Node: Commands For Text395734
Node: Commands For Killing399383
Node: Numeric Arguments402416
Node: Commands For Completion403555
Node: Keyboard Macros407746
Node: Miscellaneous Commands408434
Node: Readline vi Mode414472
Node: Programmable Completion415379
Node: Programmable Completion Builtins423159
Node: A Programmable Completion Example434279
Node: Using History Interactively439527
Node: Bash History Facilities440211
Node: Bash History Builtins443216
Node: History Interaction448240
Node: Event Designators451860
Node: Word Designators453214
Node: Modifiers454974
Node: Installing Bash456782
Node: Basic Installation457919
Node: Compilers and Options461641
Node: Compiling For Multiple Architectures462382
Node: Installation Names464074
Node: Specifying the System Type466183
Node: Sharing Defaults466900
Node: Operation Controls467573
Node: Optional Features468531
Node: Reporting Bugs479750
Node: Major Differences From The Bourne Shell481084
Node: GNU Free Documentation License497933
Node: Indexes523110
Node: Builtin Index523564
Node: Reserved Word Index530665
Node: Variable Index533113
Node: Function Index550101
Node: Concept Index563885
Node: Bash Features261530
Node: Invoking Bash262543
Node: Bash Startup Files268556
Node: Interactive Shells273687
Node: What is an Interactive Shell?274098
Node: Is this Shell Interactive?274747
Node: Interactive Shell Behavior275562
Node: Bash Conditional Expressions279191
Node: Shell Arithmetic283833
Node: Aliases286794
Node: Arrays289688
Node: The Directory Stack296251
Node: Directory Stack Builtins297035
Node: Controlling the Prompt301295
Node: The Restricted Shell304260
Node: Bash POSIX Mode306870
Node: Shell Compatibility Mode322663
Node: Job Control330907
Node: Job Control Basics331367
Node: Job Control Builtins336369
Node: Job Control Variables342164
Node: Command Line Editing343320
Node: Introduction and Notation344991
Node: Readline Interaction346614
Node: Readline Bare Essentials347805
Node: Readline Movement Commands349594
Node: Readline Killing Commands350554
Node: Readline Arguments352475
Node: Searching353519
Node: Readline Init File355705
Node: Readline Init File Syntax356966
Node: Conditional Init Constructs380757
Node: Sample Init File384953
Node: Bindable Readline Commands388077
Node: Commands For Moving389281
Node: Commands For History391332
Node: Commands For Text396326
Node: Commands For Killing399975
Node: Numeric Arguments403008
Node: Commands For Completion404147
Node: Keyboard Macros408338
Node: Miscellaneous Commands409026
Node: Readline vi Mode415064
Node: Programmable Completion415971
Node: Programmable Completion Builtins423751
Node: A Programmable Completion Example434871
Node: Using History Interactively440119
Node: Bash History Facilities440803
Node: Bash History Builtins443808
Node: History Interaction448832
Node: Event Designators452452
Node: Word Designators453806
Node: Modifiers455566
Node: Installing Bash457374
Node: Basic Installation458511
Node: Compilers and Options462233
Node: Compiling For Multiple Architectures462974
Node: Installation Names464666
Node: Specifying the System Type466775
Node: Sharing Defaults467492
Node: Operation Controls468165
Node: Optional Features469123
Node: Reporting Bugs480342
Node: Major Differences From The Bourne Shell481676
Node: GNU Free Documentation License498525
Node: Indexes523702
Node: Builtin Index524156
Node: Reserved Word Index531257
Node: Variable Index533705
Node: Function Index550839
Node: Concept Index564623

End Tag Table
+23 -48
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) 15 JUN 2023 18:20
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/MacPorts 2021.58693_0) (preloaded format=etex 2021.8.30) 16 JUN 2023 12:11
entering extended mode
restricted \write18 enabled.
file:line:error style messages enabled.
%&-line parsing enabled.
**\input /usr/local/src/bash/bash-20230614/doc/bashref.texi \input /usr/local/s
rc/bash/bash-20230614/doc/bashref.texi
(/usr/local/src/bash/bash-20230614/doc/bashref.texi
(/usr/local/src/bash/bash-20230614/doc/texinfo.tex
**\nonstopmode \input /usr/local/src/bash/bash-20230616/doc/bashref.texi \input
/usr/local/src/bash/bash-20230616/doc/bashref.texi
(/usr/local/src/bash/bash-20230616/doc/bashref.texi
(/usr/local/src/bash/bash-20230616/doc/texinfo.tex
Loading texinfo [version 2015-11-22.14]:
\outerhsize=\dimen16
\outervsize=\dimen17
@@ -162,23 +162,20 @@ This is `epsf.tex' v2.7.4 <14 February 2011>
texinfo.tex: doing @include of version.texi
(/usr/local/src/bash/bash-20230614/doc/version.texi) [1{/opt/local/var/db/texmf
/fonts/map/pdftex/updmap/pdftex.map}] [2]
(/usr/local/build/bash/bash-20230614/doc/bashref.toc [-1] [-2] [-3]) [-4]
(/usr/local/build/bash/bash-20230614/doc/bashref.toc)
(/usr/local/build/bash/bash-20230614/doc/bashref.toc) Chapter 1
(/usr/local/src/bash/bash-20230616/doc/version.texi) [1] [2]
(/usr/local/build/bash/bash-20230616/doc/bashref.toc [-1] [-2] [-3]) [-4]
Chapter 1
\openout0 = `bashref.toc'.
(/usr/local/build/bash/bash-20230614/doc/bashref.aux)
(/usr/local/build/bash/bash-20230616/doc/bashref.aux)
\openout1 = `bashref.aux'.
Chapter 2 [1] [2]
Chapter 2
[1] [2]
@cpindfile=@write2
\openout2 = `bashref.cp'.
[3] Chapter 3 [4] [5] [6] [7]
[3] Chapter 3 [4] [5] [6] [7]
@vrindfile=@write3
\openout3 = `bashref.vr'.
@@ -262,7 +259,7 @@ Overfull \hbox (38.26585pt too wide) in paragraph at lines 5358--5358
[118] [119]
texinfo.tex: doing @include of rluser.texi
(/usr/local/src/bash/bash-20230614/lib/readline/doc/rluser.texi
(/usr/local/src/bash/bash-20230616/lib/readline/doc/rluser.texi
Chapter 8 [120] [121] [122] [123] [124] [125] [126] [127] [128] [129] [130]
[131]
Underfull \hbox (badness 7540) in paragraph at lines 874--880
@@ -312,10 +309,10 @@ gnored[]
texinfo.tex: doing @include of hsuser.texi
(/usr/local/src/bash/bash-20230614/lib/readline/doc/hsuser.texi Chapter 9
(/usr/local/src/bash/bash-20230616/lib/readline/doc/hsuser.texi Chapter 9
[156] [157] [158] [159] [160] [161]) Chapter 10 [162] [163] [164] [165]
[166]
Underfull \hbox (badness 10000) in paragraph at lines 9641--9650
Underfull \hbox (badness 10000) in paragraph at lines 9656--9665
[]@textrm All of the fol-low-ing op-tions ex-cept for `@texttt alt-array-implem
entation[]@textrm '[],
@@ -328,7 +325,7 @@ entation[]@textrm '[],
.etc.
Underfull \hbox (badness 10000) in paragraph at lines 9641--9650
Underfull \hbox (badness 10000) in paragraph at lines 9656--9665
@textrm `@texttt disabled-builtins[]@textrm '[], `@texttt direxpand-default[]@t
extrm '[], `@texttt strict-posix-default[]@textrm '[], and
@@ -344,38 +341,16 @@ extrm '[], `@texttt strict-posix-default[]@textrm '[], and
[176] [177] Appendix C [178]
texinfo.tex: doing @include of fdl.texi
(/usr/local/src/bash/bash-20230614/doc/fdl.texi
(/usr/local/src/bash/bash-20230616/doc/fdl.texi
[179] [180] [181] [182] [183] [184] [185]) Appendix D [186] [187] [188]
[189] [190] [191] [192] [193] [194] [195] )
Here is how much of TeX's memory you used:
4102 strings out of 497086
47608 string characters out of 6206517
141998 words of memory out of 5000000
4869 multiletter control sequences out of 15000+600000
3531 strings out of 497096
40273 string characters out of 6206923
87714 words of memory out of 5000000
4700 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
16i,6n,16p,389b,983s stack positions out of 5000i,500n,10000p,200000b,80000s
{/opt/local/share/texmf-texlive/font
s/enc/dvips/cm-super/cm-super-t1.enc}</opt/local/share/texmf-texlive/fonts/type
1/public/amsfonts/cm/cmbx12.pfb></opt/local/share/texmf-texlive/fonts/type1/pub
lic/amsfonts/cm/cmcsc10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/
amsfonts/cm/cmmi10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfo
nts/cm/cmmi12.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/c
m/cmmi9.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr1
0.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr9.pfb><
/opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmsl10.pfb></opt/
local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmsltt10.pfb></opt/loc
al/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmsy10.pfb></opt/local/sh
are/texmf-texlive/fonts/type1/public/amsfonts/cm/cmti10.pfb></opt/local/share/t
exmf-texlive/fonts/type1/public/amsfonts/cm/cmtt10.pfb></opt/local/share/texmf-
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 (201 pages, 808042 bytes).
PDF statistics:
2803 PDF objects out of 2984 (max. 8388607)
2555 compressed objects within 26 object streams
329 named destinations out of 1000 (max. 500000)
1157 words of extra memory for PDF output out of 10000 (max. 10000000)
16i,6n,16p,402b,942s stack positions out of 5000i,500n,10000p,200000b,80000s
Output written on bashref.dvi (201 pages, 842012 bytes).
+1029 -1004
View File
File diff suppressed because it is too large Load Diff
+15
View File
@@ -6301,6 +6301,14 @@ A colon-separated list of directories in which the shell looks for
dynamically loadable builtins specified by the
@code{enable} command.
@item BASH_MONOSECONDS
Each time this variable is referenced, it expands to the value returned
by the system's monotonic clock, if one is available.
If there is no monotonic clock, this is equivalent to @env{EPOCHSECONDS}.
If @env{BASH_MONOSECONDS}
is unset, it loses its special properties, even if it is
subsequently reset.
@item BASH_REMATCH
An array variable whose members are assigned by the @samp{=~} binary
operator to the @code{[[} conditional command
@@ -6325,6 +6333,13 @@ If @env{BASH_SUBSHELL}
is unset, it loses its special properties, even if it is
subsequently reset.
@item BASH_TRAPSIG
Set to the signal number corresponding to the trap action being executed
during its execution.
See the description of @code{trap}
(@pxref{Bourne Shell Builtins})
for information about signal numbers and trap execution.
@item BASH_VERSINFO
A readonly array variable (@pxref{Arrays})
whose members hold version information for this instance of Bash.
+24 -22
View File
@@ -44,21 +44,23 @@
\entry{BASH_EXECUTION_STRING}{82}{\code {BASH_EXECUTION_STRING}}
\entry{BASH_LINENO}{82}{\code {BASH_LINENO}}
\entry{BASH_LOADABLES_PATH}{83}{\code {BASH_LOADABLES_PATH}}
\entry{BASH_MONOSECONDS}{83}{\code {BASH_MONOSECONDS}}
\entry{BASH_REMATCH}{83}{\code {BASH_REMATCH}}
\entry{BASH_SOURCE}{83}{\code {BASH_SOURCE}}
\entry{BASH_SUBSHELL}{83}{\code {BASH_SUBSHELL}}
\entry{BASH_TRAPSIG}{83}{\code {BASH_TRAPSIG}}
\entry{BASH_VERSINFO}{83}{\code {BASH_VERSINFO}}
\entry{BASH_VERSION}{83}{\code {BASH_VERSION}}
\entry{BASH_XTRACEFD}{83}{\code {BASH_XTRACEFD}}
\entry{BASH_VERSION}{84}{\code {BASH_VERSION}}
\entry{BASH_XTRACEFD}{84}{\code {BASH_XTRACEFD}}
\entry{CHILD_MAX}{84}{\code {CHILD_MAX}}
\entry{COLUMNS}{84}{\code {COLUMNS}}
\entry{COMP_CWORD}{84}{\code {COMP_CWORD}}
\entry{COMP_LINE}{84}{\code {COMP_LINE}}
\entry{COMP_POINT}{84}{\code {COMP_POINT}}
\entry{COMP_TYPE}{84}{\code {COMP_TYPE}}
\entry{COMP_KEY}{84}{\code {COMP_KEY}}
\entry{COMP_WORDBREAKS}{84}{\code {COMP_WORDBREAKS}}
\entry{COMP_WORDS}{84}{\code {COMP_WORDS}}
\entry{COMP_KEY}{85}{\code {COMP_KEY}}
\entry{COMP_WORDBREAKS}{85}{\code {COMP_WORDBREAKS}}
\entry{COMP_WORDS}{85}{\code {COMP_WORDS}}
\entry{COMPREPLY}{85}{\code {COMPREPLY}}
\entry{COPROC}{85}{\code {COPROC}}
\entry{DIRSTACK}{85}{\code {DIRSTACK}}
@@ -66,8 +68,8 @@
\entry{ENV}{85}{\code {ENV}}
\entry{EPOCHREALTIME}{85}{\code {EPOCHREALTIME}}
\entry{EPOCHSECONDS}{85}{\code {EPOCHSECONDS}}
\entry{EUID}{85}{\code {EUID}}
\entry{EXECIGNORE}{85}{\code {EXECIGNORE}}
\entry{EUID}{86}{\code {EUID}}
\entry{EXECIGNORE}{86}{\code {EXECIGNORE}}
\entry{FCEDIT}{86}{\code {FCEDIT}}
\entry{FIGNORE}{86}{\code {FIGNORE}}
\entry{FUNCNAME}{86}{\code {FUNCNAME}}
@@ -79,16 +81,16 @@
\entry{HISTCMD}{87}{\code {HISTCMD}}
\entry{HISTCONTROL}{87}{\code {HISTCONTROL}}
\entry{HISTFILE}{87}{\code {HISTFILE}}
\entry{HISTFILESIZE}{87}{\code {HISTFILESIZE}}
\entry{HISTIGNORE}{87}{\code {HISTIGNORE}}
\entry{HISTFILESIZE}{88}{\code {HISTFILESIZE}}
\entry{HISTIGNORE}{88}{\code {HISTIGNORE}}
\entry{HISTSIZE}{88}{\code {HISTSIZE}}
\entry{HISTTIMEFORMAT}{88}{\code {HISTTIMEFORMAT}}
\entry{HOSTFILE}{88}{\code {HOSTFILE}}
\entry{HOSTNAME}{88}{\code {HOSTNAME}}
\entry{HOSTTYPE}{88}{\code {HOSTTYPE}}
\entry{IGNOREEOF}{88}{\code {IGNOREEOF}}
\entry{INPUTRC}{88}{\code {INPUTRC}}
\entry{INSIDE_EMACS}{88}{\code {INSIDE_EMACS}}
\entry{IGNOREEOF}{89}{\code {IGNOREEOF}}
\entry{INPUTRC}{89}{\code {INPUTRC}}
\entry{INSIDE_EMACS}{89}{\code {INSIDE_EMACS}}
\entry{LANG}{89}{\code {LANG}}
\entry{LC_ALL}{89}{\code {LC_ALL}}
\entry{LC_COLLATE}{89}{\code {LC_COLLATE}}
@@ -100,11 +102,11 @@
\entry{LINES}{89}{\code {LINES}}
\entry{MACHTYPE}{89}{\code {MACHTYPE}}
\entry{MAILCHECK}{89}{\code {MAILCHECK}}
\entry{MAPFILE}{89}{\code {MAPFILE}}
\entry{OLDPWD}{89}{\code {OLDPWD}}
\entry{OPTERR}{89}{\code {OPTERR}}
\entry{OSTYPE}{89}{\code {OSTYPE}}
\entry{PIPESTATUS}{89}{\code {PIPESTATUS}}
\entry{MAPFILE}{90}{\code {MAPFILE}}
\entry{OLDPWD}{90}{\code {OLDPWD}}
\entry{OPTERR}{90}{\code {OPTERR}}
\entry{OSTYPE}{90}{\code {OSTYPE}}
\entry{PIPESTATUS}{90}{\code {PIPESTATUS}}
\entry{POSIXLY_CORRECT}{90}{\code {POSIXLY_CORRECT}}
\entry{PPID}{90}{\code {PPID}}
\entry{PROMPT_COMMAND}{90}{\code {PROMPT_COMMAND}}
@@ -113,10 +115,10 @@
\entry{PS3}{90}{\code {PS3}}
\entry{PS4}{90}{\code {PS4}}
\entry{PWD}{90}{\code {PWD}}
\entry{RANDOM}{90}{\code {RANDOM}}
\entry{READLINE_ARGUMENT}{90}{\code {READLINE_ARGUMENT}}
\entry{READLINE_LINE}{90}{\code {READLINE_LINE}}
\entry{READLINE_MARK}{90}{\code {READLINE_MARK}}
\entry{RANDOM}{91}{\code {RANDOM}}
\entry{READLINE_ARGUMENT}{91}{\code {READLINE_ARGUMENT}}
\entry{READLINE_LINE}{91}{\code {READLINE_LINE}}
\entry{READLINE_MARK}{91}{\code {READLINE_MARK}}
\entry{READLINE_POINT}{91}{\code {READLINE_POINT}}
\entry{REPLY}{91}{\code {REPLY}}
\entry{SECONDS}{91}{\code {SECONDS}}
@@ -124,7 +126,7 @@
\entry{SHELLOPTS}{91}{\code {SHELLOPTS}}
\entry{SHLVL}{91}{\code {SHLVL}}
\entry{SRANDOM}{91}{\code {SRANDOM}}
\entry{TIMEFORMAT}{91}{\code {TIMEFORMAT}}
\entry{TIMEFORMAT}{92}{\code {TIMEFORMAT}}
\entry{TMOUT}{92}{\code {TMOUT}}
\entry{TMPDIR}{92}{\code {TMPDIR}}
\entry{UID}{92}{\code {UID}}
+24 -22
View File
@@ -42,12 +42,14 @@
\entry{\code {BASH_EXECUTION_STRING}}{82}
\entry{\code {BASH_LINENO}}{82}
\entry{\code {BASH_LOADABLES_PATH}}{83}
\entry{\code {BASH_MONOSECONDS}}{83}
\entry{\code {BASH_REMATCH}}{83}
\entry{\code {BASH_SOURCE}}{83}
\entry{\code {BASH_SUBSHELL}}{83}
\entry{\code {BASH_TRAPSIG}}{83}
\entry{\code {BASH_VERSINFO}}{83}
\entry{\code {BASH_VERSION}}{83}
\entry{\code {BASH_XTRACEFD}}{83}
\entry{\code {BASH_VERSION}}{84}
\entry{\code {BASH_XTRACEFD}}{84}
\entry{\code {BASHOPTS}}{81}
\entry{\code {BASHPID}}{81}
\entry{\code {bell-style}}{125}
@@ -61,12 +63,12 @@
\entry{\code {COLUMNS}}{84}
\entry{\code {comment-begin}}{126}
\entry{\code {COMP_CWORD}}{84}
\entry{\code {COMP_KEY}}{84}
\entry{\code {COMP_KEY}}{85}
\entry{\code {COMP_LINE}}{84}
\entry{\code {COMP_POINT}}{84}
\entry{\code {COMP_TYPE}}{84}
\entry{\code {COMP_WORDBREAKS}}{84}
\entry{\code {COMP_WORDS}}{84}
\entry{\code {COMP_WORDBREAKS}}{85}
\entry{\code {COMP_WORDS}}{85}
\entry{\code {completion-display-width}}{126}
\entry{\code {completion-ignore-case}}{126}
\entry{\code {completion-map-case}}{126}
@@ -89,8 +91,8 @@
\entry{\code {ENV}}{85}
\entry{\code {EPOCHREALTIME}}{85}
\entry{\code {EPOCHSECONDS}}{85}
\entry{\code {EUID}}{85}
\entry{\code {EXECIGNORE}}{85}
\entry{\code {EUID}}{86}
\entry{\code {EXECIGNORE}}{86}
\entry{\code {expand-tilde}}{128}
\initial {F}
\entry{\code {FCEDIT}}{86}
@@ -106,8 +108,8 @@
\entry{\code {HISTCMD}}{87}
\entry{\code {HISTCONTROL}}{87}
\entry{\code {HISTFILE}}{87}
\entry{\code {HISTFILESIZE}}{87}
\entry{\code {HISTIGNORE}}{87}
\entry{\code {HISTFILESIZE}}{88}
\entry{\code {HISTIGNORE}}{88}
\entry{\code {history-preserve-point}}{128}
\entry{\code {history-size}}{128}
\entry{\code {HISTSIZE}}{88}
@@ -119,10 +121,10 @@
\entry{\code {HOSTTYPE}}{88}
\initial {I}
\entry{\code {IFS}}{80}
\entry{\code {IGNOREEOF}}{88}
\entry{\code {IGNOREEOF}}{89}
\entry{\code {input-meta}}{128}
\entry{\code {INPUTRC}}{88}
\entry{\code {INSIDE_EMACS}}{88}
\entry{\code {INPUTRC}}{89}
\entry{\code {INSIDE_EMACS}}{89}
\entry{\code {isearch-terminators}}{129}
\initial {K}
\entry{\code {keymap}}{129}
@@ -141,23 +143,23 @@
\entry{\code {MAIL}}{80}
\entry{\code {MAILCHECK}}{89}
\entry{\code {MAILPATH}}{80}
\entry{\code {MAPFILE}}{89}
\entry{\code {MAPFILE}}{90}
\entry{\code {mark-modified-lines}}{129}
\entry{\code {mark-symlinked-directories}}{129}
\entry{\code {match-hidden-files}}{129}
\entry{\code {menu-complete-display-prefix}}{130}
\entry{\code {meta-flag}}{128}
\initial {O}
\entry{\code {OLDPWD}}{89}
\entry{\code {OLDPWD}}{90}
\entry{\code {OPTARG}}{80}
\entry{\code {OPTERR}}{89}
\entry{\code {OPTERR}}{90}
\entry{\code {OPTIND}}{80}
\entry{\code {OSTYPE}}{89}
\entry{\code {OSTYPE}}{90}
\entry{\code {output-meta}}{130}
\initial {P}
\entry{\code {page-completions}}{130}
\entry{\code {PATH}}{80}
\entry{\code {PIPESTATUS}}{89}
\entry{\code {PIPESTATUS}}{90}
\entry{\code {POSIXLY_CORRECT}}{90}
\entry{\code {PPID}}{90}
\entry{\code {PROMPT_COMMAND}}{90}
@@ -169,10 +171,10 @@
\entry{\code {PS4}}{90}
\entry{\code {PWD}}{90}
\initial {R}
\entry{\code {RANDOM}}{90}
\entry{\code {READLINE_ARGUMENT}}{90}
\entry{\code {READLINE_LINE}}{90}
\entry{\code {READLINE_MARK}}{90}
\entry{\code {RANDOM}}{91}
\entry{\code {READLINE_ARGUMENT}}{91}
\entry{\code {READLINE_LINE}}{91}
\entry{\code {READLINE_MARK}}{91}
\entry{\code {READLINE_POINT}}{91}
\entry{\code {REPLY}}{91}
\entry{\code {revert-all-at-newline}}{130}
@@ -190,7 +192,7 @@
\initial {T}
\entry{\code {TEXTDOMAIN}}{8}
\entry{\code {TEXTDOMAINDIR}}{8}
\entry{\code {TIMEFORMAT}}{91}
\entry{\code {TIMEFORMAT}}{92}
\entry{\code {TMOUT}}{92}
\entry{\code {TMPDIR}}{92}
\initial {U}
+1 -1
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.22.4
%%CreationDate: Thu Jun 15 18:21:16 2023
%%CreationDate: Fri Jun 16 12:13:33 2023
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
+1 -1
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.22.4
%%CreationDate: Tue Jun 13 10:42:36 2023
%%CreationDate: Fri Jun 16 12:13:33 2023
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%DocumentSuppliedResources: procset grops 1.22 4
+2 -2
View File
@@ -2,10 +2,10 @@
Copyright (C) 1988-2023 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Thu Jun 15 18:11:16 EDT 2023
@set LASTCHANGE Fri Jun 16 11:35:19 EDT 2023
@set EDITION 5.3
@set VERSION 5.3
@set UPDATED 15 June 2023
@set UPDATED 16 June 2023
@set UPDATED-MONTH June 2023
+6
View File
@@ -3145,6 +3145,12 @@ if (job == NO_JOB)
if (check_window_size)
get_new_window_size (0, (int *)0, (int *)0);
}
else if (interactive_shell && interactive == 0 && check_window_size &&
(subshell_environment & (SUBSHELL_PAREN|SUBSHELL_ASYNC)) == SUBSHELL_PAREN &&
IS_FOREGROUND (job))
/* Make checkwinsize work in foreground subshells started from
interactive shells. */
get_new_window_size (0, (int *)0, (int *)0);
/* Moved here from set_job_status_and_cleanup, which is in the SIGCHLD
signal handler path */
+45
View File
@@ -293,6 +293,34 @@ decode_signal (const char *string, int flags)
return (NO_SIG);
}
static char *
save_bash_trapsig (void)
{
char *ret;
if (ret = get_string_value ("BASH_TRAPSIG"))
ret = savestring (ret);
return ret;
}
static void
set_bash_trapsig (int sig)
{
bind_var_to_int ("BASH_TRAPSIG", sig, 0);
}
static void
restore_bash_trapsig (char *oldval)
{
if (oldval == 0)
unbind_variable_noref ("BASH_TRAPSIG");
else
{
bind_variable ("BASH_TRAPSIG", oldval, 0);
free (oldval);
}
}
/* Non-zero when we catch a trapped signal. */
static int catch_flag;
@@ -308,6 +336,7 @@ run_pending_traps (void)
volatile int save_return_catch_flag, function_code;
procenv_t save_return_catch;
char *trap_command, *old_trap;
char *old_trapsig;
#if defined (ARRAY_VARS)
ARRAY *ps;
#endif
@@ -341,6 +370,7 @@ run_pending_traps (void)
#endif
old_running = running_trap;
old_context = trap_return_context;
old_trapsig = save_bash_trapsig ();
for (sig = 1; sig < NSIG; sig++)
{
@@ -352,6 +382,8 @@ run_pending_traps (void)
running_trap = sig + 1;
trap_return_context = funcnest + sourcenest;
set_bash_trapsig (sig);
if (sig == SIGINT)
{
pending_traps[sig] = 0; /* XXX */
@@ -477,6 +509,7 @@ run_pending_traps (void)
{
running_trap = old_running; /* XXX */
trap_return_context = old_context;
restore_bash_trapsig (old_trapsig);
/* caller will set last_command_exit_value */
sh_longjmp (return_catch, 1);
}
@@ -492,6 +525,7 @@ run_pending_traps (void)
#if defined (ARRAY_VARS)
restore_pipestatus_array (ps);
#endif
restore_bash_trapsig (old_trapsig);
last_command_exit_value = old_exit_value;
}
@@ -978,6 +1012,7 @@ int
run_exit_trap (void)
{
char *trap_command;
char *old_trapsig;
int code, function_code, retval;
#if defined (ARRAY_VARS)
ARRAY *ps;
@@ -1003,6 +1038,9 @@ run_exit_trap (void)
running_trap = 1;
trap_return_context = funcnest + sourcenest;
old_trapsig = save_bash_trapsig ();
set_bash_trapsig (EXIT_TRAP);
code = setjmp_nosigs (top_level);
/* If we're in a function, make sure return longjmps come here, too. */
@@ -1027,6 +1065,7 @@ run_exit_trap (void)
#if defined (ARRAY_VARS)
array_dispose (ps);
#endif
restore_bash_trapsig (old_trapsig);
return retval;
}
@@ -1052,6 +1091,7 @@ static int
_run_trap_internal (int sig, char *tag)
{
char *trap_command, *old_trap;
char *old_trapsig;
int trap_exit_value;
volatile int save_return_catch_flag, function_code;
int old_modes, old_running, old_int, old_context;
@@ -1089,6 +1129,9 @@ _run_trap_internal (int sig, char *tag)
sigmodes[sig] &= ~SIG_CHANGED; /* just to be sure */
trap_command = savestring (old_trap);
old_trapsig = save_bash_trapsig ();
set_bash_trapsig (sig);
running_trap = sig + 1;
trap_return_context = funcnest + sourcenest;
@@ -1151,6 +1194,8 @@ _run_trap_internal (int sig, char *tag)
if ((old_modes & SIG_INPROGRESS) == 0)
sigmodes[sig] &= ~SIG_INPROGRESS;
restore_bash_trapsig (old_trapsig);
running_trap = old_running;
interrupt_state = old_int;
trap_return_context = old_context;
+29
View File
@@ -218,6 +218,8 @@ static SHELL_VAR *assign_seconds (SHELL_VAR *, char *, arrayind_t, char *);
static SHELL_VAR *get_seconds (SHELL_VAR *);
static SHELL_VAR *init_seconds_var (void);
static SHELL_VAR *get_monoseconds (SHELL_VAR *);
static SHELL_VAR *assign_random (SHELL_VAR *, char *, arrayind_t, char *);
static SHELL_VAR *get_random (SHELL_VAR *);
@@ -1360,6 +1362,31 @@ init_seconds_var (void)
return v;
}
/* Functions for BASH_MONOSECONDS */
static SHELL_VAR *
get_monoseconds (SHELL_VAR *self)
{
int ret;
intmax_t nval;
struct timeval tv;
#if defined (HAVE_CLOCK_GETTIME) && defined (CLOCK_MONOTONIC)
struct timespec ts;
ret = clock_gettime (CLOCK_MONOTONIC, &ts);
if (ret == 0)
{
nval = ts.tv_sec;
return (set_int_value (self, nval, integer_p (self) != 0));
}
#endif
/* Fall back to gettimeofday if clock_gettime not available or fails */
ret = gettimeofday (&tv, NULL);
nval = tv.tv_sec;
return (set_int_value (self, nval, integer_p (self) != 0));
}
/* Functions for $RANDOM and $SRANDOM */
int last_random_value;
@@ -1827,6 +1854,8 @@ initialize_dynamic_variables (void)
INIT_DYNAMIC_VAR ("BASH_COMMAND", (char *)NULL, get_bash_command, (sh_var_assign_func_t *)NULL);
INIT_DYNAMIC_VAR ("BASH_SUBSHELL", (char *)NULL, get_subshell, assign_subshell);
INIT_DYNAMIC_VAR ("BASH_MONOSECONDS", (char *)NULL, get_monoseconds, (sh_var_assign_func_t *)NULL);
INIT_DYNAMIC_VAR ("RANDOM", (char *)NULL, get_random, assign_random);
VSETATTR (v, att_integer);
INIT_DYNAMIC_VAR ("SRANDOM", (char *)NULL, get_urandom, (sh_var_assign_func_t *)NULL);