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

Re: Weird Vi-mode behavior



Mikael Magnusson wrote:
2008/11/3 Matthieu Louvel de Monceaux <glory69@xxxxxxxxx>:
Thank you for your nice piece of information.
You want me to put those bindings in my zshrc file ?

But i don't understand that :

(($+terminfo[kdch1])) &&

You said that it maps delete-char to the char sent by the delete key.
Is it the role of the '&&' ?

a && b is like if a; then b; fi, but shorter, and only works if b is a
single statement (or is in {}, but then you're better off with an if
probably).

Indeed that sounds logical.
Same thing than

if (($+terminfo[kdch1])); then
   bindkey -M viins $terminfo[kdch1] delete-char
fi

If I well understood.

Anyway, I would like to know the reason of that vi-mode behavior,
different from both vi editor and bash vi-mode behaviours ... maybe
you could make me understand about that.


M. Louvel de Monceaux



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