diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2015-06-07 02:48:02 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2015-06-07 02:48:02 +0300 |
commit | 891f5567fd198220cd2b7b4e471a465ac736579e (patch) | |
tree | 5d7220de952e80eaefe3c878d3090c54b99d587c /powerlevel9k.zsh-theme | |
parent | fea1d7ec5e21be22f7bd58480a323f4509ff656e (diff) |
Limit to whole folders, not just characters.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rw-r--r-- | powerlevel9k.zsh-theme | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 1cd6a870..a049f863 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -319,9 +319,9 @@ prompt_context() { # Dir: current working directory prompt_dir() { local current_path='%~' - if [[ -n "$POWERLEVEL9K_SHORTEN_PWD_LENGTH" ]]; then - # shorten path to $POWERLEVEL9K_SHORTEN_PWD_LENGTH characters - local current_path="%${POWERLEVEL9K_SHORTEN_PWD_LENGTH}<..<%~%<<" + if [[ -n "$POWERLEVEL9K_SHORTEN_DIR_LENGTH" ]]; then + # shorten path to $POWERLEVEL9K_SHORTEN_DIR_LENGTH + current_path="%$((POWERLEVEL9K_SHORTEN_DIR_LENGTH+1))(c:.../:)%${POWERLEVEL9K_SHORTEN_DIR_LENGTH}c" fi $1_prompt_segment $0 blue $DEFAULT_COLOR $current_path |