|
|
Line 115: |
Line 115: |
|
| |
|
| === Aliases === | | === Aliases === |
| An alias is a name and corresponding value set using the alias(1) builtin command. Whenever a re‐
| | エイリアスは、'''[[/usr/bin/alias|alias]]''' 組み込みコマンドを使用して設定された名前と対応する値である。 予約語が発生する可能性がある場合(上記参照)、予約語をチェックした後、シェルはその語がエイリアスに一致するかどうかをチェックする。 もし一致すれば、入力ストリーム中のそれをその値で置き換える。 例えば、"ls -F" という値を持つ "lf" というエイリアスがある場合、入力は次のようになる: |
| served word may occur (see above), and after checking for reserved words, the shell checks the word to
| |
| see if it matches an alias. If it does, it replaces it in the input stream with its value. For exam‐
| |
| ple, if there is an alias called “lf” with the value “ls -F”, then the input:
| |
|
| |
|
| lf foobar ⟨return⟩
| | lf foobar ⟨return⟩ |
|
| |
|
| would become
| | は次のようになる。 |
|
| |
|
| ls -F foobar ⟨return⟩
| | ls -F foobar ⟨return⟩ |
|
| |
|
| Aliases provide a convenient way for naive users to create shorthands for commands without having to
| | エイリアスは、素朴なユーザーが引数を持つ関数の作成方法を学ぶことなく、コマンドのショートサンドを作成するための便利な方法を提供する。 また、字句的にわかりにくいコードを作成する。 |
| learn how to create functions with arguments. They can also be used to create lexically obscure code.
| |
| This use is discouraged.
| |
|
| |
|
| === Commands === | | === Commands === |