mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
history: Use --contains
by default for "delete"
This just makes more sense, as people don't want to enter exact matches if they delete interactively. It also brings it in line with "search". Fixes #6142 Rejects #6070
This commit is contained in:
parent
c0d8439f3a
commit
9380b7ff39
2 changed files with 2 additions and 3 deletions
|
@ -110,8 +110,7 @@ function history --description "display or manipulate interactive command histor
|
|||
end
|
||||
|
||||
if test -z "$search_mode"
|
||||
set search_mode "--exact"
|
||||
set _flag_case_sensitive "-C"
|
||||
set search_mode "--contains"
|
||||
end
|
||||
|
||||
if test $search_mode = "--exact"
|
||||
|
|
|
@ -24,7 +24,7 @@ The following operations (sub-commands) are available:
|
|||
|
||||
- ``search`` returns history items matching the search string. If no search string is provided it returns all history items. This is the default operation if no other operation is specified. You only have to explicitly say ``history search`` if you wish to search for one of the subcommands. The ``--contains`` search option will be used if you don't specify a different search option. Entries are ordered newest to oldest unless you use the ``--reverse`` flag. If stdout is attached to a tty the output will be piped through your pager by the history function. The history builtin simply writes the results to stdout.
|
||||
|
||||
- ``delete`` deletes history items. Without the ``--prefix`` or ``--contains`` options, the exact, case-sensitive match of the specified text will be deleted. If you don't specify ``--exact`` a prompt will be displayed before any items are deleted asking you which entries are to be deleted. You can enter the word "all" to delete all matching entries. You can enter a single ID (the number in square brackets) to delete just that single entry. You can enter more than one ID separated by a space to delete multiple entries. Just press [enter] to not delete anything. Note that the interactive delete behavior is a feature of the history function. The history builtin only supports ``--exact --case-sensitive`` deletion.
|
||||
- ``delete`` deletes history items. The ``--contains`` search option will be used if you don't specify a different search option. If you don't specify ``--exact`` a prompt will be displayed before any items are deleted asking you which entries are to be deleted. You can enter the word "all" to delete all matching entries. You can enter a single ID (the number in square brackets) to delete just that single entry. You can enter more than one ID separated by a space to delete multiple entries. Just press [enter] to not delete anything. Note that the interactive delete behavior is a feature of the history function. The history builtin only supports ``--exact --case-sensitive`` deletion.
|
||||
|
||||
- ``merge`` immediately incorporates history changes from other sessions. Ordinarily ``fish`` ignores history changes from sessions started after the current one. This command applies those changes immediately.
|
||||
|
||||
|
|
Loading…
Reference in a new issue