diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2017-01-30 23:10:09 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2017-01-30 23:10:09 +0300 |
commit | b379f03f148d99a0da8c8eb200f17b3007a87e47 (patch) | |
tree | 92a7f0c005b46af16308f06a14405a155d821534 /powerlevel9k.zsh-theme | |
parent | a58e8bdc8cf4c51c80dc9e63eef52e95214c54f2 (diff) |
Add ability to omit the first character in dir path
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index f104b789..3010790e 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -616,6 +616,10 @@ prompt_dir() { esac fi + if [[ "${POWERLEVEL9K_DIR_OMIT_FIRST_CHARACTER}" == "true" ]]; then + current_path="${current_path[2,-1]}" + fi + if [[ "${POWERLEVEL9K_DIR_PATH_SEPARATOR}" != "/" ]]; then current_path=$(print -P "${current_path}" | sed "s/\//${POWERLEVEL9K_DIR_PATH_SEPARATOR}/g") fi |