add history append subcommand

This commit is contained in:
Anurag Singh
2024-04-13 18:21:51 +08:00
committed by Johannes Altmanninger
parent 6f408211a1
commit c044d5e3f0
7 changed files with 30 additions and 5 deletions

View File

@@ -17,6 +17,7 @@ Synopsis
history save
history clear
history clear-session
history append COMMAND ...
Description
-----------
@@ -43,6 +44,9 @@ The following operations (sub-commands) are available:
**clear-session**
Clears the history file from all activity of the current session. Note: If ``history merge`` or ``builtin history merge`` is run in a session, only the history after this will be erased.
**append**
Appends commands to the history without needing to execute them.
The following options are available:
These flags can appear before or immediately after one of the sub-commands listed above.
@@ -83,10 +87,10 @@ Example
history clear
# Deletes all history items
history search --contains "foo"
# Outputs a list of all previous commands containing the string "foo".
history delete --prefix "foo"
# Interactively deletes commands which start with "foo" from the history.
# You can select more than one entry by entering their IDs separated by a space.