|
|
Line 1,326: |
Line 1,326: |
|
| |
|
| === Readline Initialization === | | === Readline Initialization === |
| Readline is customized by putting commands in an initialization file (the inputrc file). The
| | Readlineは、初期化ファイル(inputrcファイル)にコマンドを入れることでカスタマイズされる。 このファイル名はINPUTRC変数の値から取られる。 この変数が設定されていない場合、デフォルトは~/.inputrcである。 そのファイルが存在しないか、読み込めない場合、最終的なデフォルトは/etc/inputrcとなる。 readlineライブラリを使用するプログラムが起動すると、初期化ファイルが読み込まれ、キーバインドと変数が設定される。 readline初期化ファイルには、いくつかの基本的な構文しか許されない。 空白行は無視される。 で始まる行はコメントである。 で始まる行は条件分岐を示す。 その他の行は、キーバインドと変数設定を示す。 |
| name of this file is taken from the value of the INPUTRC variable. If that variable is unset,
| |
| the default is ~/.inputrc. If that file does not exist or cannot be read, the ultimate default
| |
| is /etc/inputrc. When a program which uses the readline library starts up, the initialization
| |
| file is read, and the key bindings and variables are set. There are only a few basic constructs
| |
| allowed in the readline initialization file. Blank lines are ignored. Lines beginning with a #
| |
| are comments. Lines beginning with a $ indicate conditional constructs. Other lines denote key
| |
| bindings and variable settings.
| |
|
| |
|
| The default key-bindings may be changed with an inputrc file. Other programs that use this li‐
| | デフォルトのキーバインディングはinputrcファイルで変更できる。 このライブラリを使用する他のプログラムは、独自のコマンドやバインディングを追加することができる。 |
| brary may add their own commands and bindings.
| |
|
| |
|
| For example, placing
| | :たとえば、 |
|
| |
|
| M-Control-u: universal-argument
| | ::M-Control-u: universal-argument |
| or
| | :または、 |
| C-Meta-u: universal-argument
| | ::C-Meta-u: universal-argument |
| into the inputrc would make M-C-u execute the readline command universal-argument.
| | ::を入力すると、M-C-uはreadlineコマンドのuniversal-argumentを実行する。 |
|
| |
|
| The following symbolic character names are recognized: RUBOUT, DEL, ESC, LFD, NEWLINE, RET, RE‐
| | 以下の記号文字名が認識される: RUBOUT、DEL、ESC、LFD、NEWLINE、RET、RETURN、SPC、SPACE、TABである。 |
| TURN, SPC, SPACE, and TAB.
| |
|
| |
|
| In addition to command names, readline allows keys to be bound to a string that is inserted when
| | コマンド名に加えて、readlineでは、キーを押したときに挿入される文字列(マクロ)にキーをバインドすることができる。 |
| the key is pressed (a macro).
| |
|
| |
|
| === Readline Key Bindings === | | === Readline Key Bindings === |