@ -91,28 +91,32 @@ function bindkey-all {
# Exposes information about the Zsh Line Editor via the $editor_info associative
# array.
function editor-info {
# Clean up previous $editor_info.
unset editor_info
typeset -gA editor_info
if [ [ " $KEYMAP " = = 'vicmd' ] ] ; then
zstyle -s ':prezto:module:editor:info:keymap:alternate' format 'REPLY'
editor_info[ keymap] = " $REPLY "
else
zstyle -s ':prezto:module:editor:info:keymap:primary' format 'REPLY'
editor_info[ keymap] = " $REPLY "
if [ [ " $ZLE_STATE " = = *overwrite* ] ] ; then
zstyle -s ':prezto:module:editor:info:keymap:primary:overwrite' format 'REPLY'
editor_info[ overwrite] = " $REPLY "
# Ensure that we're going to set the editor-info for prompts that
# are prezto managed and/or compatible.
if zstyle -t ':prezto:module:prompt' managed; then
# Clean up previous $editor_info.
unset editor_info
typeset -gA editor_info
if [ [ " $KEYMAP " = = 'vicmd' ] ] ; then
zstyle -s ':prezto:module:editor:info:keymap:alternate' format 'REPLY'
editor_info[ keymap] = " $REPLY "
else
zstyle -s ':prezto:module:editor:info:keymap:primary:insert' format 'REPLY'
editor_info[ overwrite] = " $REPLY "
zstyle -s ':prezto:module:editor:info:keymap:primary' format 'REPLY'
editor_info[ keymap] = " $REPLY "
if [ [ " $ZLE_STATE " = = *overwrite* ] ] ; then
zstyle -s ':prezto:module:editor:info:keymap:primary:overwrite' format 'REPLY'
editor_info[ overwrite] = " $REPLY "
else
zstyle -s ':prezto:module:editor:info:keymap:primary:insert' format 'REPLY'
editor_info[ overwrite] = " $REPLY "
fi
fi
fi
unset REPLY
zle zle-reset-prompt
unset REPLY
zle zle-reset-prompt
fi
}
zle -N editor-info