/usr/bin/bash: Difference between revisions

Line 1,527: Line 1,527:


=== Searching ===
=== Searching ===
      Readline  provides  commands  for  searching  through the command history (see HISTORY below) for
Readlineは、指定した文字列を含む行をコマンド履歴(下記の[[#HISTORY|HISTORY ]]を参照)から検索するためのコマンドを提供する。 インクリメンタルとノンインクリメンタルという2つの検索モードがある。
      lines containing a specified string.  There are two search modes: incremental  and  non-incremen‐
      tal.


      Incremental  searches begin before the user has finished typing the search string.  As each char‐
インクリメンタル検索は、ユーザーが検索文字列を入力し終わる前に開始される。 検索文字列が1文字入力されるごとに、readlineは、これまでに入力された文字列と一致する履歴の次のエントリーを表示する。 インクリメンタルサーチでは、目的の履歴項目を見つけるのに必要な文字数だけ検索を行う。 isearch-terminators変数の値に含まれる文字は、インクリメンタルサーチを終了するために使われる。 この変数に値が割り当てられていない場合、EscapeとControl-J文字がインクリメンタルサーチを終了させる。 Control-G はインクリメンタルサーチを中止し、元の行に戻す。 検索が終了すると、検索文字列を含むヒストリエントリがカレント行になる。
      acter of the search string is typed, readline displays the next entry from the  history  matching
      the  string  typed  so  far.  An incremental search requires only as many characters as needed to
      find the desired history entry.  The characters present in the value of  the  isearch-terminators
      variable  are  used to terminate an incremental search. If that variable has not been assigned a
      value the Escape and Control-J characters will terminate an incremental search.  Control-G will
      abort  an  incremental  search and restore the original line.  When the search is terminated, the
      history entry containing the search string becomes the current line.


      To find other matching entries in the history list, type Control-S or Control-R as  appropriate.
ヒストリリストで他の一致するエントリを検索するには、Control-SまたはControl-Rを入力する。これにより、ヒストリを後方または前方に検索し、これまでに入力された検索文字列に一致する次のエントリーを探す。 リードラインコマンドにバインドされている他のキー・シーケンスは、検索を終了し、そのコマンドを実行する。 例えば、改行は検索を終了し、その行を受け入れ、履歴リストからコマンドを実行する。
      This will search backward or forward in the history for the next entry matching the search string
      typed so far.  Any other key sequence bound to a readline command will terminate the  search  and
      execute  that  command.  For  instance, a newline will terminate the search and accept the line,
      thereby executing the command from the history list.


      Readline remembers the last incremental search string.  If two Control-Rs are typed  without  any
Readlineは最後のインクリメンタルな検索文字列を記憶している。 新しい検索文字列を定義する文字を挟まずにControl-Rが2つ入力された場合、記憶された検索文字列が使用される。
      intervening characters defining a new search string, any remembered search string is used.


      Non-incremental  searches  read  the  entire search string before starting to search for matching
非インクリメンタル検索では、一致する履歴行の検索を開始する前に、検索文字列全体を読み込む。 検索文字列は、ユーザーが入力することもできるし、現在の行の内容の一部であることもできる。
      history lines.  The search string may be typed by the user or be part of the contents of the cur‐
      rent line.


=== Readline Command Names ===
=== Readline Command Names ===