From 652037ebdfbe581e4c7dfcd0862ac2d1577c86d9 Mon Sep 17 00:00:00 2001 From: ditzy Date: Thu, 25 Jan 2024 03:19:01 -0600 Subject: [PATCH] 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. --- plugins/jump/jump.plugin.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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() {