diff options
author | Christo Kotze <onaforeignshore@hotmail.co.uk> | 2018-02-18 15:35:07 +0300 |
---|---|---|
committer | Christo Kotze <onaforeignshore@hotmail.co.uk> | 2018-02-18 15:35:07 +0300 |
commit | 8180d724efd4e7f97808429d3ea12cec585a7465 (patch) | |
tree | c45db8948aeb18bf5871049d589b7242b80ab76d /powerlevel9k.zsh-theme | |
parent | b1b0ad949a0ee558fa6b6c25882b961c8200a9eb (diff) |
Added test for dir_length == trunc_length
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 0f6461c3..6572b2d0 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -761,7 +761,7 @@ prompt_dir() { cur_dir=$directory dir_length=${#cur_dir} local threshhold=$(( $POWERLEVEL9K_SHORTEN_DIR_LENGTH + ${#delim} )) - if (( ( $dir_length + 1) > $threshhold )) && [[ $cur_dir != $paths[${#paths}] ]]; then # only shorten if long enough and not last path + if (( ( $dir_length > $threshhold )) && [[ !c $dir_length == $POWERLEVEL9K_SHORTEN_DIR_LENGTH && $cur_dir != $paths[${#paths}] ]]; then # only shorten if long enough and not last path cur_dir=${cur_dir:0:$POWERLEVEL9K_SHORTEN_DIR_LENGTH}$delim fi cur_short_path+="$cur_dir/" |