diff options
author | Christo Kotze <onaforeignshore@hotmail.co.uk> | 2018-02-19 22:52:07 +0300 |
---|---|---|
committer | Christo Kotze <onaforeignshore@hotmail.co.uk> | 2018-02-19 22:52:07 +0300 |
commit | 04726d21ef4acb46cd995eb21ad631632a09f6ff (patch) | |
tree | 67fb7ab51ae12ad866929ca1efd0e1a9b8cd9015 /functions/utilities.zsh | |
parent | 4996e955e02108eadcb57a5cc1e181dd2c008734 (diff) |
Changed path splitting to test Travis
Diffstat (limited to 'functions/utilities.zsh')
-rw-r--r-- | functions/utilities.zsh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/functions/utilities.zsh b/functions/utilities.zsh index a539fc6e..c59652f5 100644 --- a/functions/utilities.zsh +++ b/functions/utilities.zsh @@ -232,9 +232,9 @@ function truncatePath() { # create a variable for the truncated path. local trunc_path # 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}}) + [[ $1 == "~"* ]] && trunc_path='' || trunc_path='/' + # split the path into an array using "/" as the delimiter + local paths=(${(s:/:)1}) # declare locals for the directory being tested and its length local test_dir test_dir_length # do the needed truncation |