bind

用途

显示或设置键盘按键与其相关的功能。

语法

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

描述

您可以利用bind命令了解有哪些按键组合与其功能,也可以自行指定要用哪些按键组合。

参数

-d  显示按键配置的内容。
-f<按键配置文件>  载入指定的按键配置文件。
-l  列出所有的功能。
-m<按键配置>  指定按键配置。系统提供了 emacs、emacs-meta、emacs-ctlx、
               vi、vi-move与vi-insert等按键配置。预设的按键配置为 emacs 。
-q<功能>  显示指定功能的按键。
-v  列出目前的按键配置与其功能。

例子

查询显示 shell 版本的按键为何:

$ bind -l | grep version  <-- 显示与 version 相关的功能
display-shell-version   <-- 此功能可显示 shell 的版本
do-lowercase-version

$ bind -q display-shell-version
display-shell-version can be invoked via "\C-x\C-v". <-- 提示按下Ctrl+x Ctrl+v 键
$
GNU bash, version 3.2.39(1)-release (x86_32-pc-linux-gnu)

相关命令

shells/commands/bind.txt · 最后更改: 2010/03/30 13:01 (外部编辑)
[unknown link type]到顶部
GNU Free Documentation License 1.3
京ICP备05034962号 Debian Driven by DokuWiki get firefox browser Recent changes RSS feed Valid XHTML 1.0