aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2015-09-22 19:35:42 +0300
committerDominik Ritter <dritter03@googlemail.com>2015-09-22 19:35:42 +0300
commitfc59f06f39628ddffbad89907988551bd86f7d19 (patch)
tree43320b42122b98c47ec825ba8170b08be0e9c568 /powerlevel9k.zsh-theme
parentb31d0ff3950c091cb5f0aa34abc664a4790affc8 (diff)
code more readable.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rw-r--r--powerlevel9k.zsh-theme14
1 files changed, 8 insertions, 6 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 479c6880..7fb283dd 100644
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -813,12 +813,14 @@ prompt_time() {
# Vi Mode: show editing mode (NORMAL|INSERT)
prompt_vi_mode() {
- local mode="${${KEYMAP/vicmd/NORMAL}/(main|viins)/INSERT}"
- if [[ "$mode" == "NORMAL" ]]; then
- "$1_prompt_segment" "$0_NORMAL" "$DEFAULT_COLOR" "default" "$mode"
- else
- "$1_prompt_segment" "$0_INSERT" "$DEFAULT_COLOR" "blue" "$mode"
- fi
+ case ${KEYMAP} in
+ main)
+ "$1_prompt_segment" "$0_INSERT" "$DEFAULT_COLOR" "blue" "INSERT"
+ ;;
+ *)
+ "$1_prompt_segment" "$0_NORMAL" "$DEFAULT_COLOR" "default" "NORMAL"
+ ;;
+ esac
}
# Virtualenv: current working virtualenv