mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-26 14:30:12 +08: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
@ -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 New Issue
Block a user