1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-09-25 04:30:46 +00:00

Cleaned up DIR_PATH_HIGHLIGHT code

Removed double call to %F and changed $x variables to ${x} for
consistency.
This commit is contained in:
Christo Kotze 2018-02-14 12:15:56 +04:00
parent 2e417ec510
commit 9c6330624e

View file

@ -874,15 +874,15 @@ prompt_dir() {
if [[ -n ${POWERLEVEL9K_DIR_PATH_HIGHLIGHT_FOREGROUND} ]]; then
if [[ $path_opt == "/" || $path_opt == "~" || "${(L)POWERLEVEL9K_DIR_OMIT_FIRST_CHARACTER}" == "true" ]]; then
current_path="$bld%F{$POWERLEVEL9K_DIR_PATH_HIGHLIGHT_FOREGROUND}$current_path%F{$dir_state_foreground}%b%F{$dir_state_foreground}"
current_path="${bld}%F{$POWERLEVEL9K_DIR_PATH_HIGHLIGHT_FOREGROUND}${current_path}%b%F{$dir_state_foreground}"
else
current_path="${dir_name}/$bld%F{$POWERLEVEL9K_DIR_PATH_HIGHLIGHT_FOREGROUND}${base_name}%b%F{$dir_state_foreground}"
current_path="${dir_name}/${bld}%F{$POWERLEVEL9K_DIR_PATH_HIGHLIGHT_FOREGROUND}${base_name}%b%F{$dir_state_foreground}"
fi
else
if [[ $path_opt == "/" || $path_opt == "~" || "${(L)POWERLEVEL9K_DIR_OMIT_FIRST_CHARACTER}" == "true" ]]; then
current_path="$bld%F{$dir_state_foreground}$current_path%b%F{$dir_state_foreground}"
current_path="${bld}${current_path}%b%F{$dir_state_foreground}"
else
current_path="%F{$dir_state_foreground}${dir_name}/$bld${base_name}%b%F{$dir_state_foreground}"
current_path="${dir_name}/${bld}${base_name}%b%F{$dir_state_foreground}"
fi
fi