From 27a599e03ee30022565c27a3e10d73820a3f3087 Mon Sep 17 00:00:00 2001 From: romkatv Date: Thu, 28 Feb 2019 08:37:24 +0100 Subject: [PATCH] add dir-writable indicator to the dir prompt key --- powerlevel9k.zsh-theme | 1 + 1 file changed, 1 insertion(+) 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/"~"}