mirror of git://git.suckless.org/st
Adding the FAQ entry for zsh.
Thanks Roberto E. Vargas Caballero! You were committing this patch against the wrong version of the FAQ, so I had to rewrite it.
This commit is contained in:
parent
ed90afb743
commit
3ce96aea8a
26
FAQ
26
FAQ
|
@ -56,13 +56,13 @@ sequences.
|
||||||
But buggy applications like bash and irssi for example don't do this. A fast
|
But buggy applications like bash and irssi for example don't do this. A fast
|
||||||
solution for them is to use the following command:
|
solution for them is to use the following command:
|
||||||
|
|
||||||
$ echo ^[?1h^[= >/dev/tty
|
$ printf "\033?1h\033=" >/dev/tty
|
||||||
|
|
||||||
or
|
or
|
||||||
$ echo $(tput smkx) >/dev/tty
|
$ echo $(tput smkx) >/dev/tty
|
||||||
|
|
||||||
In the case of bash it is using readline, which has a different not in its
|
In the case of bash readline is used. Readline has a different note in its
|
||||||
manpage:
|
manpage about this issue:
|
||||||
|
|
||||||
enable-keypad (Off)
|
enable-keypad (Off)
|
||||||
When set to On, readline will try to enable the
|
When set to On, readline will try to enable the
|
||||||
|
@ -71,5 +71,25 @@ manpage:
|
||||||
|
|
||||||
Adding this option to your .inputrc will fix the keypad problem for all
|
Adding this option to your .inputrc will fix the keypad problem for all
|
||||||
applications using readline.
|
applications using readline.
|
||||||
|
|
||||||
|
If you are using zsh, then read the zsh FAQ
|
||||||
|
(http://zsh.sourceforge.net/FAQ/zshfaq03.html#l25):
|
||||||
|
|
||||||
|
It should be noted that the O / [ confusion can occur with other keys
|
||||||
|
such as Home and End. Some systems let you query the key sequences
|
||||||
|
sent by these keys from the system's terminal database, terminfo.
|
||||||
|
Unfortunately, the key sequences given there typically apply to the
|
||||||
|
mode that is not the one zsh uses by default (it's the "application"
|
||||||
|
mode rather than the "raw" mode). Explaining the use of terminfo is
|
||||||
|
outside of the scope of this FAQ, but if you wish to use the key
|
||||||
|
sequences given there you can tell the line editor to turn on
|
||||||
|
"application" mode when it starts and turn it off when it stops:
|
||||||
|
|
||||||
|
function zle-line-init () { echoti smkx }
|
||||||
|
function zle-line-finish () { echoti rmkx }
|
||||||
|
zle -N zle-line-init
|
||||||
|
zle -N zle-line-finish
|
||||||
|
|
||||||
|
Putting these lines into your .zshrc will fix the problems.
|
||||||
--
|
--
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue