1
0
Fork 0

Ensure 'full' pwd-length always expands '~'

Prompt-pwd's 'full' option always expands '~', as opposed to only
expanding when '~' would be followed by other directories.
This means the path is always in a consistent format, rather than
alternating between expanded and condensed.
pull/1476/head
Zoey Llewellyn Hewll 7 years ago
parent 1d0bee6098
commit b3a2a7bfeb

@ -12,11 +12,11 @@ setopt localoptions extendedglob
local current_pwd="${PWD/#$HOME/~}"
local ret_directory
if [[ "$current_pwd" == (#m)[/~] ]]; then
if zstyle -m ':prezto:module:prompt' pwd-length 'full'; then
ret_directory=${PWD}
elif [[ "$current_pwd" == (#m)[/~] ]]; then
ret_directory="$MATCH"
unset MATCH
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}
else

Loading…
Cancel
Save