mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-15 18:30:08 +00:00
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.
This commit is contained in:
parent
e656377d36
commit
652037ebdf
1 changed files with 3 additions and 1 deletions
|
@ -8,8 +8,10 @@
|
||||||
#
|
#
|
||||||
export MARKPATH=$HOME/.marks
|
export MARKPATH=$HOME/.marks
|
||||||
|
|
||||||
|
|
||||||
jump() {
|
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() {
|
mark() {
|
||||||
|
|
Loading…
Reference in a new issue