aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2018-06-07 02:27:15 +0300
committerDominik Ritter <dritter03@googlemail.com>2018-06-07 02:27:15 +0300
commit47e2aed4b2d19775b6f495dc6695d1b876aef083 (patch)
treeca0d1945c68ffa2273273789c77d9e521131da67 /powerlevel9k.zsh-theme
parentdb7638056352caae9ae738259ac0e636f918e0c3 (diff)
parent557f5993ea7c8ae1fb196bcb21c4e9fd9dee26ce (diff)
Merge remote-tracking branch 'sambadevi/feature/etc-option-in-dir-segment' into staging_065
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme5
1 files changed, 4 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index c087cfbf..acd7c78a 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -915,10 +915,13 @@ prompt_dir() {
"HOME" "HOME_ICON"
"HOME_SUBFOLDER" "HOME_SUB_ICON"
"NOT_WRITABLE" "LOCK_ICON"
+ "ETC" "ETC_ICON"
)
local state_path="$(print -P '%~')"
local current_state="DEFAULT"
- if [[ "${POWERLEVEL9K_DIR_SHOW_WRITABLE}" == true && ! -w "$PWD" ]]; then
+ if [[ $state_path == '/etc'* ]]; then
+ current_state='ETC'
+ elif [[ "${POWERLEVEL9K_DIR_SHOW_WRITABLE}" == true && ! -w "$PWD" ]]; then
current_state="NOT_WRITABLE"
elif [[ $state_path == '~' ]]; then
current_state="HOME"