Answers:
查找有关键绑定的信息。
bash
:$ bind -p | grep -a '{'
"\e{": complete-into-braces
"{": self-insert
$ LESS='+/complete-into-braces' man bash
complete-into-braces (M-{)
Perform filename completion and insert the list of possible com‐
pletions enclosed within braces so the list is available to the
shell (see Brace Expansion above).
或搭配info
:
info bash --index-search=complete-into-braces
(或info bash
将索引与完成(i
键)一起使用)
但是请注意,至少bash-4.3源附带的预构建信息页面至少缺少一些索引条目,包括for的索引条目complete-into-braces
,因此,除非您的操作系统从texinfo源重新构建信息页面,否则上述命令将不起作用。
zsh
$ bindkey| grep W
"^W" backward-kill-word
"^[W" copy-region-as-kill
$ info --index-search=copy-region-as-kill zsh
copy-region-as-kill (ESC-W ESC-w) (unbound) (unbound)
Copy the area from the cursor to the mark to the kill buffer.
If called from a ZLE widget function in the form 'zle
copy-region-as-kill STRING' then STRING will be taken as the text
to copy to the kill buffer. The cursor, the mark and the text on
the command line are not used in this case.
或man
假设less
像这样的寻呼机bash
:
LESS='+/copy-region-as-kill' man zshall
zsh
还具有describe-key-briefly
您可以绑定到键或键序列上的,如下Ctrl+XCtrl+H所示:
bindkey '^X^H' describe-key-briefly
然后键入Ctrl+XCtrl+H,然后键入要描述的键或组合键。例如,键入Ctrl+XCtrl+H两次将在提示下方显示:
"^X^H" is describe-key-briefly
tcsh
zsh
除了tcsh
没有信息页面外,其他基本相同。
> bindkey | grep -a P
"^P" -> up-history
"^[P" -> history-search-backward
> env LESS=+/history-search-backward man tcsh
[...]
fish
:> bind | grep -F '\ec'
bind \ec capitalize-word
> help commands
该启动您的首选Web浏览器。并capitalize-word
在那里搜索。