OSDN Git Service

名称の変更.
[omake-japanese/omake_trans.git] / src / pervasives.rst
diff --git a/src/pervasives.rst b/src/pervasives.rst
new file mode 100644 (file)
index 0000000..7581da4
--- /dev/null
@@ -0,0 +1,836 @@
+.. 12-prevasives
+
+.. _label12:
+
+12. 標準的なオブジェクト群
+==================================
+.. Pervasives defines the objects that are defined in all programs. The following objects are defined.
+
+ここでの『広く使われている』は、すべてのプログラムで使われているオブジェクトを意味しています。以下のオブジェクトが定義されています。
+
+.. _label12.1:
+
+12.1 広く使われているオブジェクト
+----------------------------------
+
+.. index::
+   single: Object
+.. _label12.1.1:
+
+12.1.1 Object
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : 無し
+
+.. The Object object is the root object. Every class is a subclass of Object.
+
+``Object`` オブジェクトはルートとなるオブジェクトです。すべてのクラスは ``Object`` のサブクラスです。
+
+.. It provides the following fields:
+
+以下のフィールドやメソッドを提供します。
+
+.. the number of fields and methods in the object. 
+   returns true iff the <var> is a field or method of the object.
+   adds the field to the object, returning a new object. 
+   fetches the field or method from the object; it is equivalent to $(o.<var>), but the variable can be non-constant. 
+   maps a function over the object. The function should take two arguments; the first is a field name, the second is the value of that field. The result is a new object constructed from the values returned by the function. 
+   the object-foreach form is equivalent to object-map, but with altered syntax.
+
+* ``$(o.object-length)`` : オブジェクトのメソッドとフィールドの総数
+* ``$(o.object-mem <var>)`` : <var>がオブジェクトのフィールドやメソッドであった場合は ``true`` を返します。
+* ``$(o.object-add <var, <value>)`` : オブジェクトにフィールドを追加した新しいオブジェクトを返します。
+* ``$(o.object-find <var>)`` : オブジェクトのメソッドやフィールドを取得します。これは ``$(o.<var>)`` と等価ですが、変数は定数でなくても構いません。
+* ``$(o.object-map <fun>)`` : オブジェクト全体に対して関数を適用します。この関数は二つの引数を取り、一つ目はフィールドの名前で、二番目にはフィールドの値を指定します。結果は関数によって返される値が適用された、新しいオブジェクトを返します。
+* ``$(o.object-foreach)`` : ``object-foreach`` は ``object-map`` と等価ですが、別の構文を適用できます。 ::
+
+     o.object-foreach(<var1>, <var2>)
+        <body>
+  
+  .. For example, the following function prints all the fields of an object o.
+  
+  例えば、以下の関数はオブジェクト ``o`` のすべてのフィールドを表示します。 ::
+
+       PrintObject(o) =
+        o.object-foreach(v, x)
+           println($(v) = $(x))
+
+  .. The export form is valid in a object-foreach body. The following function collects just the field names of an object.
+
+  ``export`` 文は ``object-foreach`` の内部に適用できます。以下の関数ではオブジェクトのフィールド名を収集します。 ::
+  
+     FieldNames(o) =
+        names[] =
+        o.object-foreach(v, x)
+           names[] += $(v)
+           export
+        return $(names)
+
+.. index::
+   single: Map
+.. _label12.1.2:
+
+12.1.2 Map
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : ``Object``
+
+.. A Map object is a dictionary from values to values. The <key> values are restricted to simple values: integers, floating-point numbers, strings, files, directories, and arrays of simple values.
+
+``Map`` オブジェクトは値から値を返す辞書です。 ``<key>`` の値は単純な型のみが使用できます。具体的には、整数型、浮動小数点型、文字列型、ファイル型、辞書型、そして単純な型で構成された配列です。
+
+.. The Map object provides the following methods.
+
+Mapオブジェクトは以下のメソッドを提供します。
+
+.. the number of items in the map. 
+   returns true iff the <key> is defined in the map. 
+   adds the field to the map, returning a new map. 
+   fetches the field from the map. 
+   fetches an array of all the keys in the map, in alphabetical order. 
+   fetches an array of all the values in the map, in the alphabetical order of the corresponding keys.
+   maps a function over the map. The function should take two arguments; the first is a field name, the second is the value of that field. The result is a new object constructed from the values returned by the function. 
+   the foreach form is equivalent to map, but with altered syntax.
+
+* ``$(o.length)`` : 辞書に格納されているアイテムの総数
+* ``$(o.mem <key>)`` : ``<key>`` が辞書に定義されている場合は ``true`` を返します。
+* ``$(o.add <key>, <value>)`` : 辞書にフィールドを追加した、新しい辞書を返します。
+* ``$(o.find <key>)`` : 辞書から対象のフィールドを取得します。
+* ``$(o.keys)`` : 辞書の中にあるすべてのキーの配列をアルファベット順で取得します。
+* ``$(o.values)`` : 辞書の中にあるすべての値の配列を、キーのアルファベット順で取得します。
+* ``$(o.map <fun>)`` : 一つ目はフィールドの名前で、二番目にはフィールドの値を指定します。結果は関数によって返される値が適用された、新しいオブジェクトを返します。
+* ``$(o.foreach)`` : ``foreach`` 文は ``map`` と等価ですが、別の構文を適用できます。 ::
+
+     o.foreach(<var1>, <var2>)
+        <body>
+  
+  .. For example, the following function prints all the fields of an object o.
+  
+  例えば、以下の関数はオブジェクト ``o`` のすべてのフィールドを表示します。 ::
+
+     PrintObject(o) =
+        o.foreach(v, x)
+           println($(v) = $(x))
+  
+  .. The export form is valid in a foreach body. The following function collects just the field names of the map.
+   
+  ``export`` 文は ``object-foreach`` の内部に適用できます。以下の関数では辞書のフィールド名を収集します。 ::
+
+     FieldNames(o) =
+        names =
+        o.foreach(v, x)
+           names += $(v)
+           export
+        return $(names)
+
+.. There is also simpler syntax when the key is a string. The table can be defined using definitions with the form $|key| (the number of pipe symbols | is allowed to vary).
+
+キーが文字列である場合には単純な記法が用意されています。キー-値のテーブルは ``$|key|`` の文を用いて定義することができます(パイプシンボル ``|`` の数は、多様性のためにいくらでも使うことができます)。 ::
+
+    $|key 1| = value1
+    $||key1|key2|| = value2    # キーは key1|key2
+    X = $|key 1|               # Xにフィールドの値 $|key 1| を定義
+
+.. The usual modifiers are also allowed. The expression $`|key| represents lazy evaluation of the key, and $,|key| is normal evaluation.
+
+通常用いる修飾子も適用できます。式 ``$`|key|`` はキーの遅延評価として解釈されて、また式 ``$,|key|`` は通常の評価を行います。
+
+.. index::
+   single: Number
+.. _label12.1.3:
+
+12.1.3 Number
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : ``Object``
+
+.. The Number object is the parent object for integers and floating-point numbers. 
+
+``Number`` オブジェクトは整数や浮動小数点の親オブジェクトです。
+
+.. index::
+   single: Int
+.. _label12.1.4:
+
+12.1.4 Int
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : ``Number``
+
+.. The Int object represents integer values. 
+
+``Int`` オブジェクトは整数を表現します。
+
+.. index::
+   single: Float
+.. _label12.1.5:
+
+12.1.5 Float
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : ``Number``
+
+.. The Float object represents floating-point numbers. 
+
+``Float`` オブジェクトは浮動小数点を表現します。
+
+.. index::
+   single: Sequence
+.. _label12.1.6:
+
+12.1.6 Sequence
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : ``Object``
+
+.. The Sequence object represents a generic object containing sequential elements. It provides the following methods.
+
+``Sequence`` オブジェクトは一次元的に成分が格納されている、一般的なオブジェクトを表現します。このオブジェクトは以下のメソッドを提供しています。
+
+.. the number of elements in the sequence. 
+   maps a function over the fields in the sequence. The function should take one argument. The result is a new sequence constructed from the values returned by the function.
+   the foreach form is equivalent to map, but with altered syntax.
+
+* ``$(s.length)`` : シーケンスの長さを返します。
+* ``$(s.map <fun>)`` : シーケンスのフィールド全体に対して関数を適用します。この関数は一つの引数を取ります。結果は関数によって返される値からなる、新しいシーケンスを返します。
+* ``$(s.foreach)`` : ``foreach`` 文は ``map`` と等価ですが、別の構文を適用できます。 ::
+
+     s.foreach(<var>)
+        <body>
+  
+  .. For example, the following function prints all the elements of the sequence.
+  
+  例えば、以下の関数ではシーケンスのすべての成分を表示します。 ::
+
+     PrintSequence(s) =
+        s.foreach(x)
+           println(Elem = $(x))
+  
+  .. The export form is valid in a foreach body. The following function counts the number of zeros in the sequence.
+  
+  ``export`` 文は ``foreach`` の内部に適用できます。以下の関数はシーケンスの0の数を数えます。 ::
+  
+     Zeros(s) =
+        count = $(int 0)
+        s.foreach(v)
+           if $(equal $(v), 0)
+              count = $(add $(count), 1)
+              export
+           export
+        return $(count)
+
+.. tests whether each element of the sequence satifies a predicate. 
+
+* ``$(s.forall <fun>)`` : シーケンスの各々の成分が、与えられた関数の評価を満足しているかどうか調べます。
+
+.. tests whether the sequence contains an element that satisfies a predicate. 
+
+* ``$(s.exists <fun>)`` : シーケンスに与えられた関数の評価を満足するような成分があるかどうか調べます。
+
+.. sorts a sequence. The <fun> is a comparison function. It takes two elements (x, y) of the sequence, compares them, and returns a negative number if x < y, a positive number if x > y, and zero if the two elements are equal.
+
+* ``$(s.sort <fun>)`` : シーケンスをソートします。 ``<fun>`` は比較用の関数です。この関数は二つの成分 ``(x, y)`` を持つシーケンスを引数に取り、x,yを比較して、もし x < y であったのなら負の値を返し、 x > y であったなら正の値を返し、二つの成分が等価であったなら0を返します。 ::
+
+    osh> items = $(int 0 3 -2)
+    osh> items.forall(x => $(gt $x, 0))
+    - : bool = false
+    osh> items.exists(x => $(gt $x, 0))
+    - : bool = true
+    osh> items.sort($(compare))
+    - : Array = -2 3 0
+
+
+.. index::
+   single: Array
+.. _label12.1.7:
+
+12.1.7 Array
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : ``Sequence``
+
+.. The Array is a random-access sequence. It provides the following additional methods.
+
+``Array`` は自由にアクセスできるシーケンスです。このオブジェクトは以下の追加メソッドを提供しています。
+
+.. returns element i of the sequence. 
+   returns the reversed sequence. 
+
+* ``$(s.nth <i>)`` : シーケンスの ``i`` 番めの成分を返します。
+* ``$(s.rev <i>)`` : 逆転させたシーケンスを返します。
+
+.. index::
+   single: String
+.. _label12.1.8:
+
+12.1.8 String
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : ``Array``
+
+.. index::
+   single: Fun
+.. _label12.1.9:
+
+12.1.9 Fun
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : ``Object``
+
+.. The Fun object provides the following methods. 
+
+``Fun`` オブジェクトは以下のメソッドを提供しています。
+
+.. the arity if the function. 
+
+* ``$(f.arity)`` : 関数の場合はアリティ(関数が取る引数の個数)を返します。
+
+.. index::
+   single: Rule
+.. _label12.1.10:
+
+12.1.10 Rule
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : ``Object``
+
+.. The Rule object represents a build rule. It does not currently have any methods. 
+
+``Rule`` オブジェクトはビルドルールを表現します。これは現在なんのメソッドも持っていません。
+
+.. index::
+   single: Target
+.. _label12.1.11:
+
+12.1.11 Target
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : ``Object``
+
+.. The Target object contains information collected for a specific target file.
+
+``Target`` オブジェクトは指定したターゲットファイルの情報を収集しているオブジェクトです。
+
+.. the target file. 
+   the files that may be modified by a side-effect when this target is built. 
+   static dependencies that must be built before this target can be scanned. 
+   statically-defined build dependencies of this target. 
+   all the build dependencies for the target, including static and scanned dependencies. 
+   all the value dependencies associated with the build.
+   the commands to build the target. 
+   if output was diverted to a file, with one of the --output-* options A, this field names that file. Otherwise it is false. 
+
+* ``target`` : ターゲットファイル
+* ``effects`` : ターゲットがビルドされたときに、副次的に修正されるであろうファイル群
+* ``scanner_deps`` : ターゲットがスキャンできるようになる前にビルドしなければならない静的な依存関係
+* ``static-deps`` : 静的に定義されている、ターゲットの依存関係
+* ``build-deps`` : 静的、あるいはスキャンされた依存関係を含む、ターゲットに対するすべての依存関係
+* ``build-values`` : ビルドに関係している、すべての依存関係の値
+* ``build-commands`` : ターゲットをビルドするためのコマンド
+* ``output-file`` : ``--output-*`` オプション( :ref:`labelA.2.8` 以降を参照)を用いて、出力が適当なファイルに書き込まれるような場合、このフィールドはファイル名を表します。そうでない場合は ``false`` を示します。
+
+.. The object supports the following methods.
+
+このオブジェクトは以下のメソッドをサポートしています。
+
+.. returns a Target object for the given file. Raises a RuntimeException if the specified target is not part of the project. 
+   returns a Target object for the given file, or false if the file is not part of the project. 
+
+* ``find(file)`` : 与えられたファイルのターゲットオブジェクトを返します。指定したターゲットがプロジェクトの一部でない場合は ``RuntimeException`` を送出します。
+* ``find-optional(file)`` : 与えられたファイルのターゲットオブジェクトを返します。指定したターゲットがプロジェクトの一部でない場合は ``false`` を返します。
+
+.. NOTE: the information for a target is constructed dynamically, so it is possible that the Target object for a node will contain different values in different contexts. The easiest way to make sure that the Target information is complete is to compute it within a rule body, where the rule depends on the target file, or the dependencies of the target file.
+
+.. note::
+  ターゲットの情報は動的に構築されるので、あるノードの ``Target`` オブジェクトは異なる箇所で異なった値を含む場合があります。 ``Target`` の情報が完全にするためのもっとも簡単な方法は、対象のターゲットファイルに依存しているルール中、もしくは対象のターゲットファイルの依存関係の中で ``Target`` オブジェクトを計算することです。
+
+.. index::
+   single: Node
+.. _label12.1.12:
+
+12.1.12 Node
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : ``Object``
+
+.. The Node object is the parent object for files and directories. It supports the following operations. 
+
+``Node`` オブジェクトはファイルやディレクトリの親オブジェクトです。このオブジェクトは以下の操作をサポートしています。
+
+.. returns a stat object for the file. If the file is a symbolic link, the stat information is for the destination of the link, not the link itself.
+   returns a stat object for the file or symbolic link.
+   removes the file. 
+   renames the file. 
+   creates a hard link <dst> to this file. 
+   create a symbolic link <dst> to this file. 
+   change the permission of this file. 
+   change the owner and group id of this file. 
+
+* ``$(node.stat)`` : ファイルの ``stat`` オブジェクトを返します。もしファイルがシンボリックリンクであったなら、 ``stat`` の情報はリンク先になります。リンク自身ではありません。
+* ``$(node.lstat)`` : ファイルか、シンボリックリンクの ``stat`` オブジェクトを返します。
+* ``$(node.unlink)`` : ファイルを消去します。
+* ``$(node.rename <file>)`` : ファイルをリネームします。
+* ``$(node.link <dst>)`` : このファイルのハードリンクを ``<dst>`` に生成します。
+* ``$(node.symlink <file>)`` : このファイルのシンボリックリンクを ``<dst>`` に生成します。
+* ``$(node.chmod <perm>)`` : このファイルのパーミッションを変更します。
+* ``$(node.chown <uid>, <gid>)`` : このファイルの所有者とグループIDを変更します。
+
+.. index::
+   single: File
+.. _label12.1.13:
+
+12.1.13 File
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : ``Node``
+
+.. The file object represents the name of a file. 
+
+``File`` オブジェクトはファイル名を表現します。
+
+.. index::
+   single: Dir
+.. _label12.1.14:
+
+12.1.14 Dir
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : ``Node``
+
+.. The Dir object represents the name of a directory. 
+
+``Dir`` オブジェクトはディレクトリ名を表現します。
+
+.. index::
+   single: Channel
+.. _label12.1.15:
+
+12.1.15 Channel
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : ``Object``
+
+.. A Channel is a generic IO channel. It provides the following methods. 
+
+``Channel`` オブジェクトは一般的なIOチャネルを表現します。このオブジェクトは以下のメソッドを提供しています。
+
+.. close the channel. 
+   returns the file name associated with the channel. 
+
+* ``$(o.close)`` : チャネルを閉じます。
+* ``$(o.name)`` : チャネルに関係しているファイル名を返します。
+
+.. index::
+   single: InChannel
+.. _label12.1.16:
+
+12.1.16 InChannel
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : ``Channel``
+
+.. A InChannel is an input channel. The variable stdin is the standard input channel.
+
+``InChannel`` は入力チャネルです。変数 ``stdin`` は標準入力チャネルです。
+
+.. It provides the following methods. 
+
+このオブジェクトは以下のメソッドを提供しています。
+
+.. open a new input channel. 
+   open a new input channel, using a string as input. 
+   reads the given number of characters from the channel 
+   reads a line from the channel 
+
+* ``$(InChannel.fopen <file>)`` : 新しい入力チャネルを開きます。
+* ``$(InChannel.of-string <string>)`` : 文字列を入力として、新しい入力チャネルを開きます。
+* ``$(o.read <number>)`` : チャネルから、与えられた数だけ文字を読み込みます。
+* ``$(o.readln)`` : チャネルから一行を読み込みます。
+
+.. index::
+   single: OutChannel
+.. _label12.1.17:
+
+12.1.17 OutChannel
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : ``Channel``
+
+.. A OutChannel is an output channel. The variables stdout and stderr are the standard output and error channels.
+
+``OutChannel`` は出力チャネルです。変数 ``stdout`` と ``stderr`` は標準出力とエラーチャネルです。
+
+.. It provides the following methods. 
+
+このオブジェクトは以下のメソッドを提供しています。
+
+.. open a new output channel. 
+   open a new output channel, writing to a string. 
+   get the current string of output, for an output channel created as OutChannel.open-string. 
+   opens a new output channel, appending to the file. 
+   flush the output channel. 
+   print a string to the channel. 
+   print a string to the channel, followed by a line terminator. 
+
+* ``$(OutChannel.fopen <file>)`` : 新しい出力チャネルを開きます。
+* ``$(OutChannel.string)`` : 文字列を書き込む、新しい出力チャネルを開きます。
+* ``$(OutChannel.to-string)`` : 現在の出力チャネルの文字列を取得します。これは ``OutChannel.open-string`` を使って作られた、出力チャネル用のメソッドです。
+* ``$(OutChannel.append)`` : ファイルを追加した、新しい出力チャネルを開きます。
+* ``$(c.flush)`` : 出力チャネルをクリアします。
+* ``$(c.print <string>)`` : チャネルに文字列を出力します。
+* ``$(c.print <string>)`` : チャネルに、改行コードを付与した文字列を出力します。
+
+.. index::
+   single: Location
+.. _label12.1.18:
+
+12.1.18 Location
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : ``Location``
+
+.. The Location object represents a location in a file. 
+
+``Location`` オブジェクトはファイルの位置を表現します。
+
+.. index::
+   single: Exception
+.. _label12.1.19:
+
+12.1.19 Exception
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : ``Object``
+
+.. The Exception object is used as the base object for exceptions. It has no fields. 
+
+``Exception`` オブジェクトは例外の基底となるオブジェクトとして用いられます。このオブジェクトはなんのフィールドやメソッドを持ちません。
+
+.. index::
+   single: RuntimeException
+.. _label12.1.20:
+
+12.1.20 RuntimeException
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : ``Exception``
+
+.. The RuntimeException object represents an exception from the runtime system. It has the following fields.
+
+``RuntimeException`` オブジェクトはランタイムシステムからの例外を表現します。このオブジェクトは以下のフィールドを持ちます。
+
+.. a string representing the location where the exception was raised.
+   a string containing the exception message. 
+
+* ``position`` : 例外が送出された位置を表現している文字列
+* ``message`` : 例外のメッセージを保持している文字列
+
+.. index::
+   single: UnbuildableException
+.. _label12.1.21:
+
+12.1.21 UnbuildableException
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : ``Exception``
+
+.. The UnbuildableException object should be used to signal that a target is not buildable. It will be caught by functions such as target-exists. This exception has the following fields:
+
+``UnbuildableException`` オブジェクトはターゲットがビルドできないことを知らせるために用いられます。このオブジェクトは ``target-exists()`` のような関数を使った場合に捕えられます。この例外は以下のフィールドを持ちます。
+
+.. indicates which target is not buildable. 
+   a string containing the exception message. 
+
+* ``target`` : どのターゲットがビルドできないのかを示します。
+* ``message`` : 例外のメッセージを含んでいる文字列
+
+.. index::
+   single: Shell
+   single: echo()
+   single: jobs()
+   single: cd()
+   single: bg()
+   single: fg()
+   single: stop()
+   single: wait()
+   single: kill()
+   single: which()
+   single: where()
+   single: rehash()
+   single: ln-or-cp()
+   single: history()
+   single: digest()
+   single: grep()
+   single: pwd()
+   single: mkdir()
+   single: cp()
+   single: mv()
+   single: rm()
+   single: chmod()
+   single: cat()
+   single: test()
+   single: find()
+.. _label12.1.22:
+
+12.1.22 Shell
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+親オブジェクト : ``Object``
+
+.. The Shell object contains the collection of builtin functions available as shell commands.
+
+``Shell`` オブジェクトはシェルコマンドとして利用できるビルドイン関数のコレクションを含んでいます。
+
+.. You can define aliases by extending this object with additional methods. All methods in this class are called with one argument: a single array containing an argument list.
+
+あなたはこのオブジェクトにメソッドを追加し拡張することで、エイリアスを定義することができます。このクラスの中にあるすべてのメソッドは一つの引数をとる必要があります。引数には引数のリストが含まれた、単純な配列が与えられます。
+
+* ``echo``
+  
+  .. The echo function prints its arguments to the standard output channel. 
+  
+  ``echo`` 関数は引数を標準出力チャネルに表示します。
+
+* ``jobs``
+  
+  .. The jobs method prints the status of currently running commands. 
+
+  ``jobs`` メソッドは現在実行しているコマンドの状態を表示します。
+  
+* ``cd``
+  
+  .. The cd function changes the current directory. Note that the current directory follows the usual scoping rules. For example, the following program lists the files in the foo directory, but the current directory is not changed.
+  
+  ``cd`` 関数はカレントディレクトリを変更します。カレントディレクトリは現在のスコーピングルールに従うことに注意してください。例えば、以下のプログラムでは ``foo`` ディレクトリのファイルをリストしていますが、カレントディレクトリは変更されません。 ::
+  
+     section
+        echo Listing files in the foo directory...
+        cd foo
+        ls
+
+     echo Listing files in the current directory...
+     ls
+
+* ``bg``
+  
+  .. The bg method places a job in the background. The job is resumed if it has been suspended. 
+  
+  ``bg`` メソッドはバックグラウンドにジョブを移します。ジョブが中断(suspended)されている場合、そのジョブは再開されます。
+
+* ``fg``
+  
+  .. The fg method brings a job to the foreground. The job is resumed if it has been suspended. 
+  
+  ``fg`` メソッドはジョブをフォアグラウンドに持っていきます。ジョブが中断されている場合、そのジョブは再開されます。
+  
+* ``stop``
+  
+  .. The stop method suspends a running job. 
+  
+  ``stop`` 関数は実行しているジョブを中断します。
+
+* ``wait``
+  
+  .. The wait function waits for a running job to terminate. It is not possible to wait for a suspended job.
+  
+  ``wait`` 関数は実行しているジョブが終了するまで待機します。この関数は、中断しているジョブを待機することができません。
+  
+  .. The job is not brought to the foreground. If the wait is interrupted, the job continues to run in the background. 
+  
+  ジョブをフォアグラウンドに持っていくことはしません。また、 ``wait`` が割り込まれた場合、ジョブはバックグラウンド上で実行し続けます。
+
+* ``kill``
+  
+  .. The kill function signal a job.
+  
+  ``kill`` 関数はジョブにシグナルを送ります。 ::
+  
+    kill [signal] <pid...>.
+  
+  .. The signals are either numeric, or symbolic. The symbolic signals are named as follows.
+  
+  シグナルは数値かシンボリックのどちらでも構いません。シンボリックシグナルは以下のように命名されています。
+  
+  ABRT, ALRM, HUP, ILL, KILL, QUIT, SEGV, TERM, USR1, USR2, CHLD, STOP, TSTP, TTIN, TTOU, VTALRM, PROF
+
+* ``exit``
+  
+  .. The exit function terminates the current session. 
+  
+  ``exit`` 関数は現在のセッションを終了します。
+
+* ``which`` , ``where``
+  
+  .. See the documentation for the corresponding functions. 
+  
+  相当する関数のドキュメントを参照してください。
+
+* ``rehash``
+  
+  .. Reset the search path. 
+  
+  検索パスをリセットします。
+
+* ``ln-or-cp`` *src dst*
+  
+  .. Links or copies src to dst, overwriting dst. Namely, ln-or-cp would first delete the dst file (unless it is a directory), if it exists. Next it would try to create a symbolic link dst poiting to src (it will make all the necessary adjustmnents of relative paths). If symbolic link can not be created (e.g. the OS or the filesystem does not support symbolic links), it will try to create a hard link. If that fails too, it will try to forcibly copy src to dst. 
+  
+  *src* を *dst* にリンクもしくはコピーします。 *dst* は上書きされます。通常、 ``ln-or-cp`` は初めに出力先のファイルを(存在している場合は)消去します。次にこの関数は入力先のファイルを指し示しているシンボリックリンクを出力先に生成します(パスはできる限り相対パスとして設定されます)。シンボリックリンクが生成できない場合(例. OSやファイルシステムがシンボリックリンクをサポートしていない場合)、この関数はハードリンクを生成しようと試みます。もしこの試みも失敗したのなら、強制的に入力先のファイルを出力先にコピーしようと試みます。
+
+* ``history``
+  
+  .. Print the current command-line history. 
+  
+  現在のコマンドライン履歴を表示します。
+
+* ``digest``
+  
+  .. Print the digests of the given files. 
+  
+  与えられたファイルの要約を出力します。
+
+* Win32 関数群
+  
+  .. Win32 doesn't provide very many programs for scripting, except for the functions that are builtin to the DOS cmd.exe. The following functions are defined on Win32 and only on Win32. On other systems, it is expected that these programs already exist.
+  
+  Win32ではスクリプトのために使える、多くのプログラム(DOS ``cmd.exe`` に含まれている関数を除く)を提供しています。以下の関数はWin32で定義されており、Win32上でしか使えません。他のシステム上では、この関数はすでに存在している他のプログラムに置き換わることになるでしょう。
+  
+  * ``grep``
+    ::
+
+       grep [-q] [-n] pattern files...
+    
+    .. The grep function calls the omake grep function. 
+    
+    ``grep`` 関数はomakeの ``grep`` 関数を呼び出します。
+
+.. Internal versions of standard system commands.
+
+* omake内部の標準システムコマンド
+  
+  .. By default, omake uses internal versions of the following commands: cp, mv, cat, rm, mkdir, chmod, test, find. If you really want to use the standard system versions of these commands, set the USE_SYSTEM_COMMANDS as one of the first definitions in your OMakeroot file.
+  
+  通常、以下のコマンドはomakeが内部に保有している関数を使います: ``cp`` , ``mv`` , ``cat`` , ``rm`` , ``mkdir`` , ``chmod`` , ``test`` , ``find`` 。もしあなたがどうしてもこれらのコマンドを、システムが標準で使っているコマンドで呼び出したいのなら、 ``USE_SYSTEM_COMMANDS`` を ``OMakeroot`` ファイルの先頭に設定してください。
+  
+  * ``pwd``
+    ::
+    
+        pwd
+    
+    .. The pwd alias would print the absolute path to current directory.
+    
+    ``pwd`` エイリアスはカレントディレクトリの絶対パスを表示します。
+  
+  * ``mkdir``
+    ::
+    
+        mkdir [-m <mode>] [-p] files
+    
+    .. The mkdir function is used to create directories. The -verb+-m+ option can be used to specify the permission mode of the created directory. If the -p option is specified, the full path is created. 
+    
+    ``mkdir`` 関数はディレクトリを生成します。 ``-m`` オプションには生成されるディレクトリのパーミッションを指定します。 ``-p`` オプションが指定された場合、存在しない親ディレクトリもまとめて生成します。
+  
+  * ``cp``
+    
+  * ``mv``
+    ::
+    
+        cp [-f] [-i] [-v] src dst
+        cp [-f] [-i] [-v] files dst
+        mv [-f] [-i] [-v] src dst
+        mv [-f] [-i] [-v] files dst
+    
+    .. The cp function copies a src file to a dst file, overwriting it if it already exists. If more than one source file is specified, the final file must be a directory, and the source files are copied into the directory.
+    
+    ``cp`` 関数は ``src`` ファイルを ``dst`` ファイルにコピーします。出力先のファイルが存在している場合は上書きします。一つ以上の入力ファイルが指定された場合、最後のファイルはディレクトリでなければならず、入力ファイルはそのディレクトリの内部にコピーされます。
+
+    * **-f**
+      
+      .. Copy files forcibly, do not prompt. 
+      
+      確認をしないで、強制的にファイルをコピーします。
+    
+    * **-i**
+      
+      .. Prompt before removing destination files. 
+      
+      出力先のファイルを消去する前に確認します。
+    
+    * **-v**
+      
+      .. Explain what is happening. 
+      
+      実際になにが行われているのか表示します。
+  
+  * ``rm``
+    ::
+    
+       rm [-f] [-i] [-v] [-r] files
+       rmdir [-f] [-i] [-v] [-r] dirs
+    
+    .. The rm function removes a set of files. No warnings are issued if the files do not exist, or if they cannot be removed.
+    
+    ``rm`` 関数はファイルの集合を消去します。ファイルが存在しなかった場合、もしくはファイルが消去できなかった場合、なんの警告も表示しません。
+    
+    オプション:
+    
+    * **-f**
+      
+      .. Forcibly remove files, do not prompt. 
+      
+      確認をしないで、強制的にファイルを消去します。
+    
+    * **-i**
+      
+      .. Prompt before removal. 
+      
+      ファイルを消去する前に確認します。
+    
+    * **-v**
+      
+      .. Explain what is happening. 
+      
+      実際になにが行われているのか表示します。
+    
+    * **-r**
+      
+      .. Remove contents of directories recursively. 
+      
+      再帰的にディレクトリの内容を消去します。
+  
+  * ``chmod``
+    ::
+    
+        chmod [-r] [-v] [-f] mode files
+    
+    .. The chmod function changes the permissions on a set of files or directories. This function does nothing on Win32. The mode may be specified as an octal number, or in symbolic form [ugoa]*[-=][rwxXstugo]+. See the man page for chmod for details.
+    
+    ``chmod`` 関数はファイルの集合やディレクトリのパーミッションを変更します。この関数はWin32上ではなにも行いません。 ``mode`` には8進数か、シンボリックフォーム ``[ugoa]*[-=][rwxXstugo]+`` を指定します。詳細は ``chmod`` のmanを参照してください。
+    
+    オプション:
+    
+    * **-r**
+      
+      .. Change permissions of all files in a directory recursively. 
+      
+      ディレクトリ内のすべてのファイルのパーミッションを再帰的に変更します。
+    
+    * **-v**
+      
+      .. Explain what is happening. 
+      
+      実際になにが行われているのか表示します。
+      
+    * **-f**
+      
+      .. Continue on errors. 
+      
+      エラーが生じても実行し続けます。
+  
+  * ``cat``
+    ::
+    
+       cat files...
+    
+    .. The cat function prints the contents of the files to stdout 
+    
+    ``cat`` 関数はファイルの内容をstdoutに出力します。
+  
+  * ``test``
+    ::
+    
+      test expression
+      [ expression +]+
+      [ --help
+      [ --version
+    
+    .. See the documentation for the test function.
+    
+    詳細は ":ref:`label10.7.1`" を参照してください。
+  
+  * ``find``
+    ::
+    
+      find expression
+    
+    .. See the documentation for the find function.
+    
+    詳細は ":ref:`label10.7.2`" を参照してください。