aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorRichard Tippl <richard.tippl@gmail.com>2017-08-10 18:49:42 +0300
committerRichard Tippl <richard.tippl@gmail.com>2017-08-10 18:49:42 +0300
commitc4a1d91118abe95f4f5ce0580ffe58b452affefa (patch)
tree9162d6ef553419484d9bacdfc22fed51511d4348 /powerlevel9k.zsh-theme
parentb567ab22c2889726974dcfed543cc9ecb7e190cb (diff)
Added a default value for DIR_SHOW_WRITABLE.
Variable POWERLEVEL9K_DIR_SHOW_WRITABLE is now default set to false.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme3
1 files changed, 2 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 807495ec..8c78cb00 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -689,6 +689,7 @@ prompt_command_execution_time() {
# Dir: current working directory
set_default POWERLEVEL9K_DIR_PATH_SEPARATOR "/"
set_default POWERLEVEL9K_HOME_FOLDER_ABBREVIATION "~"
+set_default POWERLEVEL9K_DIR_SHOW_WRITABLE false
prompt_dir() {
local current_path="$(print -P "%~")"
if [[ -n "$POWERLEVEL9K_SHORTEN_DIR_LENGTH" || "$POWERLEVEL9K_SHORTEN_STRATEGY" == "truncate_with_folder_marker" ]]; then
@@ -805,7 +806,7 @@ prompt_dir() {
"NOT_WRITABLE" "LOCK_ICON"
)
local current_state="DEFAULT"
- if [[ "${POWERLEVEL9K_DIR_SHOW_WRITABLE}" == "true" && ! -w "$PWD" ]]; then
+ if [[ "${POWERLEVEL9K_DIR_SHOW_WRITABLE}" == true && ! -w "$PWD" ]]; then
current_state="NOT_WRITABLE"
elif [[ $(print -P "%~") == '~' ]]; then
current_state="HOME"