Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
$KEYMAP in command, isearch and menuselect
- X-seq: zsh-users 15259
- From: Ole JÃrgen BrÃnner <olejorgenb@xxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: $KEYMAP in command, isearch and menuselect
- Date: Mon, 09 Aug 2010 19:25:41 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.no; s=s1024; t=1281374747; bh=kn0a8CFw+LxVMLkotOdUvXCz6jyWSmo0V9yO8ANx63w=; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Content-Type:To:Date:Subject:MIME-Version:Content-Transfer-Encoding:From:Message-ID:User-Agent; b=RQBDVICatB4c2sUYK8LAoYnal+vL4AD5XNOxJ1ISBUja1LK7c/DzSkmVhutjqUFjPHGVSFP+TktUbXVdvgBjVNkkZZJN8RhS2atj0rVqm+3hYnlUZIMp3oYgzfzfPB2U2r1nT8BIYoH0mOU4x152zGpbFsc8wCErsG2LYFuazkU=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.no; h=DKIM-Signature:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Content-Type:To:Date:Subject:MIME-Version:Content-Transfer-Encoding:From:Message-ID:User-Agent; b=eYpxCrLQ5Qr1rz3j+gknGSmDHVyv1R4HZMCFIHrtfgCeQpooLeKHAX+CVxvr+S1iW8TnxAO7IBtfBL43jftF63li9oJO8yjHep3PPVCfILf20hrQR3TXQIL+BrYIIdDjcA1mrIpseEt52mww6kpM8W3IY9rInmd0lgWnVu9EbXg= ;
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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