/usr/bin/bash: Difference between revisions

Line 1,570: Line 1,570:
=== Commands for Manipulating the History ===
=== Commands for Manipulating the History ===
;accept-line (Newline, Return)
;accept-line (Newline, Return)
:Accept  the  line regardless of where the cursor is.  If this line is non-empty, add it to the history list according to the state of the HISTCONTROL variable.  If  the  line  is  a modified history line, then restore the history line to its original state.
:カーソルがどこにあっても、その行を受け入れる。 この行が空行でない場合は、HISTCONTROL変数の状態に従って履歴リストに追加する。 その行が変更された履歴行であれば、履歴行を元の状態に戻す。
;previous-history (C-p)
;previous-history (C-p)
:Fetch the previous command from the history list, moving back in the list.
:履歴リストから前のコマンドを取得し、リスト内に戻る。
;next-history (C-n)
;next-history (C-n)
:Fetch the next command from the history list, moving forward in the list.
:履歴リストから次のコマンドを取得し、リストを進める。
;beginning-of-history <nowiki>(M-<)</nowiki>
;beginning-of-history <nowiki>(M-<)</nowiki>
:Move to the first line in the history.
:履歴の最初の行に移動する。
;end-of-history <nowiki>(M->)</nowiki>
;end-of-history <nowiki>(M->)</nowiki>
:Move to the end of the input history, i.e., the line currently being entered.
:入力履歴の最後、つまり現在入力中の行に移動する。
;reverse-search-history (C-r)
;reverse-search-history (C-r)
:Search backward starting at the current line and moving `up' through the history as necessary.  This is an incremental search.
:現在の行から後方へ検索し、必要に応じて履歴を「上」へ移動する。 This is an incremental search.
;forward-search-history (C-s)
;forward-search-history (C-s)
:Search forward starting at the current line and moving `down' through the history as  necessary.  This is an incremental search.
:現在の行から前方へ検索を開始し、必要に応じて履歴を`下へ'移動する。 これはインクリメンタルサーチである。
;non-incremental-reverse-search-history (M-p)
;non-incremental-reverse-search-history (M-p)
:Search  backward  through the history starting at the current line using a non-incremental search for a string supplied by the user.
:ユーザーが指定した文字列を非インクリメンタルサーチで検索し、現在の行から始まる履歴を後方へ検索する。
;non-incremental-forward-search-history (M-n)
;non-incremental-forward-search-history (M-n)
:Search forward through the history using a non-incremental search for a string supplied by the user.
:ユーザーが指定した文字列を非インクリメンタル検索で履歴から前方に検索する。
;history-search-forward
;history-search-forward
:Search  forward  through the history for the string of characters between the start of the current line and the point.  This is a non-incremental search.
:現在の行の先頭からポイントまでの文字列を履歴から前方に検索する。 これは非インクリメンタルサーチである。
;history-search-backward
;history-search-backward
:Search backward through the history for the string of characters between the start of  the current line and the point.  This is a non-incremental search.
:現在の行の先頭からポイントまでの間の文字列を、履歴を遡って検索する。 これは非インクリメンタルサーチである。
;history-substring-search-backward
;history-substring-search-backward
:Search  backward through the history for the string of characters between the start of the current line and the current cursor position (the point).  The  search  string  may  match anywhere in a history line.  This is a non-incremental search.
:現在の行の先頭から現在のカーソル位置(ポイント)までの間の文字列を、ヒストリを後方に検索する。 検索文字列はヒストリ行のどこにマッチしてもよい。 これは非インクリメンタルサーチである。
;history-substring-search-forward
;history-substring-search-forward
:Search  forward  through the history for the string of characters between the start of the current line and the point.  The search string may match anywhere in a history line.  This is a non-incremental search.
:現在の行の先頭からポイントまでの間の文字列を、履歴の前方から検索する。 検索文字列は、履歴行のどこにマッチしてもよい。 これは非インクリメンタルサーチである。
;yank-nth-arg (M-C-y)
;yank-nth-arg (M-C-y)
:Insert the first argument to the previous command (usually the second word on the previous line) at point.  With an argument n, insert the nth word from the  previous  command  (the words  in  the  previous  command begin with word 0).  A negative argument inserts the nth word from the end of the previous command.  Once the argument n is computed, the  argument is extracted as if the "!n" history expansion had been specified.
:前のコマンドの最初の引数(通常は前の行の2番目の単語)を point に挿入する。 引数nで、前のコマンドからn番目の単語を挿入する(前のコマンドの単語は単語0から始まる)。 負の引数を指定すると、前のコマンドの最後からn番目の単語が挿入される。 引数nが計算されると、"!n "履歴展開が指定されたかのように、引数が抽出される。
;yank-last-arg (M-., M-_)
;yank-last-arg (M-., M-_)
:Insert  the  last  argument to the previous command (the last word of the previous history entry).  With a numeric argument, behave exactly like yank-nth-arg.  Successive  calls  to yank-last-arg move  back  through  the history list, inserting the last word (or the word specified by the argument to the first call) of each line in turn.  Any  numeric  argument supplied  to  these successive calls determines the direction to move through the history. A negative argument switches the direction through the history  (back  or  forward).  The history expansion facilities are used to extract the last word, as if the "!$" history expansion had been specified.
:直前のコマンドの最後の引数(直前の履歴エントリーの最後の単語)を挿入する。 数値引数では、yank-nth-argとまったく同じように動作する。 yank-last-argを連続して呼び出すと、履歴リスト内を遡り、各行の最後の単語(または最初の呼び出しの引数で指定された単語)を順番に挿入する。 これらの連続した呼び出しに与えられる数値引数は、履歴を進む方向を決定する。負の引数は、履歴を進む方向(戻るまたは進む)を切り替える。 ヒストリ展開機能は、"!$"ヒストリ展開が指定されたかのように、最後の単語を抽出するために使用される。
;shell-expand-line (M-C-e)
;shell-expand-line (M-C-e)
:Expand the line as the shell does.  This performs alias and history expansion as  well  as all  of  the shell word expansions.  See HISTORY EXPANSION below for a description of history expansion.
:シェルが行うように行を展開する。 これは、シェルのすべての単語展開と同様に、エイリアス展開とヒストリ展開を行う。 ヒストリ展開の説明については、後述の [[#HISTORY EXPANSION|HISTORY EXPANSION ]] を参照のこと。
;history-expand-line (M-^)
;history-expand-line (M-^)
:Perform history expansion on the current line.  See HISTORY EXPANSION below for a description of history expansion.
:現在の行のヒストリ拡張を行う。 ヒストリ拡張の説明については、以下の「ヒストリ拡張」を参照のこと。
;magic-space
;magic-space
:Perform  history  expansion on the current line and insert a space.  See HISTORY EXPANSION below for a description of history expansion.
:現在の行にヒストリ拡張を行い、スペースを挿入する。 ヒストリ展開の説明については、以下の「[[#HISTORY EXPANSION|HISTORY EXPANSION ]]」を参照のこと。
;alias-expand-line
;alias-expand-line
:Perform alias expansion on the current line.  See ALIASES above for a description of alias expansion.
:現在の行でエイリアスの展開を行う。 エイリアスの展開については、上記のALIASESを参照のこと。
;history-and-alias-expand-line
;history-and-alias-expand-line
:Perform history and alias expansion on the current line.
:現在の行の履歴とエイリアスの展開を行う。
;insert-last-argument (M-., M-_)
;insert-last-argument (M-., M-_)
:A synonym for yank-last-arg.
:yank-last-argの同義語。
;operate-and-get-next (C-o)
;operate-and-get-next (C-o)
:Accept the current line for execution and fetch the next line relative to the current line from the history for editing.  A numeric argument, if supplied, specifies the history  entry to use instead of the current line.
:現在行を受け取って実行し、現在行に相対する次の行をヒストリから取得して編集する。 数値引数が与えられていれば、現在行の代わりに使用する履歴エントリを指定する。
;edit-and-execute-command (C-x C-e)
;edit-and-execute-command (C-x C-e)
:Invoke  an  editor  on the current command line, and execute the result as shell commands.
:現在のコマンドラインでエディタを起動し、その結果をシェルコマンドとして実行する。Bashは、$VISUAL、$EDITOR、emacsの順にエディタとして起動しようとする。
;Bash attempts to invoke $VISUAL, $EDITOR, and emacs as the editor, in that order.


=== Commands for Changing Text ===
=== Commands for Changing Text ===