mirror of
https://github.com/sorin-ionescu/prezto.git
synced 2025-01-23 07:52:15 +08:00
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.
This commit is contained in:
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…
Reference in New Issue
Block a user