add `p10k display -r`
This commit is contained in:
parent
422b7a94b9
commit
03e61879b5
|
@ -8387,6 +8387,10 @@ Usage: %2Fp10k%f %Bdisplay%b -a [part-pattern]...
|
||||||
Populate array \`reply\` with states of prompt parts matching the patterns.
|
Populate array \`reply\` with states of prompt parts matching the patterns.
|
||||||
If no patterns are supplied, assume \`*\`.
|
If no patterns are supplied, assume \`*\`.
|
||||||
|
|
||||||
|
Usage: %2Fp10k%f %Bdisplay%b -r
|
||||||
|
|
||||||
|
Redisplay prompt.
|
||||||
|
|
||||||
Parts:
|
Parts:
|
||||||
empty_line empty line (duh)
|
empty_line empty line (duh)
|
||||||
ruler ruler; if POWERLEVEL9K_RULER_CHAR=' ', it's essentially another
|
ruler ruler; if POWERLEVEL9K_RULER_CHAR=' ', it's essentially another
|
||||||
|
@ -8498,8 +8502,15 @@ function p10k() {
|
||||||
shift
|
shift
|
||||||
local -i k dump
|
local -i k dump
|
||||||
local opt prev new pair list name var
|
local opt prev new pair list name var
|
||||||
while getopts ':ha' opt; do
|
while getopts ':har' opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
|
r)
|
||||||
|
if (( __p9k_reset_state > 0 )); then
|
||||||
|
__p9k_reset_state=2
|
||||||
|
else
|
||||||
|
__p9k_reset_state=-1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
a) dump=1;;
|
a) dump=1;;
|
||||||
h) print -rP -- $__p9k_p10k_display_usage; return 0;;
|
h) print -rP -- $__p9k_p10k_display_usage; return 0;;
|
||||||
?) print -rP -- $__p9k_p10k_display_usage >&2; return 1;;
|
?) print -rP -- $__p9k_p10k_display_usage >&2; return 1;;
|
||||||
|
@ -8514,6 +8525,9 @@ function p10k() {
|
||||||
reply+=($_p9k__display_v[k,k+1])
|
reply+=($_p9k__display_v[k,k+1])
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
if (( __p9k_reset_state == -1 )); then
|
||||||
|
_p9k_reset_prompt
|
||||||
|
fi
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
local REPLY
|
local REPLY
|
||||||
|
|
Loading…
Reference in New Issue