|
|
@ -1903,17 +1903,18 @@ prompt_time() {
|
|
|
|
if (( ! $+_P9K_TIME_TEXT )); then
|
|
|
|
if (( ! $+_P9K_TIME_TEXT )); then
|
|
|
|
if [[ $POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME == true ]]; then
|
|
|
|
if [[ $POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME == true ]]; then
|
|
|
|
_p9k_escape $POWERLEVEL9K_TIME_FORMAT
|
|
|
|
_p9k_escape $POWERLEVEL9K_TIME_FORMAT
|
|
|
|
_P9K_TIME_TEXT=$_P9K_RETVAL
|
|
|
|
_P9K_TIME_TEXT=("" "$_P9K_RETVAL")
|
|
|
|
else
|
|
|
|
else
|
|
|
|
_p9k_escape ${${(%)POWERLEVEL9K_TIME_FORMAT}//\%/%%}
|
|
|
|
_p9k_escape $POWERLEVEL9K_TIME_FORMAT
|
|
|
|
_P9K_TIME_TEXT=$_P9K_RETVAL
|
|
|
|
|
|
|
|
if [[ $POWERLEVEL9K_TIME_UPDATE_ON_COMMAND == true ]]; then
|
|
|
|
if [[ $POWERLEVEL9K_TIME_UPDATE_ON_COMMAND == true ]]; then
|
|
|
|
_p9k_escape $POWERLEVEL9K_TIME_FORMAT
|
|
|
|
_P9K_TIME_TEXT=("\${_P9K_LINE_FINISH-$_P9K_RETVAL}" "\${_P9K_LINE_FINISH+$_P9K_RETVAL}")
|
|
|
|
_P9K_TIME_TEXT=\${_P9K_LINE_FINISH-$_P9K_TIME_TEXT}\${_P9K_LINE_FINISH+$_P9K_RETVAL}
|
|
|
|
else
|
|
|
|
|
|
|
|
_P9K_TIME_TEXT=("$_P9K_RETVAL" "")
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
"$1_prompt_segment" "$0" "$2" "$DEFAULT_COLOR_INVERTED" "$DEFAULT_COLOR" "TIME_ICON" 1 '' "$_P9K_TIME_TEXT"
|
|
|
|
"$1_prompt_segment" "$0" "$2" "$DEFAULT_COLOR_INVERTED" "$DEFAULT_COLOR" "TIME_ICON" 1 '' \
|
|
|
|
|
|
|
|
"${(%)_P9K_TIME_TEXT[1]//\%/%%}${_P9K_TIME_TEXT[2]}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
################################################################
|
|
|
|
################################################################
|
|
|
|