Merge branch 'symlink_resolving_improvement' of https://github.com/dritter/powerlevel9k into dritter-symlink_resolving_improvement

This commit is contained in:
Ben Hilburn 2016-01-14 13:13:30 -08:00
commit 88ed3c2378
1 changed files with 1 additions and 1 deletions

View File

@ -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"