diff options
author | Fabian Homborg <FHomborg@gmail.com> | 2016-02-03 23:45:54 +0100 |
---|---|---|
committer | Fabian Homborg <FHomborg@gmail.com> | 2016-02-03 23:45:54 +0100 |
commit | fcdc6a48c0bbdc796975db8d0b7f32434d86d249 (patch) | |
tree | b7787ffb81317f32910a6421eeb9ec27b0c3b88c /share/functions/history.fish | |
parent | 16aa0b93e92178796c05249b384e5f5dabf52f4a (diff) |
Stringify history.fish
Diffstat (limited to 'share/functions/history.fish')
-rw-r--r-- | share/functions/history.fish | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/share/functions/history.fish b/share/functions/history.fish index c4dbbd3f..544fec03 100644 --- a/share/functions/history.fish +++ b/share/functions/history.fish @@ -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 |