mirror of
https://github.com/sorin-ionescu/prezto.git
synced 2025-01-23 04:52:16 +08:00
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
@ -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 New Issue
Block a user