aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme5
1 files changed, 2 insertions, 3 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 74c57d57..8074bd29 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -756,9 +756,8 @@ getUniqueHomeFolder() {
local -a matching
local -a paths
local cur_path='/'
- # the first time we run the script, the working directory *should* be the home folder
- [[ -z $HOME ]] && paths=${PWD} || paths=$HOME
- paths=(${(s:/:)paths})
+ # all users have the $HOME variable set automatically... see http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html
+ paths=(${(s:/:)HOME})
for directory in ${paths[@]}; do
test_dir=''
for (( i=0; i < ${#directory}; i++ )); do