Skip to content
Myr

[shell] Make ALT-C use the absolute path to the selected directory (#3688)

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

Rationale: this way the resulting cd command that ends up in the shell history can be reused to get to the same location regardless of the current working directory.

authored by Emilio Vesprini · committed by GitHub · parent dff8652 · Browse files · 2 files+2 added−2 removed
This commit

State

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

Trailers

  • Co-authored-by: LangLangBart <92653266+LangLangBart@users.noreply.github.com>

Diff stats

2 files+2 added−2 removed

  • other:+2 added−2 removed

2 files+2 added−2 removed

modified:shell/key-bindings.bash+1 added-1 removed
modified:shell/key-bindings.zsh+1 added-1 removed
76 unmodified lines
77 zle redisplay78 return 079 fi80 zle push-line # Clear buffer. Auto-restored on next prompt.81 BUFFER="builtin cd -- ${(q)dir}"81 BUFFER="builtin cd -- ${(q)dir:a}"82 zle accept-line83 local ret=$?84 unset dir # ensure this doesn't end up appearing in prompt expansion85 zle reset-prompt
36 unmodified lines