mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-06 10:12:38 +02:00
commit bash-20190621 snapshot
This commit is contained in:
+167
-144
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 6.5 from
|
||||
bashref.texi.
|
||||
|
||||
This text is a brief description of the features that are present in the
|
||||
Bash shell (version 5.0, 12 June 2019).
|
||||
Bash shell (version 5.0, 21 June 2019).
|
||||
|
||||
This is Edition 5.0, last updated 12 June 2019, of 'The GNU Bash
|
||||
This is Edition 5.0, last updated 21 June 2019, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.0.
|
||||
|
||||
Copyright (C) 1988-2018 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.0, 12 June 2019). The Bash home page is
|
||||
Bash shell (version 5.0, 21 June 2019). The Bash home page is
|
||||
<http://www.gnu.org/software/bash/>.
|
||||
|
||||
This is Edition 5.0, last updated 12 June 2019, of 'The GNU Bash
|
||||
This is Edition 5.0, last updated 21 June 2019, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.0.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -2116,16 +2116,18 @@ File: bashref.info, Node: Filename Expansion, Next: Quote Removal, Prev: Word
|
||||
* Pattern Matching:: How the shell matches patterns.
|
||||
|
||||
After word splitting, unless the '-f' option has been set (*note The Set
|
||||
Builtin::), Bash scans each word for the characters '*', '?', and '['.
|
||||
If one of these characters appears, then the word is regarded as a
|
||||
PATTERN, and replaced with an alphabetically sorted list of filenames
|
||||
matching the pattern (*note Pattern Matching::). If no matching
|
||||
filenames are found, and the shell option 'nullglob' is disabled, the
|
||||
word is left unchanged. If the 'nullglob' option is set, and no matches
|
||||
are found, the word is removed. If the 'failglob' shell option is set,
|
||||
and no matches are found, an error message is printed and the command is
|
||||
not executed. If the shell option 'nocaseglob' is enabled, the match is
|
||||
performed without regard to the case of alphabetic characters.
|
||||
Builtin::), Bash scans each word for the characters '*', '?', '[', and,
|
||||
under certain circumstances (e.g., when it appears in the expansion of
|
||||
an unquoted shell variable), '\\'. If one of these characters appears,
|
||||
then the word is regarded as a PATTERN, and replaced with an
|
||||
alphabetically sorted list of filenames matching the pattern (*note
|
||||
Pattern Matching::). If no matching filenames are found, and the shell
|
||||
option 'nullglob' is disabled, the word is left unchanged. If the
|
||||
'nullglob' option is set, and no matches are found, the word is removed.
|
||||
If the 'failglob' shell option is set, and no matches are found, an
|
||||
error message is printed and the command is not executed. If the shell
|
||||
option 'nocaseglob' is enabled, the match is performed without regard to
|
||||
the case of alphabetic characters.
|
||||
|
||||
When a pattern is used for filename expansion, the character '.' at
|
||||
the start of a filename or immediately following a slash must be matched
|
||||
@@ -4676,6 +4678,12 @@ This builtin allows you to change additional shell optional behavior.
|
||||
If set, Bash allows filename patterns which match no files to
|
||||
expand to a null string, rather than themselves.
|
||||
|
||||
'posixglob'
|
||||
If set, Bash makes words containing unquoted backslashes after
|
||||
expansion eligible for filename expansion, even if they don't
|
||||
contain any other unquoted pattern characters. This option is
|
||||
enabled by default and is enabled when POSIX mode is enabled.
|
||||
|
||||
'progcomp'
|
||||
If set, the programmable completion facilities (*note
|
||||
Programmable Completion::) are enabled. This option is
|
||||
@@ -6168,15 +6176,17 @@ given the INTEGER attribute using 'declare -i' is assigned a value. A
|
||||
null value evaluates to 0. A shell variable need not have its INTEGER
|
||||
attribute turned on to be used in an expression.
|
||||
|
||||
Constants with a leading 0 are interpreted as octal numbers. A
|
||||
leading '0x' or '0X' denotes hexadecimal. Otherwise, numbers take the
|
||||
form [BASE'#']N, where the optional BASE is a decimal number between 2
|
||||
and 64 representing the arithmetic base, and N is a number in that base.
|
||||
If BASE'#' is omitted, then base 10 is used. When specifying N, the
|
||||
digits greater than 9 are represented by the lowercase letters, the
|
||||
uppercase letters, '@', and '_', in that order. If BASE is less than or
|
||||
equal to 36, lowercase and uppercase letters may be used interchangeably
|
||||
to represent numbers between 10 and 35.
|
||||
Integer constants follow the C language definition, without suffixes
|
||||
or character constants. Constants with a leading 0 are interpreted as
|
||||
octal numbers. A leading '0x' or '0X' denotes hexadecimal. Otherwise,
|
||||
numbers take the form [BASE'#']N, where the optional BASE is a decimal
|
||||
number between 2 and 64 representing the arithmetic base, and N is a
|
||||
number in that base. If BASE'#' is omitted, then base 10 is used. When
|
||||
specifying N, if a non-digit is required, the digits greater than 9 are
|
||||
represented by the lowercase letters, the uppercase letters, '@', and
|
||||
'_', in that order. If BASE is less than or equal to 36, lowercase and
|
||||
uppercase letters may be used interchangeably to represent numbers
|
||||
between 10 and 35.
|
||||
|
||||
Operators are evaluated in order of precedence. Sub-expressions in
|
||||
parentheses are evaluated first and may override the precedence rules
|
||||
@@ -6757,62 +6767,66 @@ startup files.
|
||||
option, so numeric arguments to 'shift' that exceed the number of
|
||||
positional parameters will result in an error message.
|
||||
|
||||
45. When the 'alias' builtin displays alias definitions, it does not
|
||||
45. Enabling POSIX mode has the effect of setting the 'posixglob'
|
||||
option, which affects how unquoted backslashes are treated during
|
||||
filename expansion (*note Filename Expansion::).
|
||||
|
||||
46. When the 'alias' builtin displays alias definitions, it does not
|
||||
display them with a leading 'alias ' unless the '-p' option is
|
||||
supplied.
|
||||
|
||||
46. When the 'set' builtin is invoked without options, it does not
|
||||
47. When the 'set' builtin is invoked without options, it does not
|
||||
display shell function names and definitions.
|
||||
|
||||
47. When the 'set' builtin is invoked without options, it displays
|
||||
48. When the 'set' builtin is invoked without options, it displays
|
||||
variable values without quotes, unless they contain shell
|
||||
metacharacters, even if the result contains nonprinting characters.
|
||||
|
||||
48. When the 'cd' builtin is invoked in LOGICAL mode, and the pathname
|
||||
49. When the 'cd' builtin is invoked in LOGICAL mode, and the pathname
|
||||
constructed from '$PWD' and the directory name supplied as an
|
||||
argument does not refer to an existing directory, 'cd' will fail
|
||||
instead of falling back to PHYSICAL mode.
|
||||
|
||||
49. When the 'cd' builtin cannot change a directory because the length
|
||||
50. When the 'cd' builtin cannot change a directory because the length
|
||||
of the pathname constructed from '$PWD' and the directory name
|
||||
supplied as an argument exceeds PATH_MAX when all symbolic links
|
||||
are expanded, 'cd' will fail instead of attempting to use only the
|
||||
supplied directory name.
|
||||
|
||||
50. The 'pwd' builtin verifies that the value it prints is the same as
|
||||
51. The 'pwd' builtin verifies that the value it prints is the same as
|
||||
the current directory, even if it is not asked to check the file
|
||||
system with the '-P' option.
|
||||
|
||||
51. When listing the history, the 'fc' builtin does not include an
|
||||
52. When listing the history, the 'fc' builtin does not include an
|
||||
indication of whether or not a history entry has been modified.
|
||||
|
||||
52. The default editor used by 'fc' is 'ed'.
|
||||
53. The default editor used by 'fc' is 'ed'.
|
||||
|
||||
53. The 'type' and 'command' builtins will not report a non-executable
|
||||
54. The 'type' and 'command' builtins will not report a non-executable
|
||||
file as having been found, though the shell will attempt to execute
|
||||
such a file if it is the only so-named file found in '$PATH'.
|
||||
|
||||
54. The 'vi' editing mode will invoke the 'vi' editor directly when
|
||||
55. The 'vi' editing mode will invoke the 'vi' editor directly when
|
||||
the 'v' command is run, instead of checking '$VISUAL' and
|
||||
'$EDITOR'.
|
||||
|
||||
55. When the 'xpg_echo' option is enabled, Bash does not attempt to
|
||||
56. When the 'xpg_echo' option is enabled, Bash does not attempt to
|
||||
interpret any arguments to 'echo' as options. Each argument is
|
||||
displayed, after escape characters are converted.
|
||||
|
||||
56. The 'ulimit' builtin uses a block size of 512 bytes for the '-c'
|
||||
57. The 'ulimit' builtin uses a block size of 512 bytes for the '-c'
|
||||
and '-f' options.
|
||||
|
||||
57. The arrival of 'SIGCHLD' when a trap is set on 'SIGCHLD' does not
|
||||
58. The arrival of 'SIGCHLD' when a trap is set on 'SIGCHLD' does not
|
||||
interrupt the 'wait' builtin and cause it to return immediately.
|
||||
The trap command is run once for each child that exits.
|
||||
|
||||
58. The 'read' builtin may be interrupted by a signal for which a trap
|
||||
59. The 'read' builtin may be interrupted by a signal for which a trap
|
||||
has been set. If Bash receives a trapped signal while executing
|
||||
'read', the trap handler executes and 'read' returns an exit status
|
||||
greater than 128.
|
||||
|
||||
59. Bash removes an exited background process's status from the list
|
||||
60. Bash removes an exited background process's status from the list
|
||||
of such statuses after the 'wait' builtin is used to obtain it.
|
||||
|
||||
There is other POSIX behavior that Bash does not implement by default
|
||||
@@ -8080,11 +8094,11 @@ File: bashref.info, Node: Commands For Moving, Next: Commands For History, Up
|
||||
Move back to the start of the current or previous word. Words are
|
||||
composed of letters and digits.
|
||||
|
||||
'shell-forward-word ()'
|
||||
'shell-forward-word (M-C-f)'
|
||||
Move forward to the end of the next word. Words are delimited by
|
||||
non-quoted shell metacharacters.
|
||||
|
||||
'shell-backward-word ()'
|
||||
'shell-backward-word (M-C-b)'
|
||||
Move back to the start of the current or previous word. Words are
|
||||
delimited by non-quoted shell metacharacters.
|
||||
|
||||
@@ -8308,7 +8322,7 @@ File: bashref.info, Node: Commands For Killing, Next: Numeric Arguments, Prev
|
||||
Kill the word behind point. Word boundaries are the same as
|
||||
'backward-word'.
|
||||
|
||||
'shell-kill-word ()'
|
||||
'shell-kill-word (M-C-d)'
|
||||
Kill from point to the end of the current word, or if between
|
||||
words, to the end of the next word. Word boundaries are the same
|
||||
as 'shell-forward-word'.
|
||||
@@ -8317,6 +8331,13 @@ File: bashref.info, Node: Commands For Killing, Next: Numeric Arguments, Prev
|
||||
Kill the word behind point. Word boundaries are the same as
|
||||
'shell-backward-word'.
|
||||
|
||||
'shell-transpose-words (M-C-t)'
|
||||
Drag the word before point past the word after point, moving point
|
||||
past that word as well. If the insertion point is at the end of
|
||||
the line, this transposes the last two words on the line. Word
|
||||
boundaries are the same as 'shell-forward-word' and
|
||||
'shell-backward-word'.
|
||||
|
||||
'unix-word-rubout (C-w)'
|
||||
Kill the word behind point, using white space as a word boundary.
|
||||
The killed text is saved on the kill-ring.
|
||||
@@ -11398,18 +11419,18 @@ D.4 Function Index
|
||||
* complete-variable (M-$): Commands For Completion.
|
||||
(line 64)
|
||||
* copy-backward-word (): Commands For Killing.
|
||||
(line 58)
|
||||
(line 65)
|
||||
* copy-forward-word (): Commands For Killing.
|
||||
(line 63)
|
||||
(line 70)
|
||||
* copy-region-as-kill (): Commands For Killing.
|
||||
(line 54)
|
||||
(line 61)
|
||||
* dabbrev-expand (): Commands For Completion.
|
||||
(line 95)
|
||||
* delete-char (C-d): Commands For Text. (line 12)
|
||||
* delete-char-or-list (): Commands For Completion.
|
||||
(line 43)
|
||||
* delete-horizontal-space (): Commands For Killing.
|
||||
(line 46)
|
||||
(line 53)
|
||||
* digit-argument (M-0, M-1, ... M--): Numeric Arguments. (line 6)
|
||||
* display-shell-version (C-x C-v): Miscellaneous Commands.
|
||||
(line 110)
|
||||
@@ -11465,7 +11486,7 @@ D.4 Function Index
|
||||
* kill-line (C-k): Commands For Killing.
|
||||
(line 6)
|
||||
* kill-region (): Commands For Killing.
|
||||
(line 50)
|
||||
(line 57)
|
||||
* kill-whole-line (): Commands For Killing.
|
||||
(line 15)
|
||||
* kill-word (M-d): Commands For Killing.
|
||||
@@ -11517,12 +11538,14 @@ D.4 Function Index
|
||||
(line 33)
|
||||
* shell-backward-kill-word (): Commands For Killing.
|
||||
(line 33)
|
||||
* shell-backward-word (): Commands For Moving. (line 30)
|
||||
* shell-backward-word (M-C-b): Commands For Moving. (line 30)
|
||||
* shell-expand-line (M-C-e): Miscellaneous Commands.
|
||||
(line 113)
|
||||
* shell-forward-word (): Commands For Moving. (line 26)
|
||||
* shell-kill-word (): Commands For Killing.
|
||||
* shell-forward-word (M-C-f): Commands For Moving. (line 26)
|
||||
* shell-kill-word (M-C-d): Commands For Killing.
|
||||
(line 28)
|
||||
* shell-transpose-words (M-C-t): Commands For Killing.
|
||||
(line 37)
|
||||
* skip-csi-sequence (): Miscellaneous Commands.
|
||||
(line 52)
|
||||
* start-kbd-macro (C-x (): Keyboard Macros. (line 6)
|
||||
@@ -11534,20 +11557,20 @@ D.4 Function Index
|
||||
(line 23)
|
||||
* universal-argument (): Numeric Arguments. (line 10)
|
||||
* unix-filename-rubout (): Commands For Killing.
|
||||
(line 41)
|
||||
(line 48)
|
||||
* unix-line-discard (C-u): Commands For Killing.
|
||||
(line 12)
|
||||
* unix-word-rubout (C-w): Commands For Killing.
|
||||
(line 37)
|
||||
(line 44)
|
||||
* upcase-word (M-u): Commands For Text. (line 53)
|
||||
* yank (C-y): Commands For Killing.
|
||||
(line 68)
|
||||
(line 75)
|
||||
* yank-last-arg (M-. or M-_): Commands For History.
|
||||
(line 80)
|
||||
* yank-nth-arg (M-C-y): Commands For History.
|
||||
(line 71)
|
||||
* yank-pop (M-y): Commands For Killing.
|
||||
(line 71)
|
||||
(line 78)
|
||||
|
||||
|
||||
File: bashref.info, Node: Concept Index, Prev: Function Index, Up: Indexes
|
||||
@@ -11749,96 +11772,96 @@ Node: Arithmetic Expansion87084
|
||||
Node: Process Substitution88016
|
||||
Node: Word Splitting89136
|
||||
Node: Filename Expansion91080
|
||||
Node: Pattern Matching93610
|
||||
Node: Quote Removal97596
|
||||
Node: Redirections97891
|
||||
Node: Executing Commands107449
|
||||
Node: Simple Command Expansion108119
|
||||
Node: Command Search and Execution110049
|
||||
Node: Command Execution Environment112425
|
||||
Node: Environment115409
|
||||
Node: Exit Status117068
|
||||
Node: Signals118738
|
||||
Node: Shell Scripts120705
|
||||
Node: Shell Builtin Commands123220
|
||||
Node: Bourne Shell Builtins125258
|
||||
Node: Bash Builtins146008
|
||||
Node: Modifying Shell Behavior174933
|
||||
Node: The Set Builtin175278
|
||||
Node: The Shopt Builtin185691
|
||||
Node: Special Builtins203361
|
||||
Node: Shell Variables204340
|
||||
Node: Bourne Shell Variables204777
|
||||
Node: Bash Variables206881
|
||||
Node: Bash Features237828
|
||||
Node: Invoking Bash238727
|
||||
Node: Bash Startup Files244740
|
||||
Node: Interactive Shells249843
|
||||
Node: What is an Interactive Shell?250253
|
||||
Node: Is this Shell Interactive?250902
|
||||
Node: Interactive Shell Behavior251717
|
||||
Node: Bash Conditional Expressions255204
|
||||
Node: Shell Arithmetic259781
|
||||
Node: Aliases262598
|
||||
Node: Arrays265218
|
||||
Node: The Directory Stack270583
|
||||
Node: Directory Stack Builtins271367
|
||||
Node: Controlling the Prompt274335
|
||||
Node: The Restricted Shell277256
|
||||
Node: Bash POSIX Mode279738
|
||||
Node: Job Control290671
|
||||
Node: Job Control Basics291131
|
||||
Node: Job Control Builtins296095
|
||||
Node: Job Control Variables300913
|
||||
Node: Command Line Editing302069
|
||||
Node: Introduction and Notation303740
|
||||
Node: Readline Interaction305363
|
||||
Node: Readline Bare Essentials306554
|
||||
Node: Readline Movement Commands308337
|
||||
Node: Readline Killing Commands309297
|
||||
Node: Readline Arguments311215
|
||||
Node: Searching312259
|
||||
Node: Readline Init File314445
|
||||
Node: Readline Init File Syntax315704
|
||||
Node: Conditional Init Constructs336143
|
||||
Node: Sample Init File340339
|
||||
Node: Bindable Readline Commands343456
|
||||
Node: Commands For Moving344660
|
||||
Node: Commands For History346509
|
||||
Node: Commands For Text350804
|
||||
Node: Commands For Killing354192
|
||||
Node: Numeric Arguments356673
|
||||
Node: Commands For Completion357812
|
||||
Node: Keyboard Macros362003
|
||||
Node: Miscellaneous Commands362690
|
||||
Node: Readline vi Mode368643
|
||||
Node: Programmable Completion369550
|
||||
Node: Programmable Completion Builtins377330
|
||||
Node: A Programmable Completion Example388025
|
||||
Node: Using History Interactively393272
|
||||
Node: Bash History Facilities393956
|
||||
Node: Bash History Builtins396961
|
||||
Node: History Interaction401492
|
||||
Node: Event Designators405112
|
||||
Node: Word Designators406331
|
||||
Node: Modifiers407968
|
||||
Node: Installing Bash409370
|
||||
Node: Basic Installation410507
|
||||
Node: Compilers and Options413765
|
||||
Node: Compiling For Multiple Architectures414506
|
||||
Node: Installation Names416199
|
||||
Node: Specifying the System Type417017
|
||||
Node: Sharing Defaults417733
|
||||
Node: Operation Controls418406
|
||||
Node: Optional Features419364
|
||||
Node: Reporting Bugs429882
|
||||
Node: Major Differences From The Bourne Shell431076
|
||||
Node: GNU Free Documentation License447928
|
||||
Node: Indexes473105
|
||||
Node: Builtin Index473559
|
||||
Node: Reserved Word Index480386
|
||||
Node: Variable Index482834
|
||||
Node: Function Index498658
|
||||
Node: Concept Index511961
|
||||
Node: Pattern Matching93717
|
||||
Node: Quote Removal97703
|
||||
Node: Redirections97998
|
||||
Node: Executing Commands107556
|
||||
Node: Simple Command Expansion108226
|
||||
Node: Command Search and Execution110156
|
||||
Node: Command Execution Environment112532
|
||||
Node: Environment115516
|
||||
Node: Exit Status117175
|
||||
Node: Signals118845
|
||||
Node: Shell Scripts120812
|
||||
Node: Shell Builtin Commands123327
|
||||
Node: Bourne Shell Builtins125365
|
||||
Node: Bash Builtins146115
|
||||
Node: Modifying Shell Behavior175040
|
||||
Node: The Set Builtin175385
|
||||
Node: The Shopt Builtin185798
|
||||
Node: Special Builtins203776
|
||||
Node: Shell Variables204755
|
||||
Node: Bourne Shell Variables205192
|
||||
Node: Bash Variables207296
|
||||
Node: Bash Features238243
|
||||
Node: Invoking Bash239142
|
||||
Node: Bash Startup Files245155
|
||||
Node: Interactive Shells250258
|
||||
Node: What is an Interactive Shell?250668
|
||||
Node: Is this Shell Interactive?251317
|
||||
Node: Interactive Shell Behavior252132
|
||||
Node: Bash Conditional Expressions255619
|
||||
Node: Shell Arithmetic260196
|
||||
Node: Aliases263136
|
||||
Node: Arrays265756
|
||||
Node: The Directory Stack271121
|
||||
Node: Directory Stack Builtins271905
|
||||
Node: Controlling the Prompt274873
|
||||
Node: The Restricted Shell277794
|
||||
Node: Bash POSIX Mode280276
|
||||
Node: Job Control291403
|
||||
Node: Job Control Basics291863
|
||||
Node: Job Control Builtins296827
|
||||
Node: Job Control Variables301645
|
||||
Node: Command Line Editing302801
|
||||
Node: Introduction and Notation304472
|
||||
Node: Readline Interaction306095
|
||||
Node: Readline Bare Essentials307286
|
||||
Node: Readline Movement Commands309069
|
||||
Node: Readline Killing Commands310029
|
||||
Node: Readline Arguments311947
|
||||
Node: Searching312991
|
||||
Node: Readline Init File315177
|
||||
Node: Readline Init File Syntax316436
|
||||
Node: Conditional Init Constructs336875
|
||||
Node: Sample Init File341071
|
||||
Node: Bindable Readline Commands344188
|
||||
Node: Commands For Moving345392
|
||||
Node: Commands For History347251
|
||||
Node: Commands For Text351546
|
||||
Node: Commands For Killing354934
|
||||
Node: Numeric Arguments357749
|
||||
Node: Commands For Completion358888
|
||||
Node: Keyboard Macros363079
|
||||
Node: Miscellaneous Commands363766
|
||||
Node: Readline vi Mode369719
|
||||
Node: Programmable Completion370626
|
||||
Node: Programmable Completion Builtins378406
|
||||
Node: A Programmable Completion Example389101
|
||||
Node: Using History Interactively394348
|
||||
Node: Bash History Facilities395032
|
||||
Node: Bash History Builtins398037
|
||||
Node: History Interaction402568
|
||||
Node: Event Designators406188
|
||||
Node: Word Designators407407
|
||||
Node: Modifiers409044
|
||||
Node: Installing Bash410446
|
||||
Node: Basic Installation411583
|
||||
Node: Compilers and Options414841
|
||||
Node: Compiling For Multiple Architectures415582
|
||||
Node: Installation Names417275
|
||||
Node: Specifying the System Type418093
|
||||
Node: Sharing Defaults418809
|
||||
Node: Operation Controls419482
|
||||
Node: Optional Features420440
|
||||
Node: Reporting Bugs430958
|
||||
Node: Major Differences From The Bourne Shell432152
|
||||
Node: GNU Free Documentation License449004
|
||||
Node: Indexes474181
|
||||
Node: Builtin Index474635
|
||||
Node: Reserved Word Index481462
|
||||
Node: Variable Index483910
|
||||
Node: Function Index499734
|
||||
Node: Concept Index513173
|
||||
|
||||
End Tag Table
|
||||
|
||||
Reference in New Issue
Block a user