mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Correctly handle --merge in the history.fish function
Previously --merge happened to work, but only because it was smuggled in through the 'print' command
This commit is contained in:
parent
31a617408f
commit
c184c1a81a
1 changed files with 3 additions and 0 deletions
|
@ -35,6 +35,7 @@ function history --description "Deletes an item from history"
|
||||||
case --search
|
case --search
|
||||||
set cmd print
|
set cmd print
|
||||||
case --merge
|
case --merge
|
||||||
|
set cmd merge
|
||||||
case --
|
case --
|
||||||
set -e argv[$i]
|
set -e argv[$i]
|
||||||
break
|
break
|
||||||
|
@ -128,6 +129,8 @@ function history --description "Deletes an item from history"
|
||||||
case save
|
case save
|
||||||
#Save changes to history file
|
#Save changes to history file
|
||||||
builtin history $argv
|
builtin history $argv
|
||||||
|
case merge
|
||||||
|
builtin history --merge
|
||||||
case clear
|
case clear
|
||||||
# Erase the entire history
|
# Erase the entire history
|
||||||
echo "Are you sure you want to clear history ? (y/n)"
|
echo "Are you sure you want to clear history ? (y/n)"
|
||||||
|
|
Loading…
Reference in a new issue