mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-25 21:40:08 +00:00
bug fix: truncate_to_last didn't behave like %1~ in / and /foo
This commit is contained in:
parent
cee4a16e7d
commit
a3282100f0
1 changed files with 5 additions and 3 deletions
|
@ -1766,8 +1766,10 @@ prompt_dir() {
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
truncate_to_last)
|
truncate_to_last)
|
||||||
fake_first=$(($#parts > 1))
|
if [[ $#parts -gt 2 || $p[1] != / && $#parts -gt 1 ]]; then
|
||||||
|
fake_first=1
|
||||||
parts[1,-2]=()
|
parts[1,-2]=()
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
truncate_to_first_and_last)
|
truncate_to_first_and_last)
|
||||||
if (( shortenlen > 0 )); then
|
if (( shortenlen > 0 )); then
|
||||||
|
@ -7017,7 +7019,7 @@ _p9k_must_init() {
|
||||||
[[ $sig == $_p9k__param_sig ]] && return 1
|
[[ $sig == $_p9k__param_sig ]] && return 1
|
||||||
_p9k_deinit
|
_p9k_deinit
|
||||||
fi
|
fi
|
||||||
_p9k__param_pat=$'v48\1'${ZSH_VERSION}$'\1'${ZSH_PATCHLEVEL}$'\1'
|
_p9k__param_pat=$'v49\1'${ZSH_VERSION}$'\1'${ZSH_PATCHLEVEL}$'\1'
|
||||||
_p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1'
|
_p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1'
|
||||||
_p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1'
|
_p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1'
|
||||||
_p9k__param_pat+=$'$DEFAULT_USER\1${ZLE_RPROMPT_INDENT:-1}\1$P9K_SSH\1$__p9k_ksh_arrays'
|
_p9k__param_pat+=$'$DEFAULT_USER\1${ZLE_RPROMPT_INDENT:-1}\1$P9K_SSH\1$__p9k_ksh_arrays'
|
||||||
|
|
Loading…
Reference in a new issue