Add pwd-length option 'tail'
This option makes `prompt-pwd` only show the last directory in the path, for minimalist prompts
This commit is contained in:
parent
b3a2a7bfeb
commit
2afa8e43ae
1 changed files with 2 additions and 0 deletions
|
@ -19,6 +19,8 @@ elif [[ "$current_pwd" == (#m)[/~] ]]; then
|
|||
unset MATCH
|
||||
elif zstyle -m ':prezto:module:prompt' pwd-length 'long'; then
|
||||
ret_directory=${current_pwd}
|
||||
elif zstyle -m ':prezto:module:prompt' pwd-length 'tail'; then
|
||||
ret_directory=${current_pwd:t}
|
||||
else
|
||||
ret_directory="${${${${(@j:/:M)${(@s:/:)current_pwd}##.#?}:h}%/}//\%/%%}/${${current_pwd:t}//\%/%%}"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue