summaryrefslogtreecommitdiff
path: root/shell/key-bindings.fish
diff options
context:
space:
mode:
authorLangLangBart <92653266+LangLangBart@users.noreply.github.com>2024-06-01 04:28:02 +0200
committerGitHub <noreply@github.com>2024-06-01 11:28:02 +0900
commitdbe8dc344efbbc7d356cfaf6f807f4be42a45188 (patch)
treed63c781045c88aa97268115225d1081bdb28a22c /shell/key-bindings.fish
parente33fb59da1b6727f224422165e4ac0e5bbf63f25 (diff)
downloadfzf-dbe8dc344efbbc7d356cfaf6f807f4be42a45188.tar.gz
[fish] Use builtins for cd and history (#3830)
Close #3826
Diffstat (limited to 'shell/key-bindings.fish')
-rw-r--r--shell/key-bindings.fish8
1 files changed, 4 insertions, 4 deletions
diff --git a/shell/key-bindings.fish b/shell/key-bindings.fish
index 444279cc..d1db09bc 100644
--- a/shell/key-bindings.fish
+++ b/shell/key-bindings.fish
@@ -69,16 +69,16 @@ function fzf_key_bindings
if type -P perl > /dev/null 2>&1
set -lx FZF_DEFAULT_OPTS (__fzf_defaults "" "-n2..,.. --scheme=history --bind=ctrl-r:toggle-sort --highlight-line $FZF_CTRL_R_OPTS +m")
set -lx FZF_DEFAULT_OPTS_FILE ''
- history -z --reverse | command perl -0 -pe 's/^/$.\t/g; s/\n/\n\t/gm' | eval (__fzfcmd) --tac --read0 --print0 -q '(commandline)' | command perl -pe 's/^\d*\t//' | read -lz result
+ builtin history -z --reverse | command perl -0 -pe 's/^/$.\t/g; s/\n/\n\t/gm' | eval (__fzfcmd) --tac --read0 --print0 -q '(commandline)' | command perl -pe 's/^\d*\t//' | read -lz result
and commandline -- $result
else
set -lx FZF_DEFAULT_OPTS (__fzf_defaults "" "--scheme=history --bind=ctrl-r:toggle-sort --highlight-line $FZF_CTRL_R_OPTS +m")
set -lx FZF_DEFAULT_OPTS_FILE ''
- history -z | eval (__fzfcmd) --read0 --print0 -q '(commandline)' | read -lz result
+ builtin history -z | eval (__fzfcmd) --read0 --print0 -q '(commandline)' | read -lz result
and commandline -- $result
end
else
- history | eval (__fzfcmd) -q '(commandline)' | read -l result
+ builtin history | eval (__fzfcmd) -q '(commandline)' | read -l result
and commandline -- $result
end
end
@@ -99,7 +99,7 @@ function fzf_key_bindings
eval (__fzfcmd)' +m --query "'$fzf_query'"' | read -l result
if [ -n "$result" ]
- cd -- $result
+ builtin cd -- $result
# Remove last token from commandline.
commandline -t ""