diff options
author | Christo Kotze <onaforeignshore@hotmail.co.uk> | 2018-02-11 16:49:09 +0300 |
---|---|---|
committer | Christo Kotze <onaforeignshore@hotmail.co.uk> | 2018-02-11 16:49:09 +0300 |
commit | 5491ee35c33ac8321fa6e61f1c330a1731e5d689 (patch) | |
tree | 2ac916f48e665b5618c638d55e89bb5fc269d4be | |
parent | 4ac02b0f1b92dae3710805fcbd60bca4af5315b0 (diff) |
Updated logic in prompt_dir
Added a case where there is no last dir foreground, but still bold.
-rwxr-xr-x | powerlevel9k.zsh-theme | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index c99da804..e5429635 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -870,9 +870,15 @@ prompt_dir() { if [[ -n ${POWERLEVEL9K_DIR_PATH_HIGHLIGHT_FOREGROUND} ]]; then if [[ $path_opt == "/" || $path_opt == "~" || $(dirname $path_opt) == "/" || ${POWERLEVEL9K_DIR_OMIT_FIRST_CHARACTER} ]]; then - current_path="$bld%F{$POWERLEVEL9K_DIR_PATH_HIGHLIGHT_FOREGROUND}$current_path%F{$dir_state_foreground}%b" + current_path="$bld%F{$POWERLEVEL9K_DIR_PATH_HIGHLIGHT_FOREGROUND}$current_path%F{$dir_state_foreground}%b%F{$dir_state_foreground}" else - current_path="$(dirname $current_path)/$bld%F{$POWERLEVEL9K_DIR_PATH_HIGHLIGHT_FOREGROUND}$(basename $current_path)%F{$dir_state_foreground}%b" + current_path="$(dirname $current_path)/$bld%F{$POWERLEVEL9K_DIR_PATH_HIGHLIGHT_FOREGROUND}$(basename $current_path)%b%F{$dir_state_foreground}" + fi + else + if [[ $path_opt == "/" || $path_opt == "~" || $(dirname $path_opt) == "/" || ${POWERLEVEL9K_DIR_OMIT_FIRST_CHARACTER} ]]; then + current_path="$bld%F{$dir_state_foreground}$current_path%b%F{$dir_state_foreground}" + else + current_path="%F{$dir_state_foreground}$(dirname $current_path)/$bld$(basename $current_path)%b%F{$dir_state_foreground}" fi fi |