mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-03 06:41:14 -03:00
correct handling of history args
This fixes several problems with how the builtin `history` command handles arguments. It now complains and refuses to do anything if the user specifies incompatible actions (e.g., `--search` and `--clear`). It also fixes a regression introduced by previous changes with regard to invocations that don't explicitly specify `--search` or a search term. Enhances the history man page to clarify the behavior of various options. This change is already far larger than I like so unit tests will be added in a separate commit. Fixes #3224. Note: This fixes only a couple problems with the interactive `history --delete` command in the `history` function. The main problem will be dealt with via issue #31.
This commit is contained in:
6
tests/history.expect.out
Normal file
6
tests/history.expect.out
Normal file
@@ -0,0 +1,6 @@
|
||||
empty history detected as expected
|
||||
first history command detected as expected
|
||||
invalid attempt at multiple history commands detected
|
||||
history function explicit search succeeded
|
||||
history function implicit search succeeded
|
||||
history function implicit search with timestamps succeeded
|
||||
Reference in New Issue
Block a user