mirror of
https://github.com/junegunn/fzf.git
synced 2026-08-12 02:42:37 +08:00
fix(zsh): avoid double call for 'chpwd' in alt-c
fix suggested by @lucc; closes #4879
This commit is contained in:
committed by
Junegunn Choi
parent
ca51a57aed
commit
e36576429d
@@ -115,7 +115,7 @@ fzf-cd-widget() {
|
|||||||
# working directory.
|
# working directory.
|
||||||
# If failed, fallback to the unexpanded path to surface the error to the user.
|
# If failed, fallback to the unexpanded path to surface the error to the user.
|
||||||
# NOTE: Don't use the `:a` modifier as it resolves symlinks like `pwd -P`.
|
# NOTE: Don't use the `:a` modifier as it resolves symlinks like `pwd -P`.
|
||||||
dir=$(builtin cd >/dev/null -- "${dir}" && echo "${PWD}" || echo "${dir}")
|
dir=$(builtin cd -q >/dev/null -- "${dir}" && echo "${PWD}" || echo "${dir}")
|
||||||
zle push-line # Clear buffer. Auto-restored on next prompt.
|
zle push-line # Clear buffer. Auto-restored on next prompt.
|
||||||
BUFFER="builtin cd -- ${(q)dir}"
|
BUFFER="builtin cd -- ${(q)dir}"
|
||||||
zle accept-line
|
zle accept-line
|
||||||
|
|||||||
Reference in New Issue
Block a user