Martin Vaeth <mar...@mvath.de> wrote:

> Nikos Chantziaras <rea...@gmail.com> wrote:
> > On 10/07/15 18:00, Gevisz wrote:
> >> bindkey '^[[7~' beginning-of-line                   # Home (xterm)
> >> bindkey '^[[8~'  end-of-line                        # End (xterm)
> >
> > lol... are these guys serious?
> >
> > It's 2015...
> 
> ... and yet the way of handling special keys in terminals has not
> changed: You cannot rely on any special sequence, since it depends
> on the terminal type (and changes also nowadays, depending on
> whether you use xterm, screen, tmux, linux console, ...).
> This is the reason why any fixed default can be wrong: What works in
> one terminal can break in another.
> The zsh way of doing this dynamically is much superior to the bash
> way of doing this statically in a fixed readline config file
> (which works only because *gentoo* provided a file which works
> for *most* linux terminals - I also had serious problems with bash
> and such keys when ssh-ing to e.g. sun stations; with zsh these
> problems are easily fixable).
> 
> One way to avoid the multiterm difficulty is to use the terminfo database
> of your current terminal. In zsh you do this as follows:
> 
> bindkey ${terminfo[khome]} beginning-of-line
> bindkey ${terminfo[kend]} end-of-line
> 
> (Yes, in zsh you usually do not have to quote variabeles!).
> 
> Note, however, that the above sets the keys only to your *current*
> terminal. If you call e.g. tmux later on and move your session to
> another terminal or you login from another terminal, you might again
> have problems, so it might be a good idea to set some sequences
> also for other terminals.
> 
> Again, I recommend you to use zshrc-mv from the mv overlay where
> all this (and much more) is done.
> 

hmmm, I am just trying zsh, and I still am having problems.  I cannot
see, so I use speakup or orca to read the screen to me and when I type
the second character of the command line, I hear the first character
again.  I am not sure what is happening, does the cursor move back a
character for a brief period, or what?  Also, the comp systemis very
confusing, its hard to read the list that is produced it seems to be in
columns of some sort and aside from just typing more characters on the
command line, I am not sure what to do.  I will look at your .zshrc, but
a lot of it will not do me any good, so I will read the docs and do
something.


-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici
         cov...@ccs.covici.com

Reply via email to