|
|
@ -576,16 +576,6 @@ prompt_context() {
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Dir: current working directory
|
|
|
|
# Dir: current working directory
|
|
|
|
prompt_dir() {
|
|
|
|
prompt_dir() {
|
|
|
|
local current_path='%~'
|
|
|
|
local current_path='%~'
|
|
|
@ -821,6 +811,16 @@ prompt_time() {
|
|
|
|
"$1_prompt_segment" "$0" "$DEFAULT_COLOR_INVERTED" "$DEFAULT_COLOR" "$time_format"
|
|
|
|
"$1_prompt_segment" "$0" "$DEFAULT_COLOR_INVERTED" "$DEFAULT_COLOR" "$time_format"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Virtualenv: current working virtualenv
|
|
|
|
# Virtualenv: current working virtualenv
|
|
|
|
# More information on virtualenv (Python):
|
|
|
|
# More information on virtualenv (Python):
|
|
|
|
# https://virtualenv.pypa.io/en/latest/
|
|
|
|
# https://virtualenv.pypa.io/en/latest/
|
|
|
|