diff options
| author | ditzy <thesourceofx@gmail.com> | 2024-01-25 03:19:01 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-25 10:19:01 +0100 |
| commit | 652037ebdfbe581e4c7dfcd0862ac2d1577c86d9 (patch) | |
| tree | ea65e717af184977ae24bd850df2e66cf10d15d2 | |
| parent | e656377d36077b0ca757d995c9c35f0fea7c7fdd (diff) | |
| download | zsh-652037ebdfbe581e4c7dfcd0862ac2d1577c86d9.tar.gz zsh-652037ebdfbe581e4c7dfcd0862ac2d1577c86d9.tar.bz2 zsh-652037ebdfbe581e4c7dfcd0862ac2d1577c86d9.zip | |
fix(jump)!: only resolve mark symlink (#11074)
BREAKING CHANGE: Previously, `jump` would resolve the symlink to the mark directory and resolve again if the mark directory was also a symlink. It only resolves once after this commit.
| -rw-r--r-- | plugins/jump/jump.plugin.zsh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh index 829c9d9cb..c2b21e92e 100644 --- a/plugins/jump/jump.plugin.zsh +++ b/plugins/jump/jump.plugin.zsh @@ -8,8 +8,10 @@ # export MARKPATH=$HOME/.marks + jump() { - builtin cd -P "$MARKPATH/$1" 2>/dev/null || {echo "No such mark: $1"; return 1} + local markpath="$(readlink $MARKPATH/$1)" || {echo "No such mark: $1"; return 1} + builtin cd "$markpath" 2>/dev/null || {echo "Destination does not exist for mark [$1]: $markpath"; return 2} } mark() { |
