aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2016-01-09 18:25:15 +0300
committerDominik Ritter <dritter03@googlemail.com>2016-01-09 18:25:15 +0300
commit989a9b3b4b6cf1c254388f5e350a709a01097979 (patch)
tree1bf747fc223c3722e5ad544e1878cb12a38f7a3d
parentc84da5e744db960a17c09485720ff1c094b1f6e8 (diff)
Improved symlink dereferencing on OSX by calling a perl script.
-rwxr-xr-xpowerlevel9k.zsh-theme2
1 files changed, 1 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index edd16582..0c0460a9 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -51,7 +51,7 @@ fi
# If this theme is sourced as a symlink, we need to locate the true URL
if [[ -L $0 ]]; then
# Script is a symlink
- filename="$(realpath -P $0 2>/dev/null || readlink -f $0 2>/dev/null)"
+ filename="$(realpath -P $0 2>/dev/null || readlink -f $0 2>/dev/null || perl -MCwd=abs_path -le 'print abs_path readlink(shift);' $0 2>/dev/null)"
elif [[ -f $0 ]]; then
# Script is a file
filename="$0"