summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorssjhv <17730307+ssjhv@users.noreply.github.com>2019-07-12 22:47:51 -0700
committerJunegunn Choi <junegunn.c@gmail.com>2019-07-13 14:47:51 +0900
commite7097a9d25e0a64cdc9d199f243526b85c42d888 (patch)
tree31af62fc7e97e7c5f90e28adf91a840474991e0b
parentc1dbc800e587471a8c34a0e3a4a907aabc71cdd0 (diff)
[fish] Remove perl from fish key bindings (#1635)
Perl was used to remove the trailing newline character, but fzf already has --print0 to use null character as terminators, and fish read -z is expecting null character as terminators. There is no reason to depend on perl if --print0 is passed to fzf invocation.
-rw-r--r--shell/key-bindings.fish2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/key-bindings.fish b/shell/key-bindings.fish
index 57704f72..035ba55e 100644
--- a/shell/key-bindings.fish
+++ b/shell/key-bindings.fish
@@ -47,7 +47,7 @@ function fzf_key_bindings
# history's -z flag was added in fish 2.4.0, so don't use it for versions
# before 2.4.0.
if [ "$FISH_MAJOR" -gt 2 -o \( "$FISH_MAJOR" -eq 2 -a "$FISH_MINOR" -ge 4 \) ];
- history -z | eval (__fzfcmd) --read0 -q '(commandline)' | perl -pe 'chomp if eof' | read -lz result
+ history -z | eval (__fzfcmd) --read0 --print0 -q '(commandline)' | read -lz result
and commandline -- $result
else
history | eval (__fzfcmd) -q '(commandline)' | read -l result