1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-22 18:38:00 +00:00

Convert long-pwd to pwd-length

This commit is contained in:
Kyle Rich 2017-04-27 11:25:42 -06:00 committed by Kaleb Elwert
parent 7c509a264f
commit 723b3812e1
2 changed files with 5 additions and 3 deletions

View File

@ -9,7 +9,9 @@ local ret_directory
if [[ "$current_pwd" == (#m)[/~] ]]; then if [[ "$current_pwd" == (#m)[/~] ]]; then
ret_directory="$MATCH" ret_directory="$MATCH"
unset MATCH unset MATCH
elif zstyle -t ':prezto:module:prompt' long-pwd; then elif zstyle -m ':prezto:module:prompt' pwd-length 'full'; then
ret_directory=${PWD}
elif zstyle -m ':prezto:module:prompt' pwd-length 'long'; then
ret_directory=${current_pwd} ret_directory=${current_pwd}
else else
ret_directory="${${${${(@j:/:M)${(@s:/:)current_pwd}##.#?}:h}%/}//\%/%%}/${${current_pwd:t}//\%/%%}" ret_directory="${${${${(@j:/:M)${(@s:/:)current_pwd}##.#?}:h}%/}//\%/%%}/${${current_pwd:t}//\%/%%}"

View File

@ -97,8 +97,8 @@ zstyle ':prezto:module:editor' key-bindings 'emacs'
# Auto set to 'off' on dumb terminals. # Auto set to 'off' on dumb terminals.
zstyle ':prezto:module:prompt' theme 'sorin' zstyle ':prezto:module:prompt' theme 'sorin'
# Display pwd in long format for themes that use promptpwd function # Set how themes that use promptpwd function display the pwd, can be 'short', 'long', or 'full'
# zstyle ':prezto:module:prompt' long-pwd 'yes' # zstyle ':prezto:module:prompt' pwd-length 'short'
# #
# Ruby # Ruby