mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-06 20:00: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
@@ -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, 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.
|
||||
@@ -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, 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
|
||||
@@ -10994,7 +10994,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.
|
||||
@@ -11017,21 +11017,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:
|
||||
|
||||
@@ -11039,19 +11054,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
|
||||
@@ -13792,28 +13804,28 @@ Node: A Programmable Completion Example486053
|
||||
Node: Using History Interactively491401
|
||||
Node: Bash History Facilities492085
|
||||
Node: Bash History Builtins495823
|
||||
Node: History Interaction502698
|
||||
Node: Event Designators507651
|
||||
Node: Word Designators509232
|
||||
Node: Modifiers511627
|
||||
Node: Installing Bash513567
|
||||
Node: Basic Installation514686
|
||||
Node: Compilers and Options518565
|
||||
Node: Compiling For Multiple Architectures519318
|
||||
Node: Installation Names521074
|
||||
Node: Specifying the System Type523311
|
||||
Node: Sharing Defaults524060
|
||||
Node: Operation Controls524777
|
||||
Node: Optional Features525799
|
||||
Node: Reporting Bugs538525
|
||||
Node: Major Differences From The Bourne Shell539885
|
||||
Node: GNU Free Documentation License561315
|
||||
Node: Indexes586495
|
||||
Node: Builtin Index586949
|
||||
Node: Reserved Word Index594050
|
||||
Node: Variable Index596498
|
||||
Node: Function Index613914
|
||||
Node: Concept Index627912
|
||||
Node: History Interaction503421
|
||||
Node: Event Designators508374
|
||||
Node: Word Designators509955
|
||||
Node: Modifiers512350
|
||||
Node: Installing Bash514290
|
||||
Node: Basic Installation515409
|
||||
Node: Compilers and Options519288
|
||||
Node: Compiling For Multiple Architectures520041
|
||||
Node: Installation Names521797
|
||||
Node: Specifying the System Type524034
|
||||
Node: Sharing Defaults524783
|
||||
Node: Operation Controls525500
|
||||
Node: Optional Features526522
|
||||
Node: Reporting Bugs539248
|
||||
Node: Major Differences From The Bourne Shell540608
|
||||
Node: GNU Free Documentation License562038
|
||||
Node: Indexes587218
|
||||
Node: Builtin Index587672
|
||||
Node: Reserved Word Index594773
|
||||
Node: Variable Index597221
|
||||
Node: Function Index614637
|
||||
Node: Concept Index628635
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
Reference in New Issue
Block a user