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

Re: bindkey -v and alt-. for previous cmd arg



On Thu, 4 Nov 2004 22:43:33 +1100 Nick Croft <nicko@xxxxxxxxxxx> wrote:

> * DervishD (zsh@xxxxxxxxxxxx) wrote:
> > 
> >     In fact you can do both things at once:
> > 
> >     bindkey -M viins '\e.' insert-last-word
> > 
> Yes! And from my recent reading I see that if you bind a key to Esc
> using \e it will be mapped to alt as well.

No, that's not how it works. It's just that in some terminals (the Linux
console for example, at least with some keymaps) Alt-. produces ESC-.
But this is by no means standard. In my Xterm, when I press Alt-. I get
the (R) registered trademark sign and if I want to bind something to Alt-.
I have to bind it to (R) to work in Xterm. The simplest way to find out
what to bind against is to execute

  cat

and then press the key combo in question and look at what you see on
screen. On the linux console I get this (with Alt-.)

PS1# cat
^[.


and ^[ happens to be ESC.
 
MSB

-- 
He who SHOUTS is always wrong.



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