mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-18 05:40:07 +00:00
code more readable.
This commit is contained in:
parent
b31d0ff395
commit
fc59f06f39
1 changed files with 8 additions and 6 deletions
|
@ -813,12 +813,14 @@ prompt_time() {
|
||||||
|
|
||||||
# Vi Mode: show editing mode (NORMAL|INSERT)
|
# Vi Mode: show editing mode (NORMAL|INSERT)
|
||||||
prompt_vi_mode() {
|
prompt_vi_mode() {
|
||||||
local mode="${${KEYMAP/vicmd/NORMAL}/(main|viins)/INSERT}"
|
case ${KEYMAP} in
|
||||||
if [[ "$mode" == "NORMAL" ]]; then
|
main)
|
||||||
"$1_prompt_segment" "$0_NORMAL" "$DEFAULT_COLOR" "default" "$mode"
|
"$1_prompt_segment" "$0_INSERT" "$DEFAULT_COLOR" "blue" "INSERT"
|
||||||
else
|
;;
|
||||||
"$1_prompt_segment" "$0_INSERT" "$DEFAULT_COLOR" "blue" "$mode"
|
*)
|
||||||
fi
|
"$1_prompt_segment" "$0_NORMAL" "$DEFAULT_COLOR" "default" "NORMAL"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# Virtualenv: current working virtualenv
|
# Virtualenv: current working virtualenv
|
||||||
|
|
Loading…
Reference in a new issue