interim fix for generic list functions to avoid pointer aliasing issues; documentation updates

This commit is contained in:
Chet Ramey
2026-05-08 11:36:36 -04:00
parent 330223688c
commit 669b32f676
36 changed files with 1124 additions and 889 deletions
+119 -96
View File
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 7.2 from
bashref.texi.
This text is a brief description of the features that are present in the
Bash shell (version 5.3, 16 March 2026).
Bash shell (version 5.3, 29 April 2026).
This is Edition 5.3, last updated 16 March 2026, of The GNU Bash
This is Edition 5.3, last updated 29 April 2026, of The GNU Bash
Reference Manual, for Bash, Version 5.3.
Copyright © 1988-2026 Free Software Foundation, Inc.
@@ -27,10 +27,10 @@ Bash Features
*************
This text is a brief description of the features that are present in the
Bash shell (version 5.3, 16 March 2026). The Bash home page is
Bash shell (version 5.3, 29 April 2026). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.3, last updated 16 March 2026, of The GNU Bash
This is Edition 5.3, last updated 29 April 2026, of The GNU Bash
Reference Manual, for Bash, Version 5.3.
Bash contains features that appear in other popular shells, and some
@@ -3362,7 +3362,7 @@ File: bashref.info, Node: Shell Scripts, Prev: Executing Commands, Up: Basic
3.8 Shell Scripts
=================
A shell script is a text file containing shell commands. When such a
A shell script is a text file containing shell commands. When such a
file is used as the first non-option argument when invoking Bash, and
neither the -c nor -s option is supplied (*note Invoking Bash::),
Bash reads and executes commands from the file, then exits. This mode
@@ -6667,6 +6667,12 @@ standard input and standard error are both connected to terminals (as
determined by isatty(3)), or one started with the -i option. *Note
Interactive Shells::, for more information.
A “non-interactive shell” is, not surprisingly, one that does not
satisfy the tests for interactivity given above. A non-interactive
shell is usually started to run commands from a script file supplied as
an argument (*note Shell Scripts::) or from a string supplied with the
-c option.
If arguments remain after option processing, and neither the -c nor
the -s option has been supplied, the first argument is treated as the
name of a file containing shell commands (*note Shell Scripts::). When
@@ -6678,6 +6684,22 @@ If no commands are executed, the exit status is 0. Bash first attempts
to open the file in the current directory, and, if no file is found,
searches the directories in PATH for the script.
For example, the following command starts an interactive shell:
bash
whereas this command will read and execute commands from filename:
bash filename
This command will execute echo hello:
bash -c 'echo hello'
and this will execute the same command read from the standard input:
echo echo hello | bash

File: bashref.info, Node: Bash Startup Files, Next: Interactive Shells, Prev: Invoking Bash, Up: Bash Features
@@ -6685,8 +6707,8 @@ File: bashref.info, Node: Bash Startup Files, Next: Interactive Shells, Prev:
======================
This section describes how Bash executes its startup files. If any of
the files exist but cannot be read, Bash reports an error. Tildes are
expanded in filenames as described above under Tilde Expansion (*note
the files exist but cannot be read, Bash reports an error. Tildes in
filenames are expanded as described above under Tilde Expansion (*note
Tilde Expansion::).
Interactive shells are described in *note Interactive Shells::.
@@ -6764,21 +6786,22 @@ Invoked in POSIX mode
When Bash is started in POSIX mode, as with the --posix command line
option, it follows the POSIX standard for startup files. In this mode,
interactive shells expand the ENV variable and read and execute
commands from the file whose name is the expanded value. No other
startup files are read.
commands from the file whose name is the expanded value. A posix-mode
shell does not attempt to read any other startup files, even when
invoked as a login shell.
Invoked by remote shell daemon
..............................
Bash attempts to determine when it is being run with its standard input
connected to a network connection, as when executed by the historical
and rarely-seen remote shell daemon, usually rshd, or the secure shell
daemon sshd. If Bash determines it is being run non-interactively in
connected to a network connection, as when executed by the secure shell
daemon sshd. or the historical and rarely-seen remote shell daemon,
usually rshd. If Bash determines it is being run non-interactively in
this fashion, it reads and executes commands from ~/.bashrc, if that
file exists and is readable. Bash does not read this file if invoked as
sh. The --norc option inhibits this behavior, and the --rcfile
option makes Bash use a different file instead of ~/.bashrc, but
neither rshd nor sshd generally invoke the shell with those options
neither sshd nor rshd generally invoke the shell with those options
or allow them to be specified.
Invoked with unequal effective and real UID/GIDs
@@ -6790,8 +6813,8 @@ files are read, shell functions are not inherited from the environment,
the SHELLOPTS, BASHOPTS, CDPATH, and GLOBIGNORE variables, if
they appear in the environment, are ignored, and the effective user id
is set to the real user id. If the -p option is supplied at
invocation, the startup behavior is the same, but the effective user id
is not reset.
invocation, the startup behavior is the same, but Bash does not reset
the effective user id.

File: bashref.info, Node: Interactive Shells, Next: Bash Conditional Expressions, Prev: Bash Startup Files, Up: Bash Features
@@ -13792,87 +13815,87 @@ Node: Environment141130
Node: Exit Status143036
Node: Signals145098
Node: Shell Scripts150049
Node: Shell Builtin Commands153350
Node: Bourne Shell Builtins155694
Node: Bash Builtins182416
Node: Modifying Shell Behavior220154
Node: The Set Builtin220499
Node: The Shopt Builtin232496
Node: Special Builtins249552
Node: Shell Variables250544
Node: Bourne Shell Variables250981
Node: Bash Variables253492
Node: Bash Features292779
Node: Invoking Bash293796
Node: Bash Startup Files300383
Node: Interactive Shells305628
Node: What is an Interactive Shell?306039
Node: Is this Shell Interactive?306704
Node: Interactive Shell Behavior307531
Node: Bash Conditional Expressions311295
Node: Shell Arithmetic316715
Node: Aliases320045
Node: Arrays323182
Node: The Directory Stack330887
Node: Directory Stack Builtins331687
Node: Controlling the Prompt336135
Node: The Restricted Shell339022
Node: Bash POSIX Mode342118
Node: Shell Compatibility Mode361937
Node: Job Control370947
Node: Job Control Basics371407
Node: Job Control Builtins377778
Node: Job Control Variables384569
Node: Command Line Editing385803
Node: Introduction and Notation387509
Node: Readline Interaction389864
Node: Readline Bare Essentials391055
Node: Readline Movement Commands392866
Node: Readline Killing Commands393865
Node: Readline Arguments395891
Node: Searching396984
Node: Readline Init File399230
Node: Readline Init File Syntax400536
Node: Conditional Init Constructs427490
Node: Sample Init File431878
Node: Bindable Readline Commands435001
Node: Commands For Moving436542
Node: Commands For History439009
Node: Commands For Text444403
Node: Commands For Killing448531
Node: Numeric Arguments451322
Node: Commands For Completion452477
Node: Keyboard Macros458176
Node: Miscellaneous Commands458880
Node: Readline vi Mode466426
Node: Programmable Completion467406
Node: Programmable Completion Builtins477145
Node: A Programmable Completion Example488885
Node: Using History Interactively494233
Node: Bash History Facilities494917
Node: Bash History Builtins498655
Node: History Interaction506253
Node: Event Designators511206
Node: Word Designators512787
Node: Modifiers515182
Node: Installing Bash517122
Node: Basic Installation518241
Node: Compilers and Options522120
Node: Compiling For Multiple Architectures522873
Node: Installation Names524629
Node: Specifying the System Type526866
Node: Sharing Defaults527615
Node: Operation Controls528332
Node: Optional Features529354
Node: Reporting Bugs542080
Node: Major Differences From The Bourne Shell543440
Node: GNU Free Documentation License564870
Node: Indexes590050
Node: Builtin Index590504
Node: Reserved Word Index597605
Node: Variable Index600053
Node: Function Index617469
Node: Concept Index631605
Node: Shell Builtin Commands153356
Node: Bourne Shell Builtins155700
Node: Bash Builtins182422
Node: Modifying Shell Behavior220160
Node: The Set Builtin220505
Node: The Shopt Builtin232502
Node: Special Builtins249558
Node: Shell Variables250550
Node: Bourne Shell Variables250987
Node: Bash Variables253498
Node: Bash Features292785
Node: Invoking Bash293802
Node: Bash Startup Files301035
Node: Interactive Shells306360
Node: What is an Interactive Shell?306771
Node: Is this Shell Interactive?307436
Node: Interactive Shell Behavior308263
Node: Bash Conditional Expressions312027
Node: Shell Arithmetic317447
Node: Aliases320777
Node: Arrays323914
Node: The Directory Stack331619
Node: Directory Stack Builtins332419
Node: Controlling the Prompt336867
Node: The Restricted Shell339754
Node: Bash POSIX Mode342850
Node: Shell Compatibility Mode362669
Node: Job Control371679
Node: Job Control Basics372139
Node: Job Control Builtins378510
Node: Job Control Variables385301
Node: Command Line Editing386535
Node: Introduction and Notation388241
Node: Readline Interaction390596
Node: Readline Bare Essentials391787
Node: Readline Movement Commands393598
Node: Readline Killing Commands394597
Node: Readline Arguments396623
Node: Searching397716
Node: Readline Init File399962
Node: Readline Init File Syntax401268
Node: Conditional Init Constructs428222
Node: Sample Init File432610
Node: Bindable Readline Commands435733
Node: Commands For Moving437274
Node: Commands For History439741
Node: Commands For Text445135
Node: Commands For Killing449263
Node: Numeric Arguments452054
Node: Commands For Completion453209
Node: Keyboard Macros458908
Node: Miscellaneous Commands459612
Node: Readline vi Mode467158
Node: Programmable Completion468138
Node: Programmable Completion Builtins477877
Node: A Programmable Completion Example489617
Node: Using History Interactively494965
Node: Bash History Facilities495649
Node: Bash History Builtins499387
Node: History Interaction506985
Node: Event Designators511938
Node: Word Designators513519
Node: Modifiers515914
Node: Installing Bash517854
Node: Basic Installation518973
Node: Compilers and Options522852
Node: Compiling For Multiple Architectures523605
Node: Installation Names525361
Node: Specifying the System Type527598
Node: Sharing Defaults528347
Node: Operation Controls529064
Node: Optional Features530086
Node: Reporting Bugs542812
Node: Major Differences From The Bourne Shell544172
Node: GNU Free Documentation License565602
Node: Indexes590782
Node: Builtin Index591236
Node: Reserved Word Index598337
Node: Variable Index600785
Node: Function Index618201
Node: Concept Index632337

End Tag Table