* bindkey to INS
@ 2005-09-23 20:32 Konstantin Sobolev
2005-09-23 23:25 ` Clint Adams
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Konstantin Sobolev @ 2005-09-23 20:32 UTC (permalink / raw)
To: zsh-users
Hi,
Is it possible to bind an INS key to accept-and-menu-complete?
All my attempts like
bindkey -M menuselect "${key[Insert]}" accept-and-menu-complete
doesn't work, pressing Insert just prints a "~".
Also, is it possible to bind a couple of commands to the same key, like
bindkey "^Z" "kill-line; accept-line"?
thanks
--
/KoS
* When I want your advice, I'll beat it out of you!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bindkey to INS
2005-09-23 20:32 bindkey to INS Konstantin Sobolev
@ 2005-09-23 23:25 ` Clint Adams
2005-09-24 1:27 ` Konstantin Sobolev
2005-09-24 2:01 ` Bart Schaefer
2005-09-24 6:19 ` Andrey Borzenkov
2 siblings, 1 reply; 7+ messages in thread
From: Clint Adams @ 2005-09-23 23:25 UTC (permalink / raw)
To: Konstantin Sobolev; +Cc: zsh-users
> bindkey -M menuselect "${key[Insert]}" accept-and-menu-complete
Try "${terminfo[kich1]}" if you have a working terminfo setup.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bindkey to INS
2005-09-23 23:25 ` Clint Adams
@ 2005-09-24 1:27 ` Konstantin Sobolev
2005-09-24 2:02 ` Clint Adams
0 siblings, 1 reply; 7+ messages in thread
From: Konstantin Sobolev @ 2005-09-24 1:27 UTC (permalink / raw)
To: zsh-users
Hi Clint Adams,
On Fri, Sep 23, 2005 at 07:25:19PM -0400 you wrote:
> > bindkey -M menuselect "${key[Insert]}" accept-and-menu-complete
>
> Try "${terminfo[kich1]}" if you have a working terminfo setup.
---end quoted text---
nope, also gives ~
--
/KoS
* Beware the Jubjub bird
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bindkey to INS
2005-09-23 20:32 bindkey to INS Konstantin Sobolev
2005-09-23 23:25 ` Clint Adams
@ 2005-09-24 2:01 ` Bart Schaefer
2005-09-24 12:01 ` Konstantin Sobolev
2005-09-24 6:19 ` Andrey Borzenkov
2 siblings, 1 reply; 7+ messages in thread
From: Bart Schaefer @ 2005-09-24 2:01 UTC (permalink / raw)
To: kos, zsh-users
On Sep 24, 12:32am, Konstantin Sobolev wrote:
}
} Is it possible to bind an INS key to accept-and-menu-complete?
} All my attempts like
} bindkey -M menuselect "${key[Insert]}" accept-and-menu-complete
} doesn't work, pressing Insert just prints a "~".
This appears to be a bug with menu-selection, not with bindkey. I
can't make any key binding of more than 3 characters work with the
menuselect keymap. I've tried as far back as zsh-4.0.6, so it is
not something new with UTF-8 support or the like.
} Also, is it possible to bind a couple of commands to the same key, like
} bindkey "^Z" "kill-line; accept-line"?
You need to create a widget.
function accept-leftward {
zle kill-line
zle accept-line
}
zle -N accept-leftward
bindkey \^Z accept-leftward
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bindkey to INS
2005-09-24 1:27 ` Konstantin Sobolev
@ 2005-09-24 2:02 ` Clint Adams
0 siblings, 0 replies; 7+ messages in thread
From: Clint Adams @ 2005-09-24 2:02 UTC (permalink / raw)
To: Konstantin Sobolev; +Cc: zsh-users
> > > bindkey -M menuselect "${key[Insert]}" accept-and-menu-complete
> >
> > Try "${terminfo[kich1]}" if you have a working terminfo setup.
> ---end quoted text---
>
> nope, also gives ~
Are you sure you want to be using the menuselect keymap?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bindkey to INS
2005-09-23 20:32 bindkey to INS Konstantin Sobolev
2005-09-23 23:25 ` Clint Adams
2005-09-24 2:01 ` Bart Schaefer
@ 2005-09-24 6:19 ` Andrey Borzenkov
2 siblings, 0 replies; 7+ messages in thread
From: Andrey Borzenkov @ 2005-09-24 6:19 UTC (permalink / raw)
To: zsh-users, kos
[-- Attachment #1: Type: text/plain, Size: 514 bytes --]
On Saturday 24 September 2005 00:32, Konstantin Sobolev wrote:
> Hi,
>
> Is it possible to bind an INS key to accept-and-menu-complete?
BTW I am using comma (,) for this; it has nice semantic of list separator and
is available irrespectively of terminfo correctness and terminal emulation
weirdness :)
And for a-a-i-n-h '/' is just as nice as it is mostly (if ot exclusively)
useful for file system walk and '/' is natural path separator.
-andrey
PS of course bug is bug ans should be fixed.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bindkey to INS
2005-09-24 2:01 ` Bart Schaefer
@ 2005-09-24 12:01 ` Konstantin Sobolev
0 siblings, 0 replies; 7+ messages in thread
From: Konstantin Sobolev @ 2005-09-24 12:01 UTC (permalink / raw)
To: Bart Schaefer; +Cc: zsh-users
Hi Bart Schaefer,
On Sat, Sep 24, 2005 at 02:01:58AM +0000 you wrote:
> On Sep 24, 12:32am, Konstantin Sobolev wrote:
> }
> } Is it possible to bind an INS key to accept-and-menu-complete?
> } All my attempts like
> } bindkey -M menuselect "${key[Insert]}" accept-and-menu-complete
> } doesn't work, pressing Insert just prints a "~".
>
> This appears to be a bug with menu-selection, not with bindkey. I
> can't make any key binding of more than 3 characters work with the
> menuselect keymap. I've tried as far back as zsh-4.0.6, so it is
> not something new with UTF-8 support or the like.
thanks for clarification. Will use "," for now :)
> } Also, is it possible to bind a couple of commands to the same key, like
> } bindkey "^Z" "kill-line; accept-line"?
>
> You need to create a widget.
>
> function accept-leftward {
> zle kill-line
> zle accept-line
> }
> zle -N accept-leftward
> bindkey \^Z accept-leftward
thanks, it works
--
/KoS
* Water + Malt + Hops + Yeast = Satisfaction
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-09-24 12:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-23 20:32 bindkey to INS Konstantin Sobolev
2005-09-23 23:25 ` Clint Adams
2005-09-24 1:27 ` Konstantin Sobolev
2005-09-24 2:02 ` Clint Adams
2005-09-24 2:01 ` Bart Schaefer
2005-09-24 12:01 ` Konstantin Sobolev
2005-09-24 6:19 ` Andrey Borzenkov
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).