summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorbitraid <bitraid@protonmail.ch>2025-01-10 07:03:21 +0200
committerGitHub <noreply@github.com>2025-01-10 14:03:21 +0900
commitcc1d9f124e543d59c09b21a8712870e25ba4f074 (patch)
tree9c315aebe7f155122c7e68c8a018240be666230f /shell
parent93c029960666de2d1784f351ac37e5a74cf82e2e (diff)
downloadfzf-cc1d9f124e543d59c09b21a8712870e25ba4f074.tar.gz
[fish] Fix history formatting when perl is missing (#4166)
Don't add tab after escaped newline.
Diffstat (limited to 'shell')
-rw-r--r--shell/key-bindings.fish4
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/key-bindings.fish b/shell/key-bindings.fish
index aadcffbb..e14edfb5 100644
--- a/shell/key-bindings.fish
+++ b/shell/key-bindings.fish
@@ -76,8 +76,8 @@ function fzf_key_bindings
set -l line 0
for i in (builtin history -z --reverse | string split0)
set line (math $line + 1)
- string escape -n -- $line\t$i
- end | string join0 | string replace -a '\n' '\n\t' | string unescape -n | eval (__fzfcmd) --tac --read0 --print0 -q '(commandline)' | string replace -r '^\d*\t' '' | read -lz result
+ string escape -n -- $line\t(string replace -a -- \n \n\t $i | string collect)
+ end | string join0 | string unescape -n | eval (__fzfcmd) --tac --read0 --print0 -q '(commandline)' | string replace -r '^\d*\t' '' | read -lz result
and commandline -- $result
end
else