1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-22 10:28:00 +00:00

prompt/steeef: Add basic support for editor_info and preview

This commit is contained in:
Indrajit Raychaudhuri 2018-10-13 23:09:14 -05:00
parent 58809b2d21
commit a3753d8f3b

View File

@ -72,6 +72,9 @@ function prompt_steeef_setup {
local unstaged_format="${_prompt_steeef_colors[2]}●%f"
local staged_format="${_prompt_steeef_colors[5]}●%f"
# Set editor-info parameters.
zstyle ':prezto:module:editor:info:keymap:primary' format '$'
# Set vcs_info parameters.
zstyle ':vcs_info:*' enable bzr git hg svn
zstyle ':vcs_info:*:prompt:*' check-for-changes true
@ -87,8 +90,17 @@ function prompt_steeef_setup {
# Define prompts.
PROMPT="
${_prompt_steeef_colors[3]}%n%f at ${_prompt_steeef_colors[2]}%m%f in ${_prompt_steeef_colors[5]}%~%f "'${vcs_info_msg_0_}'"
"'$python_info[virtualenv]'"$ "
"'$python_info[virtualenv]${editor_info[keymap]} '
RPROMPT=''
}
function prompt_steeef_preview {
local +h PROMPT=''
local +h RPROMPT=''
local +h SPROMPT=''
editor-info 2> /dev/null
prompt_preview_theme 'steeef'
}
prompt_steeef_setup "$@"