Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

$KEYMAP in command, isearch and menuselect



I was trying to make a zle widget to display the currently active bindings when I noticed that KEYMAP is set to 'main' in widgets run from command, isearch and menuselect.

show-keymap() {
	{ print "$KEYMAP:\n"; bindkey -M $KEYMAP } | less
}
zle -N show-keymap
bindkey -M vicmd "^Ki" show-keymap
bindkey -M main "^Ki" show-keymap
bindkey -M command "^Ki" show-keymap
bindkey -M menuselect "^Ki" show-keymap
bindkey -M isearch "^Ki" show-keymap

In 'command' the binding doesn't work. (since you only can bind a few widgets in 'command')

In vicmd and main it works as expected

In isearch and menuselect the 'main' keymap is displayed and the search/completion is aborted on the current entry.

Poking in the code for 'executenamedcommand', it seems there is something called a 'localkeymap' and this is not exposed to zle widgets.

Any solution for this?

- Ole JÃrgen BrÃnner



Messages sorted by: Reverse Date, Date, Thread, Author