RU EN

Настройка Insert, Delete, Home, End в консоли

 

Устанавливаем bash в качестве шелла:

pkg_add bash
chsh -s /usr/local/bin/bash <username>

Добавляем в файл ~/.inputrc строки:

set meta-flag on
set input-meta on
set convert-meta off
set output-meta on
set show-all-if-ambiguous on

# allow the use of the Home/End keys
"e[1~": beginning-of-line
"e[4~": end-of-line

# allow the use of the Delete/Insert keys
"e[3~": delete-char
"e[2~": quoted-insert

# mappings for "page up" and "page down" to step to the beginning/end
# of the history
# "e[5~": beginning-of-history
# "e[6~": end-of-history

# alternate mappings for "page up" and "page down" to search the history
# "e[5~": history-search-backward
# "e[6~": history-search-forward

# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
"e[1;5C": forward-word
"e[1;5D": backward-word
"e[5C": forward-word
"e[5D": backward-word
"ee[C": forward-word
"ee[D": backward-word

$if term=rxvt
"e[8~": end-of-line
"eOc": forward-word
"eOd": backward-word
$endif

Янчарук А.В.
30.05.2013 16:27


Оставить комментарий


Имя  


Комментарий *