]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
new bash_source_fullpath shell option; documentation updates for wait builtin
authorChet Ramey <chet.ramey@case.edu>
Tue, 30 Jul 2024 15:18:17 +0000 (11:18 -0400)
committerChet Ramey <chet.ramey@case.edu>
Tue, 30 Jul 2024 15:18:17 +0000 (11:18 -0400)
23 files changed:
CWRU/CWRU.chlog
builtins/hash.def
builtins/history.def
builtins/shopt.def
builtins/source.def
doc/bash.0
doc/bash.1
doc/bash.html
doc/bash.info
doc/bash.pdf
doc/bashref.html
doc/bashref.info
doc/bashref.log
doc/bashref.pdf
doc/bashref.texi
doc/builtins.0
doc/version.texi
execute_cmd.c
hashcmd.c
jobs.c
lib/readline/histexpand.c
subst.c
variables.c

index bfe8444be6c8cec41e5a6561d7cfd165a21caf50..6930d8ce61b6e15983b688b5b3a73f91bc516a7a 100644 (file)
@@ -9872,3 +9872,39 @@ lib/malloc/malloc.c
          otherwise
        - internal_realloc: don't check bucket at nunits-1 unless nunits >= 1
          Report and fix from Collin Funk <collin.funk1@gmail.com>
+
+                                  7/25
+                                  ----
+variables.c
+       - push_source: new function, pushes a filename to BASH_SOURCE; changed
+         callers (shell.c, execute_cmd.c, builtins/evalfile.c)
+       - bash_source_fullpath: new variable, if non-zero, push_source runs
+         the filename through sh_realpath before pushing it to BASH_SOURCE
+         Feature requested by several, including konsolebox <konsolebox@gmail.com>
+
+builtins/shopt.def
+       - bash_source_fullpath: new option, controls bash_source_fullpath and
+         whether or not BASH_SOURCE contains full pathnames
+
+doc/bash.1,doc/bashref.texi
+       - bash_source_fullpath: document new shell option
+
+                                  7/26
+                                  ----
+jobs.c,jobs.h,subst.c
+       - last_procsub_pid: new variable, set to the pid of last_procsub_child,
+         so it will survive the PROCESS * being deleted if we need it. Not
+         used yet
+
+                                  7/29
+                                  ----
+doc/bash.1,doc/bashref.texi
+       - wait: update description to clarify wait -n and unify language
+         Inspired by report from Zachary Santer <zsanter@gmail.com>
+       - set: note that the -e behavior for pipelines is affected by the
+         state of the pipefail option
+         From a report by Martin D Kealey <martin@kurahaupo.gen.nz>
+
+variables.c,hashcmd.c,builtins/hash.def,builtins/history.def,builtins/source.def
+       - use ABSPATH/RELPATH/absolute_program instead of testing for slash
+         explicitly
index ee8da9d000b272c1a439fc933efd5b43452543ae..fc96d59460f2b2ad75ba26f3d4a3b6e47c4e3024 100644 (file)
@@ -156,7 +156,7 @@ hash_builtin (WORD_LIST *list)
 #if defined (RESTRICTED_SHELL)
   if (restricted && pathname)
     {
-      if (strchr (pathname, '/'))
+      if (absolute_program (pathname))
        {
           sh_restricted (pathname);
           return (EXECUTION_FAILURE);
index ae64726a9558a17fd9efddfc260d73d851139c75..f5dd416bbf8b962d542e462435a43502f1c6ad13 100644 (file)
@@ -282,7 +282,7 @@ history_builtin (WORD_LIST *list)
     }
 
 #if defined (RESTRICTED_SHELL)
-  if (restricted && strchr (filename, '/'))
+  if (restricted && absolute_program (filename))
     {
       sh_restricted (filename);
       return (EXECUTION_FAILURE);
index b3e1cfe500ca0bec7459246de24bec60ddea4490..67bc0c2261e5fe9b9e2a97e7363e5198356a8027 100644 (file)
@@ -97,6 +97,7 @@ extern int localvar_unset;
 extern int varassign_redir_autoclose;
 extern int singlequote_translations;
 extern int patsub_replacement;
+extern int bash_source_fullpath;
 
 #if defined (EXTENDED_GLOB)
 extern int extended_glob;
@@ -177,10 +178,13 @@ static struct {
   int  *value;
   shopt_set_func_t *set_func;
 } shopt_vars[] = {
-  { "autocd", &autocd, (shopt_set_func_t *)NULL },
 #if defined (ARRAY_VARS)
   { "array_expand_once", &expand_once_flag, set_array_expand },
   { "assoc_expand_once", &expand_once_flag, set_array_expand },
+#endif
+  { "autocd", &autocd, (shopt_set_func_t *)NULL },
+#if defined (ARRAY_VARS)
+  { "bash_source_fullpath", &bash_source_fullpath, (shopt_set_func_t *)NULL },
 #endif
   { "cdable_vars", &cdable_vars, (shopt_set_func_t *)NULL },
   { "cdspell", &cdspelling, (shopt_set_func_t *)NULL },
index fa3d5ce1b9a2012aa25b8aa8e7272897aeb698e1..41c664f9dd0e5149c17cd7cc59bbdde9f563eee2 100644 (file)
@@ -146,7 +146,7 @@ source_builtin (WORD_LIST *list)
     }
 
 #if defined (RESTRICTED_SHELL)
-  if (restricted && (pathstring || strchr (list->word->word, '/')))
+  if (restricted && (pathstring || absolute_program (list->word->word)))
     {
       sh_restricted (list->word->word);
       return (EXECUTION_FAILURE);
@@ -162,7 +162,7 @@ source_builtin (WORD_LIST *list)
 
   filename = (char *)NULL;
   /* XXX -- should this be absolute_pathname? */
-  if (posixly_correct && strchr (list->word->word, '/'))
+  if (posixly_correct && absolute_program (list->word->word))
     filename = savestring (list->word->word);
   else if (absolute_pathname (list->word->word))
     filename = savestring (list->word->word);
index f89c340df4fd5b2e07901184545b982e6211f001..2b40362cbc76c646ce0056565f72fc2e272bf1f3 100644 (file)
@@ -6027,6 +6027,10 @@ S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
               a\bau\but\bto\boc\bcd\bd  If  set,  a command name that is the name of a directory
                       is executed as if it were the argument to  the  c\bcd\bd  com-
                       mand.  This option is only used by interactive shells.
+              b\bba\bas\bsh\bh_\b_s\bso\bou\bur\brc\bce\be_\b_f\bfu\bul\bll\blp\bpa\bat\bth\bh
+                      If  set,  filenames added to the B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE array vari-
+                      able are converted to full pathnames  (see  S\bSh\bhe\bel\bll\bl  V\bVa\bar\bri\bi-\b-
+                      a\bab\bbl\ble\bes\bs above).
               c\bcd\bda\bab\bbl\ble\be_\b_v\bva\bar\brs\bs
                       If  set,  an  argument to the c\bcd\bd builtin command that is
                       not a directory is assumed to be the name of a  variable
index 1f0a23d388effa884542e9b6f63d1f71e306d3f1..a5d15c95810d1a59ababe791058a9acabb5eb418 100644 (file)
@@ -5,14 +5,14 @@
 .\"    Case Western Reserve University
 .\"    chet.ramey@case.edu
 .\"
-.\"    Last Change: Tue Jul  2 14:28:46 EDT 2024
+.\"    Last Change: Mon Jul 29 11:19:45 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 2" "GNU Bash 5.3"
+.TH BASH 1 "2024 July 29" "GNU Bash 5.3"
 .\"
 .ie \n(.g \{\
 .ds ' \(aq
@@ -657,8 +657,8 @@ These are referred to as \fIasynchronous\fP commands.
 Commands separated by a
 .B ;
 are executed sequentially; the shell waits for each
-command to terminate in turn.  The return status is the
-exit status of the last command executed.
+command to terminate in turn.
+The return status is the exit status of the last command executed.
 .PP
 AND and OR lists are sequences of one or more pipelines separated by the
 \fB&&\fP and \fB||\fP control operators, respectively.
@@ -10327,7 +10327,8 @@ reserved words, part of any command executed in a
 or
 .B ||
 list except the command following the final \fB&&\fP or \fB||\fP,
-any command in a pipeline but the last,
+any command in a pipeline but the last
+(subject to the state of the \fBpipefail\fP shell option),
 or if the command's return value is
 being inverted with
 .BR ! .
@@ -10764,6 +10765,10 @@ If set, a command name that is the name of a directory is executed as if
 it were the argument to the \fBcd\fP command.
 This option is only used by interactive shells.
 .TP 8
+.B bash_source_fullpath
+If set, filenames added to the \fBBASH_SOURCE\fP array variable are
+converted to full pathnames (see \fBShell Variables\fP above).
+.TP 8
 .B cdable_vars
 If set, an argument to the
 .B cd
@@ -11831,43 +11836,45 @@ subsequently reset.  The exit status is true unless a
 is readonly or may not be unset.
 .TP
 \fBwait\fP [\fB\-fn\fP] [\fP\-p\fP \fIvarname\fP] [\fIid\fP .\|.\|.]
-Wait for each specified child process and return its termination status.
-Each
-.I id
-may be a process
-ID or a job specification; if a job spec is given, all processes
-in that job's pipeline are waited for.  If
-.I id
-is not given,
+Wait for each specified child process \fIid\fP and return the
+termination status of the last \fIid\fP.
+Each \fIid\fP may be a process ID or a job specification;
+if a job spec is given, \fBwait\fP waits for all processes in the job.
+.IP
+If no options or \fIid\fPs are supplied,
 \fBwait\fP waits for all running background jobs and
-the last-executed process substitution, if its process id is the same as
-\fB$!\fP,
+the last-executed process substitution,
+if its process id is the same as \fB$!\fP,
 and the return status is zero.
-If the \fB\-n\fP option is supplied,
-\fBwait\fP waits for a single job
-from the list of \fIid\fPs or, if no \fIid\fPs are supplied, any job,
+.IP
+If the \fB\-n\fP option is supplied, \fBwait\fP waits for any one of
+the given \fIid\fPs or, if no \fIid\fPs are supplied, any job
+or process substitution,
 to complete and returns its exit status.
-If none of the supplied arguments is a child of the shell, or if no arguments
-are supplied and the shell has no unwaited-for children, the exit status
-is 127.
-If the \fB\-p\fP option is supplied, the process or job identifier of the job
-for which the exit status is returned is assigned to the variable
-\fIvarname\fP named by the option argument.
+If none of the supplied \fIid\fPs is a child of the shell,
+or if no \fIid\fPs are supplied and the shell has no unwaited-for children,
+the exit status is 127.
+.IP
+If the \fB\-p\fP option is supplied, the process or job identifier
+of the job for which the exit status is returned is assigned to the
+variable \fIvarname\fP named by the option argument.
 The variable will be unset initially, before any assignment.
 This is useful only when the \fB\-n\fP option is supplied.
+.IP
 Supplying the \fB\-f\fP option, when job control is enabled,
-forces \fBwait\fP to wait for \fIid\fP to terminate before returning
-its status, instead of returning when it changes status.
-If
-.I id
-specifies a non-existent process or job, the return status is 127.
-If \fBwait\fP is interrupted by a signal, the return status will be greater
+forces \fBwait\fP to wait for each \fIid\fP to terminate before
+returning its status, instead of returning when it changes status.
+.IP
+If none of the \fIid\fPs specify one of the shell's active child
+processes, the return status is 127.
+If \fBwait\fP is interrupted by a signal,
+any \fIvarname\fP will remain unset,
+and the return status will be greater
 than 128, as described under
 .B SIGNALS
 .ie \n(zZ=1 in \fIbash\fP(1).
 .el above.
-Otherwise, the return status is the exit status of the last
-process or job waited for.
+Otherwise, the return status is the exit status of the last \fIid\fP.
 .SH "SHELL COMPATIBILITY MODE"
 Bash-4.0 introduced the concept of a \fIshell compatibility level\fP,
 specified as a set of options to the shopt builtin (\c
index 8076e3f0e4182efa972f5aff5d383832f4801df9..0cb7347a01dd25eb9aece98aaa9cd7e54792999f 100644 (file)
@@ -13512,6 +13512,11 @@ Deprecated; a synonym for <B>array_expand_once</B>.
 If set, a command name that is the name of a directory is executed as if
 it were the argument to the <B>cd</B> command.
 This option is only used by interactive shells.
+<DT><B>bash_source_fullpath</B>
+
+<DD>
+If set, filenames added to the <B>BASH_SOURCE</B> array variable are
+converted to full pathnames (see <B>Shell Variables</B> above).
 <DT><B>cdable_vars</B>
 
 <DD>
@@ -15590,7 +15595,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-20240701/doc/bash.1.<BR>
-Time: 03 July 2024 10:54:15 EDT
+This document was created by man2html from /usr/local/src/bash/bash-20240724/doc/bash.1.<BR>
+Time: 25 July 2024 11:43:06 EDT
 </BODY>
 </HTML>
index a716bffa1c5d84374d54d7ce116a686df77269c8..ebd2327bd67281c8b2c77c5cd876f937c6519f04 100644 (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, 2 July 2024).
+Bash shell (version 5.3, 25 July 2024).
 
-   This is Edition 5.3, last updated 2 July 2024, of â€˜The GNU Bash
+   This is Edition 5.3, last updated 25 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, 2 July 2024).  The Bash home page is
+Bash shell (version 5.3, 25 July 2024).  The Bash home page is
 <http://www.gnu.org/software/bash/>.
 
-   This is Edition 5.3, last updated 2 July 2024, of â€˜The GNU Bash
+   This is Edition 5.3, last updated 25 July 2024, of â€˜The GNU Bash
 Reference Manual’, for â€˜Bash’, Version 5.3.
 
    Bash contains features that appear in other popular shells, and some
@@ -4930,6 +4930,10 @@ This builtin allows you to change additional shell optional behavior.
           executed as if it were the argument to the â€˜cd’ command.  This
           option is only used by interactive shells.
 
+     â€˜bash_source_fullpath’
+          If set, filenames added to the â€˜BASH_SOURCE’ array variable
+          are converted to full pathnames (*note Bash Variables::).
+
      â€˜cdable_vars’
           If this is set, an argument to the â€˜cd’ builtin command that
           is not a directory is assumed to be the name of a variable
@@ -12994,138 +12998,138 @@ D.5 Concept Index
 
 \1f
 Tag Table:
-Node: Top\7f891
-Node: Introduction\7f2822
-Node: What is Bash?\7f3035
-Node: What is a shell?\7f4176
-Node: Definitions\7f6755
-Node: Basic Shell Features\7f9931
-Node: Shell Syntax\7f11151
-Node: Shell Operation\7f12178
-Node: Quoting\7f13476
-Node: Escape Character\7f14789
-Node: Single Quotes\7f15287
-Node: Double Quotes\7f15636
-Node: ANSI-C Quoting\7f16979
-Node: Locale Translation\7f18364
-Node: Creating Internationalized Scripts\7f19708
-Node: Comments\7f23906
-Node: Shell Commands\7f24541
-Node: Reserved Words\7f25480
-Node: Simple Commands\7f26345
-Node: Pipelines\7f27004
-Node: Lists\7f30067
-Node: Compound Commands\7f31939
-Node: Looping Constructs\7f32948
-Node: Conditional Constructs\7f35492
-Node: Command Grouping\7f50313
-Node: Coprocesses\7f51800
-Node: GNU Parallel\7f54496
-Node: Shell Functions\7f55414
-Node: Shell Parameters\7f63520
-Node: Positional Parameters\7f68053
-Node: Special Parameters\7f68988
-Node: Shell Expansions\7f72294
-Node: Brace Expansion\7f74483
-Node: Tilde Expansion\7f77146
-Node: Shell Parameter Expansion\7f79912
-Node: Command Substitution\7f99019
-Node: Arithmetic Expansion\7f102552
-Node: Process Substitution\7f103517
-Node: Word Splitting\7f104654
-Node: Filename Expansion\7f106795
-Node: Pattern Matching\7f109891
-Node: Quote Removal\7f115124
-Node: Redirections\7f115428
-Node: Executing Commands\7f125237
-Node: Simple Command Expansion\7f125904
-Node: Command Search and Execution\7f128015
-Node: Command Execution Environment\7f130423
-Node: Environment\7f133732
-Node: Exit Status\7f135436
-Node: Signals\7f137221
-Node: Shell Scripts\7f140835
-Node: Shell Builtin Commands\7f143927
-Node: Bourne Shell Builtins\7f146038
-Node: Bash Builtins\7f170808
-Node: Modifying Shell Behavior\7f205822
-Node: The Set Builtin\7f206164
-Node: The Shopt Builtin\7f217679
-Node: Special Builtins\7f234466
-Node: Shell Variables\7f235455
-Node: Bourne Shell Variables\7f235889
-Node: Bash Variables\7f238082
-Node: Bash Features\7f275247
-Node: Invoking Bash\7f276261
-Node: Bash Startup Files\7f282660
-Node: Interactive Shells\7f287963
-Node: What is an Interactive Shell?\7f288371
-Node: Is this Shell Interactive?\7f289037
-Node: Interactive Shell Behavior\7f289861
-Node: Bash Conditional Expressions\7f293615
-Node: Shell Arithmetic\7f298789
-Node: Aliases\7f301871
-Node: Arrays\7f304826
-Node: The Directory Stack\7f311625
-Node: Directory Stack Builtins\7f312422
-Node: Controlling the Prompt\7f316871
-Node: The Restricted Shell\7f320009
-Node: Bash POSIX Mode\7f322796
-Node: Shell Compatibility Mode\7f340307
-Node: Job Control\7f349074
-Node: Job Control Basics\7f349531
-Node: Job Control Builtins\7f354705
-Node: Job Control Variables\7f360665
-Node: Command Line Editing\7f361842
-Node: Introduction and Notation\7f363546
-Node: Readline Interaction\7f365190
-Node: Readline Bare Essentials\7f366378
-Node: Readline Movement Commands\7f368196
-Node: Readline Killing Commands\7f369193
-Node: Readline Arguments\7f371171
-Node: Searching\7f372228
-Node: Readline Init File\7f374457
-Node: Readline Init File Syntax\7f375739
-Node: Conditional Init Constructs\7f400677
-Node: Sample Init File\7f405042
-Node: Bindable Readline Commands\7f408163
-Node: Commands For Moving\7f409388
-Node: Commands For History\7f411615
-Node: Commands For Text\7f416820
-Node: Commands For Killing\7f420954
-Node: Numeric Arguments\7f423755
-Node: Commands For Completion\7f424907
-Node: Keyboard Macros\7f429223
-Node: Miscellaneous Commands\7f429924
-Node: Readline vi Mode\7f436578
-Node: Programmable Completion\7f437530
-Node: Programmable Completion Builtins\7f445487
-Node: A Programmable Completion Example\7f457053
-Node: Using History Interactively\7f462398
-Node: Bash History Facilities\7f463079
-Node: Bash History Builtins\7f466191
-Node: History Interaction\7f471434
-Node: Event Designators\7f475759
-Node: Word Designators\7f477342
-Node: Modifiers\7f479328
-Node: Installing Bash\7f481237
-Node: Basic Installation\7f482371
-Node: Compilers and Options\7f486250
-Node: Compiling For Multiple Architectures\7f487000
-Node: Installation Names\7f488749
-Node: Specifying the System Type\7f490983
-Node: Sharing Defaults\7f491729
-Node: Operation Controls\7f492443
-Node: Optional Features\7f493462
-Node: Reporting Bugs\7f505264
-Node: Major Differences From The Bourne Shell\7f506613
-Node: GNU Free Documentation License\7f526348
-Node: Indexes\7f551525
-Node: Builtin Index\7f551976
-Node: Reserved Word Index\7f559074
-Node: Variable Index\7f561519
-Node: Function Index\7f578650
-Node: Concept Index\7f592506
+Node: Top\7f893
+Node: Introduction\7f2826
+Node: What is Bash?\7f3039
+Node: What is a shell?\7f4180
+Node: Definitions\7f6759
+Node: Basic Shell Features\7f9935
+Node: Shell Syntax\7f11155
+Node: Shell Operation\7f12182
+Node: Quoting\7f13480
+Node: Escape Character\7f14793
+Node: Single Quotes\7f15291
+Node: Double Quotes\7f15640
+Node: ANSI-C Quoting\7f16983
+Node: Locale Translation\7f18368
+Node: Creating Internationalized Scripts\7f19712
+Node: Comments\7f23910
+Node: Shell Commands\7f24545
+Node: Reserved Words\7f25484
+Node: Simple Commands\7f26349
+Node: Pipelines\7f27008
+Node: Lists\7f30071
+Node: Compound Commands\7f31943
+Node: Looping Constructs\7f32952
+Node: Conditional Constructs\7f35496
+Node: Command Grouping\7f50317
+Node: Coprocesses\7f51804
+Node: GNU Parallel\7f54500
+Node: Shell Functions\7f55418
+Node: Shell Parameters\7f63524
+Node: Positional Parameters\7f68057
+Node: Special Parameters\7f68992
+Node: Shell Expansions\7f72298
+Node: Brace Expansion\7f74487
+Node: Tilde Expansion\7f77150
+Node: Shell Parameter Expansion\7f79916
+Node: Command Substitution\7f99023
+Node: Arithmetic Expansion\7f102556
+Node: Process Substitution\7f103521
+Node: Word Splitting\7f104658
+Node: Filename Expansion\7f106799
+Node: Pattern Matching\7f109895
+Node: Quote Removal\7f115128
+Node: Redirections\7f115432
+Node: Executing Commands\7f125241
+Node: Simple Command Expansion\7f125908
+Node: Command Search and Execution\7f128019
+Node: Command Execution Environment\7f130427
+Node: Environment\7f133736
+Node: Exit Status\7f135440
+Node: Signals\7f137225
+Node: Shell Scripts\7f140839
+Node: Shell Builtin Commands\7f143931
+Node: Bourne Shell Builtins\7f146042
+Node: Bash Builtins\7f170812
+Node: Modifying Shell Behavior\7f205826
+Node: The Set Builtin\7f206168
+Node: The Shopt Builtin\7f217683
+Node: Special Builtins\7f234645
+Node: Shell Variables\7f235634
+Node: Bourne Shell Variables\7f236068
+Node: Bash Variables\7f238261
+Node: Bash Features\7f275426
+Node: Invoking Bash\7f276440
+Node: Bash Startup Files\7f282839
+Node: Interactive Shells\7f288142
+Node: What is an Interactive Shell?\7f288550
+Node: Is this Shell Interactive?\7f289216
+Node: Interactive Shell Behavior\7f290040
+Node: Bash Conditional Expressions\7f293794
+Node: Shell Arithmetic\7f298968
+Node: Aliases\7f302050
+Node: Arrays\7f305005
+Node: The Directory Stack\7f311804
+Node: Directory Stack Builtins\7f312601
+Node: Controlling the Prompt\7f317050
+Node: The Restricted Shell\7f320188
+Node: Bash POSIX Mode\7f322975
+Node: Shell Compatibility Mode\7f340486
+Node: Job Control\7f349253
+Node: Job Control Basics\7f349710
+Node: Job Control Builtins\7f354884
+Node: Job Control Variables\7f360844
+Node: Command Line Editing\7f362021
+Node: Introduction and Notation\7f363725
+Node: Readline Interaction\7f365369
+Node: Readline Bare Essentials\7f366557
+Node: Readline Movement Commands\7f368375
+Node: Readline Killing Commands\7f369372
+Node: Readline Arguments\7f371350
+Node: Searching\7f372407
+Node: Readline Init File\7f374636
+Node: Readline Init File Syntax\7f375918
+Node: Conditional Init Constructs\7f400856
+Node: Sample Init File\7f405221
+Node: Bindable Readline Commands\7f408342
+Node: Commands For Moving\7f409567
+Node: Commands For History\7f411794
+Node: Commands For Text\7f416999
+Node: Commands For Killing\7f421133
+Node: Numeric Arguments\7f423934
+Node: Commands For Completion\7f425086
+Node: Keyboard Macros\7f429402
+Node: Miscellaneous Commands\7f430103
+Node: Readline vi Mode\7f436757
+Node: Programmable Completion\7f437709
+Node: Programmable Completion Builtins\7f445666
+Node: A Programmable Completion Example\7f457232
+Node: Using History Interactively\7f462577
+Node: Bash History Facilities\7f463258
+Node: Bash History Builtins\7f466370
+Node: History Interaction\7f471613
+Node: Event Designators\7f475938
+Node: Word Designators\7f477521
+Node: Modifiers\7f479507
+Node: Installing Bash\7f481416
+Node: Basic Installation\7f482550
+Node: Compilers and Options\7f486429
+Node: Compiling For Multiple Architectures\7f487179
+Node: Installation Names\7f488928
+Node: Specifying the System Type\7f491162
+Node: Sharing Defaults\7f491908
+Node: Operation Controls\7f492622
+Node: Optional Features\7f493641
+Node: Reporting Bugs\7f505443
+Node: Major Differences From The Bourne Shell\7f506792
+Node: GNU Free Documentation License\7f526527
+Node: Indexes\7f551704
+Node: Builtin Index\7f552155
+Node: Reserved Word Index\7f559253
+Node: Variable Index\7f561698
+Node: Function Index\7f578829
+Node: Concept Index\7f592685
 \1f
 End Tag Table
 
index b9dba237fff32e3784f4f13e71f76a239db70538..ce05639dd9a6581252d633771cfcd3ece213144e 100644 (file)
Binary files a/doc/bash.pdf and b/doc/bash.pdf differ
index 242e27b3eed291cc09ef485b75594126ff52e5c7..fcd6573cf296f15fd98af3f3bbe39a5a859f6800 100644 (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, 2 July 2024).
+the Bash shell (version 5.3, 25 July 2024).
 
-This is Edition 5.3, last updated 2 July 2024,
+This is Edition 5.3, last updated 25 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, 2 July 2024).
+the Bash shell (version 5.3, 25 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 2 July 2024,
+<p>This is Edition 5.3, last updated 25 July 2024,
 of <cite class="cite">The GNU Bash Reference Manual</cite>,
 for <code class="code">Bash</code>, Version 5.3.
 </p>
@@ -6487,6 +6487,11 @@ it were the argument to the <code class="code">cd</code> command.
 This option is only used by interactive shells.
 </p>
 </dd>
+<dt><code class="code">bash_source_fullpath</code></dt>
+<dd><p>If set, filenames added to the <code class="code">BASH_SOURCE</code> array variable are
+converted to full pathnames (see <a class="pxref" href="#Bash-Variables">Bash Variables</a>).
+</p>
+</dd>
 <dt><code class="code">cdable_vars</code></dt>
 <dd><p>If this is set, an argument to the <code class="code">cd</code> builtin command that
 is not a directory is assumed to be the name of a variable whose
index a2e969d501443a16f985419e0f1ff327c29209ee..8feb83dd4c4d5b47338c32fe3eda3d0b048fbaea 100644 (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, 2 July 2024).
+Bash shell (version 5.3, 25 July 2024).
 
-   This is Edition 5.3, last updated 2 July 2024, of â€˜The GNU Bash
+   This is Edition 5.3, last updated 25 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, 2 July 2024).  The Bash home page is
+Bash shell (version 5.3, 25 July 2024).  The Bash home page is
 <http://www.gnu.org/software/bash/>.
 
-   This is Edition 5.3, last updated 2 July 2024, of â€˜The GNU Bash
+   This is Edition 5.3, last updated 25 July 2024, of â€˜The GNU Bash
 Reference Manual’, for â€˜Bash’, Version 5.3.
 
    Bash contains features that appear in other popular shells, and some
@@ -4931,6 +4931,10 @@ This builtin allows you to change additional shell optional behavior.
           executed as if it were the argument to the â€˜cd’ command.  This
           option is only used by interactive shells.
 
+     â€˜bash_source_fullpath’
+          If set, filenames added to the â€˜BASH_SOURCE’ array variable
+          are converted to full pathnames (*note Bash Variables::).
+
      â€˜cdable_vars’
           If this is set, an argument to the â€˜cd’ builtin command that
           is not a directory is assumed to be the name of a variable
@@ -12995,138 +12999,138 @@ D.5 Concept Index
 
 \1f
 Tag Table:
-Node: Top\7f894
-Node: Introduction\7f2828
-Node: What is Bash?\7f3044
-Node: What is a shell?\7f4188
-Node: Definitions\7f6770
-Node: Basic Shell Features\7f9949
-Node: Shell Syntax\7f11172
-Node: Shell Operation\7f12202
-Node: Quoting\7f13503
-Node: Escape Character\7f14819
-Node: Single Quotes\7f15320
-Node: Double Quotes\7f15672
-Node: ANSI-C Quoting\7f17018
-Node: Locale Translation\7f18406
-Node: Creating Internationalized Scripts\7f19753
-Node: Comments\7f23954
-Node: Shell Commands\7f24592
-Node: Reserved Words\7f25534
-Node: Simple Commands\7f26402
-Node: Pipelines\7f27064
-Node: Lists\7f30130
-Node: Compound Commands\7f32005
-Node: Looping Constructs\7f33017
-Node: Conditional Constructs\7f35564
-Node: Command Grouping\7f50388
-Node: Coprocesses\7f51878
-Node: GNU Parallel\7f54577
-Node: Shell Functions\7f55498
-Node: Shell Parameters\7f63607
-Node: Positional Parameters\7f68143
-Node: Special Parameters\7f69081
-Node: Shell Expansions\7f72390
-Node: Brace Expansion\7f74582
-Node: Tilde Expansion\7f77248
-Node: Shell Parameter Expansion\7f80017
-Node: Command Substitution\7f99127
-Node: Arithmetic Expansion\7f102663
-Node: Process Substitution\7f103631
-Node: Word Splitting\7f104771
-Node: Filename Expansion\7f106915
-Node: Pattern Matching\7f110014
-Node: Quote Removal\7f115250
-Node: Redirections\7f115557
-Node: Executing Commands\7f125369
-Node: Simple Command Expansion\7f126039
-Node: Command Search and Execution\7f128153
-Node: Command Execution Environment\7f130564
-Node: Environment\7f133876
-Node: Exit Status\7f135583
-Node: Signals\7f137371
-Node: Shell Scripts\7f140988
-Node: Shell Builtin Commands\7f144083
-Node: Bourne Shell Builtins\7f146197
-Node: Bash Builtins\7f170970
-Node: Modifying Shell Behavior\7f205987
-Node: The Set Builtin\7f206332
-Node: The Shopt Builtin\7f217850
-Node: Special Builtins\7f234640
-Node: Shell Variables\7f235632
-Node: Bourne Shell Variables\7f236069
-Node: Bash Variables\7f238265
-Node: Bash Features\7f275433
-Node: Invoking Bash\7f276450
-Node: Bash Startup Files\7f282852
-Node: Interactive Shells\7f288158
-Node: What is an Interactive Shell?\7f288569
-Node: Is this Shell Interactive?\7f289238
-Node: Interactive Shell Behavior\7f290065
-Node: Bash Conditional Expressions\7f293822
-Node: Shell Arithmetic\7f298999
-Node: Aliases\7f302084
-Node: Arrays\7f305042
-Node: The Directory Stack\7f311844
-Node: Directory Stack Builtins\7f312644
-Node: Controlling the Prompt\7f317096
-Node: The Restricted Shell\7f320237
-Node: Bash POSIX Mode\7f323027
-Node: Shell Compatibility Mode\7f340541
-Node: Job Control\7f349311
-Node: Job Control Basics\7f349771
-Node: Job Control Builtins\7f354948
-Node: Job Control Variables\7f360911
-Node: Command Line Editing\7f362091
-Node: Introduction and Notation\7f363798
-Node: Readline Interaction\7f365445
-Node: Readline Bare Essentials\7f366636
-Node: Readline Movement Commands\7f368457
-Node: Readline Killing Commands\7f369457
-Node: Readline Arguments\7f371438
-Node: Searching\7f372498
-Node: Readline Init File\7f374730
-Node: Readline Init File Syntax\7f376015
-Node: Conditional Init Constructs\7f400956
-Node: Sample Init File\7f405324
-Node: Bindable Readline Commands\7f408448
-Node: Commands For Moving\7f409676
-Node: Commands For History\7f411906
-Node: Commands For Text\7f417114
-Node: Commands For Killing\7f421251
-Node: Numeric Arguments\7f424055
-Node: Commands For Completion\7f425210
-Node: Keyboard Macros\7f429529
-Node: Miscellaneous Commands\7f430233
-Node: Readline vi Mode\7f436890
-Node: Programmable Completion\7f437845
-Node: Programmable Completion Builtins\7f445805
-Node: A Programmable Completion Example\7f457374
-Node: Using History Interactively\7f462722
-Node: Bash History Facilities\7f463406
-Node: Bash History Builtins\7f466521
-Node: History Interaction\7f471767
-Node: Event Designators\7f476095
-Node: Word Designators\7f477681
-Node: Modifiers\7f479670
-Node: Installing Bash\7f481582
-Node: Basic Installation\7f482719
-Node: Compilers and Options\7f486601
-Node: Compiling For Multiple Architectures\7f487354
-Node: Installation Names\7f489106
-Node: Specifying the System Type\7f491343
-Node: Sharing Defaults\7f492092
-Node: Operation Controls\7f492809
-Node: Optional Features\7f493831
-Node: Reporting Bugs\7f505636
-Node: Major Differences From The Bourne Shell\7f506988
-Node: GNU Free Documentation License\7f526726
-Node: Indexes\7f551906
-Node: Builtin Index\7f552360
-Node: Reserved Word Index\7f559461
-Node: Variable Index\7f561909
-Node: Function Index\7f579043
-Node: Concept Index\7f592902
+Node: Top\7f896
+Node: Introduction\7f2832
+Node: What is Bash?\7f3048
+Node: What is a shell?\7f4192
+Node: Definitions\7f6774
+Node: Basic Shell Features\7f9953
+Node: Shell Syntax\7f11176
+Node: Shell Operation\7f12206
+Node: Quoting\7f13507
+Node: Escape Character\7f14823
+Node: Single Quotes\7f15324
+Node: Double Quotes\7f15676
+Node: ANSI-C Quoting\7f17022
+Node: Locale Translation\7f18410
+Node: Creating Internationalized Scripts\7f19757
+Node: Comments\7f23958
+Node: Shell Commands\7f24596
+Node: Reserved Words\7f25538
+Node: Simple Commands\7f26406
+Node: Pipelines\7f27068
+Node: Lists\7f30134
+Node: Compound Commands\7f32009
+Node: Looping Constructs\7f33021
+Node: Conditional Constructs\7f35568
+Node: Command Grouping\7f50392
+Node: Coprocesses\7f51882
+Node: GNU Parallel\7f54581
+Node: Shell Functions\7f55502
+Node: Shell Parameters\7f63611
+Node: Positional Parameters\7f68147
+Node: Special Parameters\7f69085
+Node: Shell Expansions\7f72394
+Node: Brace Expansion\7f74586
+Node: Tilde Expansion\7f77252
+Node: Shell Parameter Expansion\7f80021
+Node: Command Substitution\7f99131
+Node: Arithmetic Expansion\7f102667
+Node: Process Substitution\7f103635
+Node: Word Splitting\7f104775
+Node: Filename Expansion\7f106919
+Node: Pattern Matching\7f110018
+Node: Quote Removal\7f115254
+Node: Redirections\7f115561
+Node: Executing Commands\7f125373
+Node: Simple Command Expansion\7f126043
+Node: Command Search and Execution\7f128157
+Node: Command Execution Environment\7f130568
+Node: Environment\7f133880
+Node: Exit Status\7f135587
+Node: Signals\7f137375
+Node: Shell Scripts\7f140992
+Node: Shell Builtin Commands\7f144087
+Node: Bourne Shell Builtins\7f146201
+Node: Bash Builtins\7f170974
+Node: Modifying Shell Behavior\7f205991
+Node: The Set Builtin\7f206336
+Node: The Shopt Builtin\7f217854
+Node: Special Builtins\7f234819
+Node: Shell Variables\7f235811
+Node: Bourne Shell Variables\7f236248
+Node: Bash Variables\7f238444
+Node: Bash Features\7f275612
+Node: Invoking Bash\7f276629
+Node: Bash Startup Files\7f283031
+Node: Interactive Shells\7f288337
+Node: What is an Interactive Shell?\7f288748
+Node: Is this Shell Interactive?\7f289417
+Node: Interactive Shell Behavior\7f290244
+Node: Bash Conditional Expressions\7f294001
+Node: Shell Arithmetic\7f299178
+Node: Aliases\7f302263
+Node: Arrays\7f305221
+Node: The Directory Stack\7f312023
+Node: Directory Stack Builtins\7f312823
+Node: Controlling the Prompt\7f317275
+Node: The Restricted Shell\7f320416
+Node: Bash POSIX Mode\7f323206
+Node: Shell Compatibility Mode\7f340720
+Node: Job Control\7f349490
+Node: Job Control Basics\7f349950
+Node: Job Control Builtins\7f355127
+Node: Job Control Variables\7f361090
+Node: Command Line Editing\7f362270
+Node: Introduction and Notation\7f363977
+Node: Readline Interaction\7f365624
+Node: Readline Bare Essentials\7f366815
+Node: Readline Movement Commands\7f368636
+Node: Readline Killing Commands\7f369636
+Node: Readline Arguments\7f371617
+Node: Searching\7f372677
+Node: Readline Init File\7f374909
+Node: Readline Init File Syntax\7f376194
+Node: Conditional Init Constructs\7f401135
+Node: Sample Init File\7f405503
+Node: Bindable Readline Commands\7f408627
+Node: Commands For Moving\7f409855
+Node: Commands For History\7f412085
+Node: Commands For Text\7f417293
+Node: Commands For Killing\7f421430
+Node: Numeric Arguments\7f424234
+Node: Commands For Completion\7f425389
+Node: Keyboard Macros\7f429708
+Node: Miscellaneous Commands\7f430412
+Node: Readline vi Mode\7f437069
+Node: Programmable Completion\7f438024
+Node: Programmable Completion Builtins\7f445984
+Node: A Programmable Completion Example\7f457553
+Node: Using History Interactively\7f462901
+Node: Bash History Facilities\7f463585
+Node: Bash History Builtins\7f466700
+Node: History Interaction\7f471946
+Node: Event Designators\7f476274
+Node: Word Designators\7f477860
+Node: Modifiers\7f479849
+Node: Installing Bash\7f481761
+Node: Basic Installation\7f482898
+Node: Compilers and Options\7f486780
+Node: Compiling For Multiple Architectures\7f487533
+Node: Installation Names\7f489285
+Node: Specifying the System Type\7f491522
+Node: Sharing Defaults\7f492271
+Node: Operation Controls\7f492988
+Node: Optional Features\7f494010
+Node: Reporting Bugs\7f505815
+Node: Major Differences From The Bourne Shell\7f507167
+Node: GNU Free Documentation License\7f526905
+Node: Indexes\7f552085
+Node: Builtin Index\7f552539
+Node: Reserved Word Index\7f559640
+Node: Variable Index\7f562088
+Node: Function Index\7f579222
+Node: Concept Index\7f593081
 \1f
 End Tag Table
 
index ca9aa841b423926ad9a3aef5da045a4481bcc9be..d77f347c05fd9265d15e69b2258f6f0d735f2a6e 100644 (file)
@@ -1,12 +1,12 @@
-This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024/MacPorts 2024.70613_0) (preloaded format=etex 2024.4.9)  9 JUL 2024 10:37
+This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024/MacPorts 2024.70613_0) (preloaded format=pdfetex 2024.4.9)  25 JUL 2024 11:43
 entering extended mode
  restricted \write18 enabled.
  file:line:error style messages enabled.
  %&-line parsing enabled.
-**\nonstopmode \input /usr/local/src/bash/bash-20240709/doc/bashref.texi \input
- /usr/local/src/bash/bash-20240709/doc/bashref.texi
-(/usr/local/src/bash/bash-20240709/doc/bashref.texi
-(/usr/local/src/bash/bash-20240709/doc/texinfo.tex
+**\input /usr/local/src/bash/bash-20240724/doc/bashref.texi \input /usr/local/s
+rc/bash/bash-20240724/doc/bashref.texi
+(/usr/local/src/bash/bash-20240724/doc/bashref.texi
+(/usr/local/src/bash/bash-20240724/doc/texinfo.tex
 Loading texinfo [version 2015-11-22.14]:
 \outerhsize=\dimen16
 \outervsize=\dimen17
@@ -162,20 +162,23 @@ This is `epsf.tex' v2.7.4 <14 February 2011>
 texinfo.tex: doing @include of version.texi
 
 
-(/usr/local/src/bash/bash-20240709/doc/version.texi) [1] [2]
-(/usr/local/build/bash/bash-20240709/doc/bashref.toc [-1] [-2] [-3]) [-4]
-Chapter 1
+(/usr/local/src/bash/bash-20240724/doc/version.texi) [1{/opt/local/var/db/texmf
+/fonts/map/pdftex/updmap/pdftex.map}] [2]
+(/usr/local/build/bash/bash-20240724/doc/bashref.toc [-1] [-2] [-3]) [-4]
+(/usr/local/build/bash/bash-20240724/doc/bashref.toc)
+(/usr/local/build/bash/bash-20240724/doc/bashref.toc) Chapter 1
 \openout0 = `bashref.toc'.
 
- (/usr/local/build/bash/bash-20240709/doc/bashref.aux)
+
+(/usr/local/build/bash/bash-20240724/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'.
 
@@ -218,15 +221,16 @@ Overfull \hbox (5.95723pt too wide) in paragraph at lines 724--725
 @rwindfile=@write4
 \openout4 = `bashref.rw'.
 
-[9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23]
-[24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38]
-[39] [40] [41] [42] [43] [44] [45] [46] [47] Chapter 4 [48]
+[9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19{/opt/local/share/texmf-tex
+live/fonts/enc/dvips/cm-super/cm-super-t1.enc}] [20] [21] [22] [23] [24]
+[25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39]
+[40] [41] [42] [43] [44] [45] [46] [47] Chapter 4 [48]
 @btindfile=@write5
 \openout5 = `bashref.bt'.
 
- [49] [50] [51]
-[52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66]
-[67] [68]
+ [49] [50] [51] [52]
+[53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66] [67]
+[68]
 Overfull \hbox (38.26585pt too wide) in paragraph at lines 5446--5446
  []@texttt set [-abefhkmnptuvxBCEHPT] [-o @textttsl option-name@texttt ] [--] [
 -] [@textttsl ar-gu-ment []@texttt ][] 
@@ -259,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-20240709/lib/readline/doc/rluser.texi
+ (/usr/local/src/bash/bash-20240724/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
@@ -309,10 +313,10 @@ gnored[]
 texinfo.tex: doing @include of hsuser.texi
 
 
-(/usr/local/src/bash/bash-20240709/lib/readline/doc/hsuser.texi Chapter 9
+(/usr/local/src/bash/bash-20240724/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 9842--9851
+Underfull \hbox (badness 10000) in paragraph at lines 9846--9855
 []@textrm All of the fol-low-ing op-tions ex-cept for `@texttt alt-array-implem
 entation[]@textrm '[],
 
@@ -325,7 +329,7 @@ entation[]@textrm '[],
 .etc.
 
 
-Underfull \hbox (badness 10000) in paragraph at lines 9842--9851
+Underfull \hbox (badness 10000) in paragraph at lines 9846--9855
 @textrm `@texttt disabled-builtins[]@textrm '[], `@texttt direxpand-default[]@t
 extrm '[], `@texttt strict-posix-default[]@textrm '[], and
 
@@ -341,16 +345,37 @@ extrm '[], `@texttt strict-posix-default[]@textrm '[], and
 [178] [179] Appendix C [180]
 texinfo.tex: doing @include of fdl.texi
 
- (/usr/local/src/bash/bash-20240709/doc/fdl.texi
+ (/usr/local/src/bash/bash-20240724/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:
3531 strings out of 495850
- 40273 string characters out of 6172145
89061 words of memory out of 5000000
4879 multiletter control sequences out of 15000+600000
4105 strings out of 495840
+ 47629 string characters out of 6171739
143269 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
- 16i,6n,16p,402b,942s stack positions out of 10000i,1000n,20000p,200000b,200000s
+ 16i,6n,16p,389b,983s stack positions out of 10000i,1000n,20000p,200000b,200000s
+</opt/local/share/texmf-texlive/font
+s/type1/public/amsfonts/cm/cmbx12.pfb></opt/local/share/texmf-texlive/fonts/typ
+e1/public/amsfonts/cm/cmcsc10.pfb></opt/local/share/texmf-texlive/fonts/type1/p
+ublic/amsfonts/cm/cmmi10.pfb></opt/local/share/texmf-texlive/fonts/type1/public
+/amsfonts/cm/cmmi12.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsf
+onts/cm/cmmi9.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/c
+m/cmr10.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></o
+pt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmsy10.pfb></opt/lo
+cal/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmti10.pfb></opt/local/s
+hare/texmf-texlive/fonts/type1/public/amsfonts/cm/cmtt10.pfb></opt/local/share/
+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, 820845 bytes).
+PDF statistics:
+ 2837 PDF objects out of 2984 (max. 8388607)
+ 2587 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)
 
-Output written on bashref.dvi (203 pages, 855852 bytes).
index a10e3caba38efafb16ff2719bd2f3fa4f198881a..6e0f67eb001f1183176f150cc0e182bad6508b18 100644 (file)
Binary files a/doc/bashref.pdf and b/doc/bashref.pdf differ
index 510b43f6fa767378ebba3d57aaad139daf35c1af..ce9e1690d541c1548110e764ee4ca94c68656b5c 100644 (file)
@@ -849,8 +849,8 @@ the standard input for asynchronous commands, in the absence of any
 explicit redirections, is redirected from @code{/dev/null}.
 
 Commands separated by a @samp{;} are executed sequentially; the shell
-waits for each command to terminate in turn.  The return status is the
-exit status of the last command executed.
+waits for each command to terminate in turn.
+The return status is the exit status of the last command executed.
 
 @sc{and} and @sc{or} lists are sequences of one or more pipelines
 separated by the control operators @samp{&&} and @samp{||},
@@ -5481,7 +5481,8 @@ command list immediately following a @code{while} or @code{until} keyword,
 part of the test in an @code{if} statement,
 part of any command executed in a @code{&&} or @code{||} list except
 the command following the final @code{&&} or @code{||},
-any command in a pipeline but the last,
+any command in a pipeline but the last
+(subject to the state of the @code{pipefail} shell option),
 or if the command's return status is being inverted with @code{!}.
 If a compound command other than a subshell
 returns a non-zero status because a command failed
@@ -5813,6 +5814,10 @@ If set, a command name that is the name of a directory is executed as if
 it were the argument to the @code{cd} command.
 This option is only used by interactive shells.
 
+@item bash_source_fullpath
+If set, filenames added to the @code{BASH_SOURCE} array variable are
+converted to full pathnames (@pxref{Bash Variables}).
+
 @item cdable_vars
 If this is set, an argument to the @code{cd} builtin command that
 is not a directory is assumed to be the name of a variable whose
@@ -9337,40 +9342,45 @@ or non-zero if an error occurs or an invalid option is encountered.
 @item wait
 @btindex wait
 @example
-wait [-fn] [-p @var{varname}] [@var{jobspec} or @var{pid} @dots{}]
+wait [-fn] [-p @var{varname}] [@var{id} @dots{}]
 @end example
 
-Wait until the child process specified by each process @sc{id} @var{pid}
-or job specification @var{jobspec} exits and return the exit status of the
-last command waited for.
-If a job spec is given, all processes in the job are waited for.
-If no arguments are given,
+Wait until the child process specified by each @var{id} exits and
+return the exit status of the last @var{id}.
+Each @var{id} may be a @var{pid} or job specification @var{jobspec};
+if a job spec is given, @code{wait} waits for all processes in the job.
+
+If no options or @var{id}s are supplied,
 @code{wait} waits for all running background jobs and
-the last-executed process substitution, if its process id is the same as
-@var{$!},
+the last-executed process substitution,
+if its process id is the same as @var{$!},
 and the return status is zero.
-If the @option{-n} option is supplied, @code{wait} waits for a single job
-from the list of @var{pid}s or @var{jobspec}s or, if no arguments are
-supplied, any job, 
+
+If the @option{-n} option is supplied, @code{wait} waits for any one of
+the @var{id}s or, if no @var{id}s are supplied, any job
+or process substitution,
 to complete and returns its exit status.
-If none of the supplied arguments is a child of the shell, or if no arguments
-are supplied and the shell has no unwaited-for children, the exit status
-is 127.
-If the @option{-p} option is supplied, the process or job identifier of the job
-for which the exit status is returned is assigned to the variable
-@var{varname} named by the option argument.
+If none of the supplied @var{id}s is a child of the shell,
+or if no arguments are supplied and the shell has no unwaited-for children,
+the exit status is 127.
+
+If the @option{-p} option is supplied, the process or job identifier
+of the job for which the exit status is returned is assigned to the
+variable @var{varname} named by the option argument.
 The variable will be unset initially, before any assignment.
 This is useful only when the @option{-n} option is supplied.
+
 Supplying the @option{-f} option, when job control is enabled,
-forces @code{wait} to wait for each @var{pid} or @var{jobspec} to
-terminate before returning its status, instead of returning when it changes
-status.
-If neither @var{jobspec} nor @var{pid} specifies an active child process
-of the shell, the return status is 127.
-If @code{wait} is interrupted by a signal, the return status will be greater
+forces @code{wait} to wait for each @var{id} to terminate before
+returning its status, instead of returning when it changes status.
+
+If none of the @var{id}s specify one of the shell's an active child
+processes, the return status is 127.
+If @code{wait} is interrupted by a signal,
+any @var{varname} will remain unset,
+and the return status will be greater
 than 128, as described above (@pxref{Signals}).
-Otherwise, the return status is the exit  status
-of the last process or job waited for.
+Otherwise, the return status is the exit  status of the last @var{id}.
 
 @item disown
 @btindex disown
index 42067f6c69270d7a5796f67b21be4120e528d916..8927b8a0513af06c4cd3183bc12036bf06ff90b5 100644 (file)
@@ -1423,6 +1423,10 @@ B\bBA\bAS\bSH\bH B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
               a\bau\but\bto\boc\bcd\bd  If set, a command name that is the name of  a  directory
                       is  executed  as  if it were the argument to the c\bcd\bd com-
                       mand.  This option is only used by interactive shells.
+              b\bba\bas\bsh\bh_\b_s\bso\bou\bur\brc\bce\be_\b_f\bfu\bul\bll\blp\bpa\bat\bth\bh
+                      If set, filenames added to the B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE  array  vari-
+                      able  are  converted  to full pathnames (see S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bi-\b-
+                      a\bab\bbl\ble\bes\bs above).
               c\bcd\bda\bab\bbl\ble\be_\b_v\bva\bar\brs\bs
                       If set, an argument to the c\bcd\bd builtin  command  that  is
                       not  a directory is assumed to be the name of a variable
index 08d1fb60d8174783582b3f55052837eddbbdb5cf..5e4e3d4e06beba254f0b1529f789def41943fa97 100644 (file)
@@ -2,10 +2,10 @@
 Copyright (C) 1988-2024 Free Software Foundation, Inc.
 @end ignore
 
-@set LASTCHANGE Tue Jul  2 14:29:06 EDT 2024
+@set LASTCHANGE Mon Jul 29 11:20:04 EDT 2024
 
 @set EDITION 5.3
 @set VERSION 5.3
 
-@set UPDATED 2 July 2024
+@set UPDATED 29 July 2024
 @set UPDATED-MONTH July 2024
index ac6408192d8434d46fc0e9c6bc2fc151602aee69..6fd69602e1cdfeca09f462724da2019f82c530ea 100644 (file)
@@ -1693,7 +1693,6 @@ execute_in_subshell (COMMAND *command, int asynchronous, int pipe_in, int pipe_o
 #if defined (PROCESS_SUBSTITUTION)
 #  if defined (JOB_CONTROL)
   procsub_clear ();
-  last_procsub_child = 0;
 #  endif
   clear_fifo_list ();          /* XXX- we haven't created any FIFOs */
 #endif
@@ -1743,10 +1742,7 @@ execute_in_subshell (COMMAND *command, int asynchronous, int pipe_in, int pipe_o
 #if 1
 #if defined (PROCESS_SUBSTITUTION) && defined (JOB_CONTROL)
       if (user_subshell && command->type == cm_subshell)
-       {
-         procsub_clear ();
-         last_procsub_child = 0;
-       }
+       procsub_clear ();
 #endif
 #endif
     }
@@ -5277,7 +5273,7 @@ execute_function (SHELL_VAR *var, WORD_LIST *words, int flags, struct fd_bitmap
   sfile = shell_fn ? shell_fn->source_file : "";
   array_push ((ARRAY *)funcname_a, this_shell_function->name);
 
-  array_push ((ARRAY *)bash_source_a, sfile);
+  push_source ((ARRAY *)bash_source_a, sfile);
   lineno = GET_LINE_NUMBER ();
   t = itos (lineno);
   array_push ((ARRAY *)bash_lineno_a, t);
index 62e080be743a32d34621683ad846f749f658e886..fadda9d3814e7f63129e79377a783aa6d31ca3fe 100644 (file)
--- a/hashcmd.c
+++ b/hashcmd.c
@@ -112,7 +112,7 @@ phash_insert (char *filename, char *full_path, int check_dot, int found)
   pathdata(item)->flags = 0;
   if (check_dot)
     pathdata(item)->flags |= HASH_CHKDOT;
-  if (*full_path != '/')
+  if (RELPATH (full_path))
     pathdata(item)->flags |= HASH_RELPATH;
   item->times_found = found;
 }
diff --git a/jobs.c b/jobs.c
index 26e907857940fc23b13bdaee50758db91e8b1f22..013a9e06dc7a9840e96c03f7d9f87dbe3a4bc4be 100644 (file)
--- a/jobs.c
+++ b/jobs.c
@@ -2826,8 +2826,12 @@ wait_for_background_pids (struct procstat *ps)
     }
 
 #if defined (PROCESS_SUBSTITUTION)
+#  if defined (WAIT_WAITS_FOR_ALL_PROCSUBS)
+  procsub_waitall ();
+#  else
   if (last_procsub_child && last_procsub_child->pid != NO_PID && last_procsub_child->pid == last_asynchronous_pid)
     procsub_waitpid (last_procsub_child->pid);
+#  endif
   delete_procsubs ();  /* closes fds or unlinks fifos */
 #endif
 
@@ -3474,7 +3478,7 @@ return_job:
       /* If we're waiting for specific pids, skip over ones we're not interested in. */
       if ((flags & JWAIT_WAITING) && (p->flags & PROC_WAITING) == 0)
        continue;
-#if 0
+#if defined (WAIT_N_WAITS_FOR_LAST_PROCSUB)
       /* If we want to restrict wait -n without pid arguments to only wait
         for last_procsub_child->pid, uncomment this. */
       if ((flags & JWAIT_WAITING) == 0 && p != last_procsub_child)
index 8a28cbd01e0797253f03aefd4f642a6c4bd35a13..21185f9dc098ca633ae5e05b76d1f260b0c311de 100644 (file)
@@ -90,8 +90,7 @@ char history_subst_char = '^';
 
 /* During tokenization, if this character is seen as the first character
    of a word, then it, and all subsequent characters up to a newline are
-   ignored.  For a Bourne shell, this should be '#'.  Bash special cases
-   the interactive comment character to not be a comment delimiter. */
+   ignored.  For a Bourne shell, this should be '#'. */
 char history_comment_char = '\0';
 
 /* The list of characters which inhibit the expansion of text if found
diff --git a/subst.c b/subst.c
index 37e0bfa75d0fdfac5785e6e1702beca0886c63de..251eafaf204af031c5d55f2853be7aa38e93b50d 100644 (file)
--- a/subst.c
+++ b/subst.c
@@ -6471,6 +6471,7 @@ process_substitute (char *string, int open_for_read_in_child)
       /* We assume that last_procsub_child->next == last_procsub_child because
         of how jobs.c:add_process() works. */
       last_procsub_child->next = 0;
+      last_procsub_pid = last_procsub_child->pid;
       procsub_add (last_procsub_child);
 #endif
 
index cd336c85b0be0035be300ba25391845baa459ace..6d717757a26b44498a3067dda517fefaa880f400 100644 (file)
@@ -170,6 +170,9 @@ int array_needs_making = 1;
    by initialize_variables (). */
 int shell_level = 0;
 
+/* If non-zero, each element of BASH_SOURCE contains a full pathnames */
+int bash_source_fullpath = 0;
+
 /* An array which is passed to commands as their environment.  It is
    manufactured from the union of the initial environment and the
    shell variables that are marked for export. */
@@ -915,7 +918,7 @@ set_pwd (void)
   /* Follow posix rules for importing PWD */
   if (temp_var && imported_p (temp_var) &&
       (temp_string = value_cell (temp_var)) &&
-      temp_string[0] == '/' &&
+      ABSPATH (temp_string) &&
       same_file (temp_string, ".", (struct stat *)NULL, (struct stat *)NULL))
     {
       current_dir = sh_canonpath (temp_string, PATH_CHECKDOTDOT|PATH_CHECKEXISTS);
@@ -1718,7 +1721,7 @@ assign_hashcmd (SHELL_VAR *self, char *value, arrayind_t ind, char *key)
 
   if (restricted)
     {
-      if (strchr (value, '/'))
+      if (absolute_program (value))
        {
          sh_restricted (value);
          return (SHELL_VAR *)NULL;
@@ -5694,7 +5697,18 @@ uw_pop_args (void *ignore)
 void
 push_source (ARRAY *a, char *filename)
 {
-   array_push (a, filename);
+  char *fn;
+  char pathname[PATH_MAX];
+
+  if (bash_source_fullpath)
+    {
+      if ((fn = sh_realpath (filename, pathname)) == 0)
+        fn = filename;
+    }
+  else
+    fn = filename;
+
+  array_push (a, fn);
 }
 #endif