1
0
Fork 0

Add pwd-length option 'tail'

This option makes `prompt-pwd` only show the last directory in the path,
for minimalist prompts
pull/1476/head
Zoey Llewellyn Hewll 7 years ago
parent b3a2a7bfeb
commit 2afa8e43ae

@ -19,6 +19,8 @@ elif [[ "$current_pwd" == (#m)[/~] ]]; then
unset MATCH
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…
Cancel
Save