Skip to content
Myr

Revert "[shell][zsh] Don't resolve symlinks in ALT-c (#4816) (#4817)"

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

This reverts commit 249a6df4a489dacd28e2c50395909571671ff707.

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

  • other:+1 added−7 removed

1 file+1 added−7 removed

modified:shell/key-bindings.zsh+1 added-7 removed
108 unmodified lines
109 if [[ -z "$dir" ]]; then110 zle redisplay111 return 0112 fi113 # Use subshell expansion to get the absolute PWD of the target dir.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}")113 zle push-line # Clear buffer. Auto-restored on next prompt.120 BUFFER="builtin cd -- ${(q)dir}"114 BUFFER="builtin cd -- ${(q)dir:a}"115 zle accept-line116 local ret=$?117 unset dir # ensure this doesn't end up appearing in prompt expansion118 zle reset-prompt
79 unmodified lines