mirror of
https://github.com/sorin-ionescu/prezto.git
synced 2025-01-23 11:22:17 +08:00
Merge 2afa8e43ae
into 6e564503f1
This commit is contained in:
commit
fafc919768
@ -12,13 +12,15 @@ setopt localoptions extendedglob
|
|||||||
local current_pwd="${PWD/#$HOME/~}"
|
local current_pwd="${PWD/#$HOME/~}"
|
||||||
local ret_directory
|
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"
|
ret_directory="$MATCH"
|
||||||
unset 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
|
elif zstyle -m ':prezto:module:prompt' pwd-length 'long'; then
|
||||||
ret_directory=${current_pwd}
|
ret_directory=${current_pwd}
|
||||||
|
elif zstyle -m ':prezto:module:prompt' pwd-length 'tail'; then
|
||||||
|
ret_directory=${current_pwd:t}
|
||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user