aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristo Kotze <onaforeignshore@hotmail.co.uk>2018-02-23 09:21:02 +0300
committerChristo Kotze <onaforeignshore@hotmail.co.uk>2018-02-23 09:21:02 +0300
commit5cec4d652a7428bfc8900f84be0bb6885e2e12ef (patch)
tree1bcecf5b5824cbeb2891bdc8897a788ee88d526f
parent75a763f9018595ad861966e11de560ab00b8cd87 (diff)
Added POWERLEVEL9K_DIR_PATH_ABSOLUTE to README.md
-rw-r--r--README.md1
-rwxr-xr-xpowerlevel9k.zsh-theme4
2 files changed, 3 insertions, 2 deletions
diff --git a/README.md b/README.md
index 1dbe756e..26298b18 100644
--- a/README.md
+++ b/README.md
@@ -368,6 +368,7 @@ Customizations available are:
| Variable | Default Value | Description |
|----------|---------------|-------------|
+|`POWERLEVEL9K_DIR_PATH_ABSOLUTE`|None|If set to `true`, will use absolute paths instead of home folder abbreviation `~`|
|`POWERLEVEL9K_SHORTEN_DIR_LENGTH`|`2`|If your shorten strategy, below, is entire directories, this field determines how many directories to leave at the end. If your shorten strategy is by character count, this field determines how many characters to allow per directory string.|
|`POWERLEVEL9K_SHORTEN_STRATEGY`|None|How the directory strings should be truncated. See the table below for more informations.|
|`POWERLEVEL9K_SHORTEN_DELIMITER`|`..`|Delimiter to use in truncated strings. This can be any string you choose, including an empty string if you wish to have no delimiter.|
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index c404c0c2..baf46336 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -894,9 +894,9 @@ prompt_dir() {
local current_state="DEFAULT"
if [[ "${POWERLEVEL9K_DIR_SHOW_WRITABLE}" == true && ! -w "$PWD" ]]; then
current_state="NOT_WRITABLE"
- elif [[ $state_path == $HOME ]]; then # changed '~' to $HOME for compatibility with POWERLEVEL9K_DIR_PATH_ABSOLUTE
+ elif [[ "$state_path" == "$HOME" ]]; then # changed '~' to $HOME for compatibility with POWERLEVEL9K_DIR_PATH_ABSOLUTE
current_state="HOME"
- elif [[ $state_path == $HOME* ]]; then # changed '~'* to $HOME* for compatibility with POWERLEVEL9K_DIR_PATH_ABSOLUTE
+ elif [[ "$state_path" == "$HOME"* ]]; then # changed '~'* to $HOME* for compatibility with POWERLEVEL9K_DIR_PATH_ABSOLUTE
current_state="HOME_SUBFOLDER"
fi