diff options
Diffstat (limited to 'FAQ')
| -rw-r--r-- | FAQ | 26 |
1 files changed, 23 insertions, 3 deletions
| @@ -56,13 +56,13 @@ sequences. | |||
| 56 | But buggy applications like bash and irssi for example don't do this. A fast | 56 | But buggy applications like bash and irssi for example don't do this. A fast |
| 57 | solution for them is to use the following command: | 57 | solution for them is to use the following command: |
| 58 | 58 | ||
| 59 | $ echo ^[?1h^[= >/dev/tty | 59 | $ printf "\033?1h\033=" >/dev/tty |
| 60 | 60 | ||
| 61 | or | 61 | or |
| 62 | $ echo $(tput smkx) >/dev/tty | 62 | $ echo $(tput smkx) >/dev/tty |
| 63 | 63 | ||
| 64 | In the case of bash it is using readline, which has a different not in its | 64 | In the case of bash readline is used. Readline has a different note in its |
| 65 | manpage: | 65 | manpage about this issue: |
| 66 | 66 | ||
| 67 | enable-keypad (Off) | 67 | enable-keypad (Off) |
| 68 | When set to On, readline will try to enable the | 68 | When set to On, readline will try to enable the |
| @@ -71,5 +71,25 @@ manpage: | |||
| 71 | 71 | ||
| 72 | Adding this option to your .inputrc will fix the keypad problem for all | 72 | Adding this option to your .inputrc will fix the keypad problem for all |
| 73 | applications using readline. | 73 | applications using readline. |
| 74 | |||
| 75 | If you are using zsh, then read the zsh FAQ | ||
| 76 | (http://zsh.sourceforge.net/FAQ/zshfaq03.html#l25): | ||
| 77 | |||
| 78 | It should be noted that the O / [ confusion can occur with other keys | ||
| 79 | such as Home and End. Some systems let you query the key sequences | ||
| 80 | sent by these keys from the system's terminal database, terminfo. | ||
| 81 | Unfortunately, the key sequences given there typically apply to the | ||
| 82 | mode that is not the one zsh uses by default (it's the "application" | ||
| 83 | mode rather than the "raw" mode). Explaining the use of terminfo is | ||
| 84 | outside of the scope of this FAQ, but if you wish to use the key | ||
| 85 | sequences given there you can tell the line editor to turn on | ||
| 86 | "application" mode when it starts and turn it off when it stops: | ||
| 87 | |||
| 88 | function zle-line-init () { echoti smkx } | ||
| 89 | function zle-line-finish () { echoti rmkx } | ||
| 90 | zle -N zle-line-init | ||
| 91 | zle -N zle-line-finish | ||
| 92 | |||
| 93 | Putting these lines into your .zshrc will fix the problems. | ||
| 74 | -- | 94 | -- |
| 75 | 95 | ||
