mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-11 22:20:49 +02:00
history builtin has a -H option to display history entries as they would be written to the history file; history builtin now takes a START-END range specifier for listing; fix stray semicolon when printing shell functions containing a case command; changes to stdin redirection detection in preparation for POSIX interp 1913
This commit is contained in:
+63
-51
@@ -1,9 +1,9 @@
|
||||
This is bash.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, 18 December 2025).
|
||||
Bash shell (version 5.3, 26 December 2025).
|
||||
|
||||
This is Edition 5.3, last updated 18 December 2025, of ‘The GNU Bash
|
||||
This is Edition 5.3, last updated 26 December 2025, of ‘The GNU Bash
|
||||
Reference Manual’, for ‘Bash’, Version 5.3.
|
||||
|
||||
Copyright © 1988-2025 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, 18 December 2025). The Bash home page is
|
||||
Bash shell (version 5.3, 26 December 2025). The Bash home page is
|
||||
<http://www.gnu.org/software/bash/>.
|
||||
|
||||
This is Edition 5.3, last updated 18 December 2025, of ‘The GNU Bash
|
||||
This is Edition 5.3, last updated 26 December 2025, of ‘The GNU Bash
|
||||
Reference Manual’, for ‘Bash’, Version 5.3.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -10993,7 +10993,7 @@ history file.
|
||||
‘fc’ reads the file of edited commands and echoes and executes
|
||||
them. The ‘-D’ option, if supplied, causes ‘fc’ to remove the
|
||||
selected commands from the history list before executing the file
|
||||
of edited commands. ‘-D’ is only active when ‘fc’ is invoked in
|
||||
of edited commands. ‘-D’ is only effective when ‘fc’ is invoked in
|
||||
this way. It could be used if you make a typo in a command and
|
||||
want to fix it using an editor while removing the erroneous command
|
||||
from the history to avoid clutter.
|
||||
@@ -11016,21 +11016,36 @@ history file.
|
||||
history entry, in which case ‘fc’ returns a non-zero status.
|
||||
|
||||
‘history’
|
||||
history [N]
|
||||
history [-H] [RANGE]
|
||||
history -c
|
||||
history -d OFFSET
|
||||
history -d START-END
|
||||
history -d RANGE
|
||||
history [-anrw] [FILENAME]
|
||||
history -ps ARG
|
||||
history -ps ARG [ARG...]
|
||||
|
||||
With no options, display the history list with numbers. Entries
|
||||
prefixed with a ‘*’ have been modified. An argument of N lists
|
||||
only the last N entries. If the shell variable ‘HISTTIMEFORMAT’ is
|
||||
set and not null, it is used as a format string for ‘strftime’(3)
|
||||
to display the time stamp associated with each displayed history
|
||||
entry. If ‘history’ uses ‘HISTTIMEFORMAT’, it does not print an
|
||||
intervening space between the formatted time stamp and the history
|
||||
entry.
|
||||
With no options, or with the ‘-H’ option, display the portion of
|
||||
the command history list specified by RANGE, as described below.
|
||||
If RANGE is not specified, display the entire history list.
|
||||
Without ‘-H’, display the list with command numbers, prefixing
|
||||
entries that have been modified with a ‘*’.
|
||||
|
||||
A RANGE argument is specified in the form of a number OFFSET or a
|
||||
range START-END. If OFFSET is supplied, it references the history
|
||||
entry at position OFFSET in the history list; when listing this
|
||||
displays the last OFFSET entries. A negative OFFSET counts back
|
||||
from the end of the history list, relative to one greater than the
|
||||
last history position. When listing, negative and positive OFFSETs
|
||||
have identical results. START and END, if supplied, reference the
|
||||
portion of the history list beginning at position START through
|
||||
position END. If START or END are negative, they count back from
|
||||
the end of the history list. When listing, if START is greater
|
||||
than END, the history entries are displayed in reverse order from
|
||||
END to START.
|
||||
|
||||
If the shell variable ‘HISTTIMEFORMAT’ is set and not null, it is
|
||||
used as a format string for ‘strftime’(3) to display the time stamp
|
||||
associated with each displayed history entry. If ‘history’ uses
|
||||
‘HISTTIMEFORMAT’, it does not print an intervening space between
|
||||
the formatted time stamp and the history entry.
|
||||
|
||||
Options, if supplied, have the following meanings:
|
||||
|
||||
@@ -11038,19 +11053,16 @@ history file.
|
||||
Clear the history list. This may be combined with the other
|
||||
options to replace the history list.
|
||||
|
||||
‘-d OFFSET’
|
||||
Delete the history entry at position OFFSET. If OFFSET is
|
||||
positive, it should be specified as it appears when the
|
||||
history is displayed. If OFFSET is negative, it is
|
||||
interpreted as relative to one greater than the last history
|
||||
position, so negative indices count back from the end of the
|
||||
history, and an index of ‘-1’ refers to the current ‘history
|
||||
-d’ command.
|
||||
‘-d RANGE’
|
||||
Delete the history entries specified by RANGE, as described
|
||||
above. An offset of ‘-1’ refers to the current ‘history -d’
|
||||
command.
|
||||
|
||||
‘-d START-END’
|
||||
Delete the range of history entries between positions START
|
||||
and END, inclusive. Positive and negative values for START
|
||||
and END are interpreted as described above.
|
||||
‘-H’
|
||||
Display the selected history entries in the format that would
|
||||
be written to the history file, including any time stamp
|
||||
information as described below, without prefixing the entry
|
||||
with any line number or ‘*’.
|
||||
|
||||
‘-a’
|
||||
Append the "new" history lines to the history file. These are
|
||||
@@ -13791,28 +13803,28 @@ Node: A Programmable Completion Example485732
|
||||
Node: Using History Interactively491077
|
||||
Node: Bash History Facilities491758
|
||||
Node: Bash History Builtins495493
|
||||
Node: History Interaction502365
|
||||
Node: Event Designators507315
|
||||
Node: Word Designators508893
|
||||
Node: Modifiers511285
|
||||
Node: Installing Bash513222
|
||||
Node: Basic Installation514338
|
||||
Node: Compilers and Options518214
|
||||
Node: Compiling For Multiple Architectures518964
|
||||
Node: Installation Names520717
|
||||
Node: Specifying the System Type522951
|
||||
Node: Sharing Defaults523697
|
||||
Node: Operation Controls524411
|
||||
Node: Optional Features525430
|
||||
Node: Reporting Bugs538153
|
||||
Node: Major Differences From The Bourne Shell539510
|
||||
Node: GNU Free Documentation License560937
|
||||
Node: Indexes586114
|
||||
Node: Builtin Index586565
|
||||
Node: Reserved Word Index593663
|
||||
Node: Variable Index596108
|
||||
Node: Function Index613521
|
||||
Node: Concept Index627516
|
||||
Node: History Interaction503088
|
||||
Node: Event Designators508038
|
||||
Node: Word Designators509616
|
||||
Node: Modifiers512008
|
||||
Node: Installing Bash513945
|
||||
Node: Basic Installation515061
|
||||
Node: Compilers and Options518937
|
||||
Node: Compiling For Multiple Architectures519687
|
||||
Node: Installation Names521440
|
||||
Node: Specifying the System Type523674
|
||||
Node: Sharing Defaults524420
|
||||
Node: Operation Controls525134
|
||||
Node: Optional Features526153
|
||||
Node: Reporting Bugs538876
|
||||
Node: Major Differences From The Bourne Shell540233
|
||||
Node: GNU Free Documentation License561660
|
||||
Node: Indexes586837
|
||||
Node: Builtin Index587288
|
||||
Node: Reserved Word Index594386
|
||||
Node: Variable Index596831
|
||||
Node: Function Index614244
|
||||
Node: Concept Index628239
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
Reference in New Issue
Block a user