diff --git a/z.sh b/z.sh index fbc2f04..c2036c6 100644 --- a/z.sh +++ b/z.sh @@ -31,6 +31,9 @@ _z() { local datafile="${_Z_DATA:-$HOME/.z}" + # if symlink, dereference + [ -h "$datafile" ] && datafile=$(readlink "$datafile") + # bail if we don't own ~/.z and $_Z_OWNER not set [ -z "$_Z_OWNER" -a -f "$datafile" -a ! -O "$datafile" ] && return