dir: ignore separator overrides if cwd is / and POWERLEVEL9K_DIR_OMIT_FIRST_CHARACTER is true
This commit is contained in:
parent
3586cc8d7e
commit
42aa719e48
|
@ -1997,6 +1997,9 @@ prompt_dir() {
|
||||||
parts=("${(@)parts//$'\3'}")
|
parts=("${(@)parts//$'\3'}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $_p9k__cwd == / && $_POWERLEVEL9K_DIR_OMIT_FIRST_CHARACTER == 1 ]]; then
|
||||||
|
local sep='/'
|
||||||
|
else
|
||||||
local sep=''
|
local sep=''
|
||||||
if (( $+parameters[_POWERLEVEL9K_DIR_PATH_SEPARATOR_FOREGROUND] ||
|
if (( $+parameters[_POWERLEVEL9K_DIR_PATH_SEPARATOR_FOREGROUND] ||
|
||||||
$+parameters[_POWERLEVEL9K_${(U)state}_PATH_SEPARATOR_FOREGROUND] )); then
|
$+parameters[_POWERLEVEL9K_${(U)state}_PATH_SEPARATOR_FOREGROUND] )); then
|
||||||
|
@ -2010,6 +2013,7 @@ prompt_dir() {
|
||||||
(( expand )) && _p9k_escape $_p9k__ret
|
(( expand )) && _p9k_escape $_p9k__ret
|
||||||
sep+=$_p9k__ret
|
sep+=$_p9k__ret
|
||||||
[[ $sep == *%* ]] && sep+=$style
|
[[ $sep == *%* ]] && sep+=$style
|
||||||
|
fi
|
||||||
|
|
||||||
local content="${(pj.$sep.)parts}"
|
local content="${(pj.$sep.)parts}"
|
||||||
if (( _POWERLEVEL9K_DIR_HYPERLINK && _p9k_term_has_href )) && [[ $_p9k__cwd == /* ]]; then
|
if (( _POWERLEVEL9K_DIR_HYPERLINK && _p9k_term_has_href )) && [[ $_p9k__cwd == /* ]]; then
|
||||||
|
|
Loading…
Reference in New Issue