存在するzsh

存在するzsh

bashプロンプトでこれを行い、ESCを押してから{を押すと、シェルが完了するすべてのファイルがfileglob文字列に表示されます。たとえば、bash C次のように入力すると、ESC+{Cbash CHECK{,1,2{,23{336{,66666},6},3{,6}}}で始まるすべての可能なファイルとディレクトリが自動的に完成し、私が実行したすべての実験ファイルとディレクトリが表示されます。

それが何であるかを見ることができますかESC + {?詳しくはどこで確認できますか?

私はCENTOSとMac OSXでbashを使ってこれを見ました。

ベストアンサー1

キーバインディングについて学びます。

存在する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ソースに付属の事前に構築された情報ページには、エントリを含む少なくともいくつかのインデックスエントリが欠落しているため、オペレーティングシステムがcomplete-into-bracestexinfoソースから情報ページを再構築しない限り、上記のコマンドは機能しません。

存在する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します。lessbash

LESS='+/copy-region-as-kill' man zshall

zshdescribe-key-briefly次のようにキーまたはキーシーケンスにバインドできるものもありますCtrl+XCtrl+H

bindkey '^X^H' describe-key-briefly

Ctrl+XCtrl+H次に、説明したいキーまたはキーの組み合わせを入力します。たとえば、2回入力すると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そこで検索してみてください。

おすすめ記事