Merge 2afa8e43ae
into 9195b66161
This commit is contained in:
commit
d337b2a674
1 changed files with 5 additions and 3 deletions
|
@ -12,13 +12,15 @@ 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}
|
||||
elif zstyle -m ':prezto:module:prompt' pwd-length 'tail'; then
|
||||
ret_directory=${current_pwd:t}
|
||||
else
|
||||
ret_directory="${${${${(@j:/:M)${(@s:/:)current_pwd}##.#?}:h}%/}//\%/%%}/${${current_pwd:t}//\%/%%}"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue