Browse Source

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.
ditzy 3 months ago
parent
commit
652037ebdf
1 changed files with 3 additions and 1 deletions
  1. 3 1
      plugins/jump/jump.plugin.zsh

+ 3 - 1
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() {