Skip to content
Myr

[shell] ALT-C: Use builtin cd to avoid conflicts (#2799)

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

authored by Ajeet D'Souza · committed by GitHub · parent a0b42e6 · Browse files · 3 files+3 added−3 removed
This commit

State

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

Diff stats

3 files+3 added−3 removed

  • other:+3 added−3 removed

3 files+3 added−3 removed

modified:shell/key-bindings.bash+1 added-1 removed
modified:shell/key-bindings.fish+1 added-1 removed
85 unmodified lines
86 set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS"87 eval "$FZF_ALT_C_COMMAND | "(__fzfcmd)' +m --query "'$fzf_query'"' | read -l result8889 if [ -n "$result" ]90 cd -- $result90 builtin cd -- $result9192 # Remove last token from commandline.93 commandline -t ""94 commandline -it -- $prefix
78 unmodified lines
modified:shell/key-bindings.zsh+1 added-1 removed
79 unmodified lines
80 zle redisplay81 return 082 fi83 zle push-line # Clear buffer. Auto-restored on next prompt.84 BUFFER="cd -- ${(q)dir}"84 BUFFER="builtin cd -- ${(q)dir}"85 zle accept-line86 local ret=$?87 unset dir # ensure this doesn't end up appearing in prompt expansion88 zle reset-prompt
32 unmodified lines