Browse Source

jump: fix behavior when reusing a mark (#7197)

Force the mark to point to the new dir, replacing the old one.

Fixes #7195
Rubén Durán Balda 6 years ago
parent
commit
ca45d510dd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      plugins/jump/jump.plugin.zsh

+ 1 - 1
plugins/jump/jump.plugin.zsh

@@ -19,7 +19,7 @@ mark() {
 		MARK="$1"
 	fi
 	if read -q \?"Mark $PWD as ${MARK}? (y/n) "; then
-		mkdir -p "$MARKPATH"; ln -s "$PWD" "$MARKPATH/$MARK"
+		mkdir -p "$MARKPATH"; ln -sfh "$PWD" "$MARKPATH/$MARK"
 	fi
 }