Главная страница


ru.unix.bsd

 
 - RU.UNIX.BSD ------------------------------------------------------------------
 From : Vadim Goncharov                      2:5020/400     14 Sep 2005  13:39:17
 To : Viktor
 Subject : shell termcap (was: OpenBSD 3.7)
 -------------------------------------------------------------------------------- 
 
 Hi Viktor! 
 
 On Wed, 14 Sep 2005 09:27:40 +0000 (UTC); Viktor wrote about 'Re: OpenBSD 3.7':
 
  >> Почему сабж с локальной консоли не понимает клавишы F1, F2, ..., Home, End,
  >> etc? Если зайти по ssh (из Putty), то все нормально.
  V> У меня в zsh эту проблему решают следующие строчки в $HOME/.zshrc :
  V> bindkey "^[[1~" beginning-of-line
  V> bindkey "^[[4~" end-of-line
  V> bindkey "^[[3~" delete-char-or-list
  V> Код нужной тебе клавиши (это который "^[[3~") смотри так:
  V> cat <ENTER>
 
 Вообще-то в zsh есть удобная внутренняя команда, которая позволяет такие
 привязки делать терминалонезависимо, и обращаться к cat надо только если
 не помогло. Вот кусок из моего ~/.zshrc:
 
 # *** key bindings section *** #
 # next lines bind history search similar to tcsh
 bindkey "^[[B" history-beginning-search-forward   # some xterms have no "do" cap
 bindkey "$(echotc up)" history-beginning-search-backward
 bindkey "$(echotc kd)" history-beginning-search-forward
 bindkey "$(echotc ku)" history-beginning-search-backward
 # next lines bind home & end keys
 bindkey "$(echotc kh)" beginning-of-line
 bindkey "$(echotc @7)" end-of-line
 bindkey "^[[1~" beginning-of-line # termcap and real xterm emulators
 bindkey "^[[4~" end-of-line       # are often very different
 # next line binds delete key
 bindkey "$(echotc kD)" delete-char
 # next line binds insert key
 bindkey "$(echotc kI)" overwrite-mode
 # *** key bindings end *** #
 
 -- 
 WBR, Vadim Goncharov. ICQ#166852181       mailto:vadim_nuclight@mail.ru
 [Moderator of RU.ANTI-ECOLOGY][FreeBSD][http://antigreen.org][LJ:/nuclight]
 --- slrn/0.9.8.1 on FreeBSD 4.11/i386
  * Origin: Nuclear Lightning @ Tomsk, TPU AVTF Hostel (2:5020/400@fidonet)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 Re: OpenBSD 3.7   Viktor   14 Sep 2005 13:27:40 
 shell termcap (was: OpenBSD 3.7)   Vadim Goncharov   14 Sep 2005 13:39:17 
 Re: shell termcap   Viktor   14 Sep 2005 14:10:13 
 Re: shell termcap   Vadim Goncharov   14 Sep 2005 14:19:06 
 Re: shell termcap   Alexander S. Usov   14 Sep 2005 15:26:11 
 Re: shell termcap   Vadim Goncharov   14 Sep 2005 15:43:59 
Архивное /ru.unix.bsd/103590a741094.html, оценка 3 из 5, голосов 10
Яндекс.Метрика
Valid HTML 4.01 Transitional