count web page visits
Panasonic Viera 3D

Daily Command--bunzip2

摘自:http://www.yewusishi.com/archives/36.html

功能说明:显示或设置键盘按键与其相关的功能

语法:bind [-dlv] [-f<按键配置文件>] [-m<按键配置>] [-q<功能>]

包名称:bash

相关命令:kbdconfig

补充说明:用户可以利用bind命令了解哪些按键组合及其功能,也可自行指定要用哪些按键组合。

参数:

-d

显示按键配置的内容

-f<按键配置文件>

载入指定的按键配置文件

-l

列出所有的功能

-m<按键配置>

指定按键配置。系统提供了emacs、emacs-meta、emacs-ctlx、vi、vi-move与vi-insert等按键设置。默认的按键设置为emacs。

-q <功能>

显示指定功能的按键

-v

列出当前的按键配置与其功能

范例:

  1. 查询当前显示shell版本时,所需按下的按键是什么:
    root@EricZhou:~# bind -l | grep version                   (显示与version相关的功能)
    display-shell-version                                                           (此功能可显示shell的版本)
    do-lowercase-version
    root@EricZhou:~# bind -q display-shell-version                   (显示功能所对应的按键)

    display-shell-version can be invoked via "\C-x\C-v".      (就是 Ctrl+X、Ctrl+V的意思)

          root@EricZhou:~#                                                                                    (按顺序按Ctrl+X、Ctrl+V)

          GNU bash, version 4.2.10(1)-release (i686-pc-linux-gnu)

          root@EricZhou:~#

  1. 显示vi的按键配置与其相关功能:

          root@EricZhou:~# bind -m vi -v

         set bind-tty-special-chars on

         set blink-matching-paren on

         set byte-oriented off

         set completion-ignore-case off

         set completion-map-case off

         set convert-meta off

         set disable-completion off

         set echo-control-characters on

         set enable-keypad off

    .......

  1. 将指定的按键配置文件载入,例如/etc/inputrc
    root@EricZhou:~# bind -f /etc/inputrc
    root@EricZhou:~#
     
posted @ 2013-03-21 18:53  夜半私时  阅读(238)  评论(0编辑  收藏  举报