aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-02-28 10:37:24 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-02-28 10:37:24 +0300
commit27a599e03ee30022565c27a3e10d73820a3f3087 (patch)
tree3f4b9a700026cbf4d1ac5f767f975d5ee21a9e76 /powerlevel9k.zsh-theme
parent77b319c0d3fba1e216fb0187bd1bffefc8fd8fd4 (diff)
add dir-writable indicator to the dir prompt key
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme1
1 files changed, 1 insertions, 0 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 303bf4b1..063f7238 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -885,6 +885,7 @@ prompt_dir() {
# using $PWD instead of "$(print -P '%~')" to allow use of POWERLEVEL9K_DIR_PATH_ABSOLUTE
local current_path=$PWD # WAS: local current_path="$(print -P '%~')"
local cache_key="$0 $2 ${(q)current_path}"
+ [[ "${POWERLEVEL9K_DIR_SHOW_WRITABLE}" == true && ! -w "$PWD" ]] && cache_key+=" W";
if ! p9k_cache_get $cache_key; then
# check if the user wants to use absolute paths or "~" paths
[[ ${(L)POWERLEVEL9K_DIR_PATH_ABSOLUTE} != "true" ]] && current_path=${current_path/#$HOME/"~"}