1
0
Fork 0

add config variable to allow full PWD to be printed

pull/1174/head
Jason 'vanRijn' Kasper 8 years ago
parent 4f19700919
commit 8a5803444e

@ -38,8 +38,10 @@ function prompt_sorin_pwd {
if [[ "$pwd" == (#m)[/~] ]]; then if [[ "$pwd" == (#m)[/~] ]]; then
_prompt_sorin_pwd="$MATCH" _prompt_sorin_pwd="$MATCH"
unset MATCH unset MATCH
else elif [[ "$SORIN_PROMPT_SHORT_PWD" == 'Y' ]]; then
_prompt_sorin_pwd="${${${${(@j:/:M)${(@s:/:)pwd}##.#?}:h}%/}//\%/%%}/${${pwd:t}//\%/%%}" _prompt_sorin_pwd="${${${${(@j:/:M)${(@s:/:)pwd}##.#?}:h}%/}//\%/%%}/${${pwd:t}//\%/%%}"
else
_prompt_sorin_pwd="$pwd"
fi fi
} }
@ -130,6 +132,12 @@ function prompt_sorin_setup {
zstyle ':prezto:module:git:info:keys' format \ zstyle ':prezto:module:git:info:keys' format \
'status' '$(coalesce "%b" "%p" "%c")%s%A%B%S%a%d%m%r%U%u' 'status' '$(coalesce "%b" "%p" "%c")%s%A%B%S%a%d%m%r%U%u'
# See if our user has turned off shortened pwd (default to on)
zstyle -s ':prezto:module:prompt:theme:sorin' shortPWD \
'SORIN_PROMPT_SHORT_PWD' \
|| SORIN_PROMPT_SHORT_PWD='Y'
SORIN_PROMPT_SHORT_PWD="${(C)SORIN_PROMPT_SHORT_PWD[1,1]}"
# Define prompts. # Define prompts.
PROMPT='${SSH_TTY:+"%F{9}%n%f%F{7}@%f%F{3}%m%f "}%F{4}${_prompt_sorin_pwd}%(!. %B%F{1}#%f%b.)${editor_info[keymap]} ' PROMPT='${SSH_TTY:+"%F{9}%n%f%F{7}@%f%F{3}%m%f "}%F{4}${_prompt_sorin_pwd}%(!. %B%F{1}#%f%b.)${editor_info[keymap]} '
RPROMPT='' RPROMPT=''

Loading…
Cancel
Save