history pager: delete selected history entry with Shift-Delete

After accidentally running a command that includes a pasted password, I want
to delete command from history. Today we need to recall or type (part of)
that command and type "history delete".  Let's maybe add a shortcut to do
this from the history pager.

The current shortcut is Shift+Delete. I don't think that's very discoverable,
maybe we should use Delete instead (but only if the cursor is at the end of
the commandline, otherwise delete a char).

Closes #9454
This commit is contained in:
Johannes Altmanninger
2023-01-10 01:25:06 +01:00
parent 857612d243
commit 052823c120
9 changed files with 79 additions and 20 deletions

View File

@@ -198,6 +198,9 @@ The following special input functions are available:
``history-pager``
invoke the searchable pager on history (incremental search); or if the history pager is already active, search further backwards in time.
``history-pager-delete``
permanently delete the history item selected in the history pager
``history-search-backward``
search the history for the previous match