Skip to content
Myr

[fish] Use builtins for cd and history (#3830)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Close #3826

authored by LangLangBart · committed by GitHub · parent e33fb59 · Browse files · 1 file+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−4 removed

  • other:+4 added−4 removed

1 file+4 added−4 removed

modified:shell/key-bindings.fish+4 added-4 removed
67 unmodified lines
68 if [ "$FISH_MAJOR" -gt 2 -o \( "$FISH_MAJOR" -eq 2 -a "$FISH_MINOR" -ge 4 \) ];69 if type -P perl > /dev/null 2>&170 set -lx FZF_DEFAULT_OPTS (__fzf_defaults "" "-n2..,.. --scheme=history --bind=ctrl-r:toggle-sort --highlight-line $FZF_CTRL_R_OPTS +m")71 set -lx FZF_DEFAULT_OPTS_FILE ''72 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 result72 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 result73 and commandline -- $result74 else75 set -lx FZF_DEFAULT_OPTS (__fzf_defaults "" "--scheme=history --bind=ctrl-r:toggle-sort --highlight-line $FZF_CTRL_R_OPTS +m")76 set -lx FZF_DEFAULT_OPTS_FILE ''77 history -z | eval (__fzfcmd) --read0 --print0 -q '(commandline)' | read -lz result77 builtin history -z | eval (__fzfcmd) --read0 --print0 -q '(commandline)' | read -lz result78 and commandline -- $result79 end80 else81 history | eval (__fzfcmd) -q '(commandline)' | read -l result81 builtin history | eval (__fzfcmd) -q '(commandline)' | read -l result82 and commandline -- $result83 end84 end85 commandline -f repaint
12 unmodified lines
98 set -lx FZF_DEFAULT_COMMAND "$FZF_ALT_C_COMMAND"99 eval (__fzfcmd)' +m --query "'$fzf_query'"' | read -l result100101 if [ -n "$result" ]102 cd -- $result102 builtin cd -- $result103104 # Remove last token from commandline.105 commandline -t ""106 commandline -it -- $prefix
86 unmodified lines