diff --git a/functions/utilities.zsh b/functions/utilities.zsh index 9f1ea53e..a539fc6e 100644 --- a/functions/utilities.zsh +++ b/functions/utilities.zsh @@ -234,7 +234,7 @@ function truncatePath() { # if the path is in the home folder, don't add a "/" to the start [[ $1 != "~"* ]] && trunc_path='/' || trunc_path='' # split the path into an array using "/" as the delimiter and remove "~/" - local paths=(${(s:/:)1}) + local paths=(${(s:/:)${1}}) # declare locals for the directory being tested and its length local test_dir test_dir_length # do the needed truncation