Skip to content
Myr

fix(zsh): avoid double call for 'chpwd' in alt-c

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

fix suggested by @lucc; closes #4879

authored by LangLangBart · committed by Junegunn Choi · parent ca51a57 · Browse files · 1 file+1 added−1 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+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:shell/key-bindings.zsh+1 added-1 removed
113 unmodified lines
114 # This allows the recorded shell history to be reused even from a different115 # working directory.116 # If failed, fallback to the unexpanded path to surface the error to the user.117 # NOTE: Don't use the `:a` modifier as it resolves symlinks like `pwd -P`.118 dir=$(builtin cd >/dev/null -- "${dir}" && echo "${PWD}" || echo "${dir}")118 dir=$(builtin cd -q >/dev/null -- "${dir}" && echo "${PWD}" || echo "${dir}")119 zle push-line # Clear buffer. Auto-restored on next prompt.120 BUFFER="builtin cd -- ${(q)dir}"121 zle accept-line122 local ret=$?
81 unmodified lines