Browse Source

Add zstyle option to show pwd in long format

master
Kyle Rich 8 years ago committed by Kaleb Elwert
parent
commit
7c509a264f
  1. 2
      modules/prompt/functions/promptpwd
  2. 3
      runcoms/zpreztorc

2
modules/prompt/functions/promptpwd

@ -9,6 +9,8 @@ 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
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}//\%/%%}"
fi fi

3
runcoms/zpreztorc

@ -97,6 +97,9 @@ 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
# zstyle ':prezto:module:prompt' long-pwd 'yes'
# #
# Ruby # Ruby
# #

Loading…
Cancel
Save