mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 12:23:09 +00:00
Stringify history.fish
This commit is contained in:
parent
16aa0b93e9
commit
fcdc6a48c0
1 changed files with 2 additions and 2 deletions
|
@ -86,7 +86,7 @@ function history --description "Deletes an item from history"
|
|||
end
|
||||
|
||||
read --local --prompt "echo 'Delete which entries? > '" choice
|
||||
set choice (echo $choice | tr " " "\n")
|
||||
set choice (string split " " -- $choice)
|
||||
|
||||
for i in $choice
|
||||
|
||||
|
@ -96,7 +96,7 @@ function history --description "Deletes an item from history"
|
|||
end
|
||||
|
||||
#Following two validations could be embedded with "and" but I find the syntax kind of weird.
|
||||
if not echo $i | grep -E -q "^[0-9]+\$"
|
||||
if not string match -qr '^[0-9]+$'
|
||||
printf "Invalid input: %s\n" $i
|
||||
continue
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue