Require $PATH search for substitutive built-ins
This commit recategorizes regular built-ins into substitutive built-ins
and extension built-ins in order to remove the use of the words "regular
built-ins," which have been used in a different meaning than mentioned
in POSIX.
To minimize the behavioral differences caused by enabling the POSIXly-
correct mode, substitutive built-ins now require a corresponding
external program when running them except for the "array" built-in which
now is an extension built-in and is completely ignored in the POSIXly-
correct mode.
@@ -16,6 +16,13 @@ | ||
16 | 16 | "semi-special" built-ins are now categorized in either of the new |
17 | 17 | categories "mandatory" and "elective". The "command" and "type" |
18 | 18 | built-ins now report the new categories of such built-ins. |
19 | + = The shell now requires a corresponding external executable to | |
20 | + exist in $PATH when running a built-in that works like a standard | |
21 | + external utility even when the POSIXly-correct mode is inactive. | |
22 | + Such built-ins are now categorized as "substitutive" built-ins. | |
23 | + = The "array" built-in is now completely ignored in the POSIXly- | |
24 | + correct mode. The built-in, formerly a regular built-in, is now | |
25 | + categorized as an "extension" built-in. | |
19 | 26 | |
20 | 27 | ---------------------------------------------------------------------- |
21 | 28 | Yash 2.53 (2022-08-23) |
@@ -130,7 +130,7 @@ | ||
130 | 130 | DEFBUILTIN("readonly", typeset_builtin, BI_SPECIAL, readonly_help, |
131 | 131 | readonly_syntax, typeset_options); |
132 | 132 | #if YASH_ENABLE_ARRAY |
133 | - DEFBUILTIN("array", array_builtin, BI_REGULAR, array_help, array_syntax, | |
133 | + DEFBUILTIN("array", array_builtin, BI_EXTENSION, array_help, array_syntax, | |
134 | 134 | array_options); |
135 | 135 | #endif |
136 | 136 | DEFBUILTIN("unset", unset_builtin, BI_SPECIAL, unset_help, unset_syntax, |
@@ -209,15 +209,18 @@ | ||
209 | 209 | |
210 | 210 | /* defined in "builtins/printf.c" */ |
211 | 211 | #if YASH_ENABLE_PRINTF |
212 | - DEFBUILTIN("echo", echo_builtin, BI_REGULAR, echo_help, echo_syntax, NULL); | |
213 | - DEFBUILTIN("printf", printf_builtin, BI_REGULAR, printf_help, printf_syntax, | |
214 | - help_option); | |
212 | + DEFBUILTIN("echo", echo_builtin, BI_SUBSTITUTIVE, echo_help, echo_syntax, | |
213 | + NULL); | |
214 | + DEFBUILTIN("printf", printf_builtin, BI_SUBSTITUTIVE, printf_help, | |
215 | + printf_syntax, help_option); | |
215 | 216 | #endif |
216 | 217 | |
217 | 218 | /* defined in "builtins/test.c" */ |
218 | 219 | #if YASH_ENABLE_TEST |
219 | - DEFBUILTIN("test", test_builtin, BI_REGULAR, test_help, test_syntax, NULL); | |
220 | - DEFBUILTIN("[", test_builtin, BI_REGULAR, test_help, test_syntax, NULL); | |
220 | + DEFBUILTIN("test", test_builtin, BI_SUBSTITUTIVE, test_help, test_syntax, | |
221 | + NULL); | |
222 | + DEFBUILTIN("[", test_builtin, BI_SUBSTITUTIVE, test_help, test_syntax, | |
223 | + NULL); | |
221 | 224 | #endif |
222 | 225 | |
223 | 226 | /* defined in "lineedit/complete.c" */ |
@@ -508,11 +511,12 @@ | ||
508 | 511 | while ((kv = ht_next(&builtins, &i)).key != NULL) { |
509 | 512 | le_candgentype_T type; |
510 | 513 | switch (((const builtin_T *) kv.value)->type) { |
511 | - case BI_SPECIAL: type = CGT_SBUILTIN; break; | |
512 | - case BI_MANDATORY: type = CGT_MBUILTIN; break; | |
513 | - case BI_ELECTIVE: type = CGT_LBUILTIN; break; | |
514 | - case BI_REGULAR: type = CGT_RBUILTIN; break; | |
515 | - default: assert(false); | |
514 | + case BI_SPECIAL: type = CGT_SBUILTIN; break; | |
515 | + case BI_MANDATORY: type = CGT_MBUILTIN; break; | |
516 | + case BI_ELECTIVE: type = CGT_LBUILTIN; break; | |
517 | + case BI_EXTENSION: type = CGT_XBUILTIN; break; | |
518 | + case BI_SUBSTITUTIVE: type = CGT_UBUILTIN; break; | |
519 | + default: assert(false); | |
516 | 520 | } |
517 | 521 | if (!(compopt->type & type)) |
518 | 522 | continue; |
@@ -26,10 +26,11 @@ | ||
26 | 26 | __attribute__((nonnull)); |
27 | 27 | |
28 | 28 | typedef enum builtintype_T { |
29 | - BI_SPECIAL, // built-ins defined in POSIX XCU 2.14 | |
30 | - BI_MANDATORY, // built-ins listed in POSIX XCU 1.6 | |
31 | - BI_ELECTIVE, // built-ins listed in POSIX XCU 2.9.1 | |
32 | - BI_REGULAR, // built-ins that substitute external utilities | |
29 | + BI_SPECIAL, // built-ins defined in POSIX XCU 2.14 | |
30 | + BI_MANDATORY, // built-ins listed in POSIX XCU 1.6 | |
31 | + BI_ELECTIVE, // built-ins listed in POSIX XCU 2.9.1 | |
32 | + BI_EXTENSION, // built-ins not mentioned in POSIX | |
33 | + BI_SUBSTITUTIVE, // built-ins that substitute external utilities | |
33 | 34 | } builtintype_T; |
34 | 35 | |
35 | 36 | typedef struct builtin_T { |
@@ -78,6 +78,7 @@ | ||
78 | 78 | == Notes |
79 | 79 | |
80 | 80 | The array built-in is not defined in the POSIX standard. |
81 | +Yash implements the built-in as an link:builtin.html#types[extension]. | |
81 | 82 | |
82 | 83 | The command +array {{name}} {{value}}...+ is equivalent to the assignment |
83 | 84 | +{{name}}=({{value}}...)+. |
@@ -83,7 +83,7 @@ | ||
83 | 83 | +-b+:: |
84 | 84 | +--builtin-command+:: |
85 | 85 | link:builtin.html[Built-in commands]. |
86 | -(same as +--special-builtin --mandatory-builtin --elective-builtin --regular-builtin+) | |
86 | +(same as +--special-builtin --mandatory-builtin --elective-builtin --extension-builtin --substitutive-builtin+) | |
87 | 87 | |
88 | 88 | +-c+:: |
89 | 89 | +--command+:: |
@@ -103,6 +103,9 @@ | ||
103 | 103 | +--executable-file+:: |
104 | 104 | Executable regular files. |
105 | 105 | |
106 | ++--extension-builtin+:: | |
107 | +link:builtin.html#types[Extension built-in commands]. | |
108 | + | |
106 | 109 | +--external-command+:: |
107 | 110 | External commands. |
108 | 111 |
@@ -142,7 +145,7 @@ | ||
142 | 145 | Normal link:syntax.html#aliases[aliases]. |
143 | 146 | |
144 | 147 | +--regular-builtin+:: |
145 | -link:builtin.html#types[Regular built-in commands]. | |
148 | +Obsolete synonym for +--extension-builtin --substitutive-builtin+. | |
146 | 149 | |
147 | 150 | +--running-job+:: |
148 | 151 | link:job.html#jobid[Job IDs] of jobs that are being executed. |
@@ -162,6 +165,9 @@ | ||
162 | 165 | +--stopped-job+:: |
163 | 166 | link:job.html#jobid[Job IDs] of jobs that are suspended. |
164 | 167 | |
168 | ++--substitutive-builtin+:: | |
169 | +link:builtin.html#types[Substitutive built-in commands]. | |
170 | + | |
165 | 171 | +-u+:: |
166 | 172 | +--username+:: |
167 | 173 | Users' log-in names. |
@@ -35,11 +35,16 @@ | ||
35 | 35 | built-ins in the link:posix.html[POSIXly-correct mode] because POSIX only |
36 | 36 | reserves their names without defining their behavior. |
37 | 37 | |
38 | -dfn:[Regular built-in commands] are less important built-in commands including | |
39 | -commands that can be implemented as external commands or are not listed in | |
40 | -POSIX. In the POSIXly-correct mode, a regular built-in is executed only when | |
41 | -a corresponding external command is link:exec.html#search[found in PATH]. | |
38 | +An dfn:[extension built-in command] is a built-in that is not mentioned in | |
39 | +POSIX. Like an elective built-in, it can be executed without an external | |
40 | +command when the link:posix.html[POSIXly-correct mode] is off. However, when | |
41 | +the POSIXly-correct mode is on, the shell works as if the built-in does not | |
42 | +exist. | |
42 | 43 | |
44 | +dfn:[Substitutive built-in commands] work on behalf of external commands | |
45 | +link:exec.html#search[found in PATH]. These built-ins improve execution speed | |
46 | +by bypassing invocation overheads for external programs. | |
47 | + | |
43 | 48 | [[argsyntax]] |
44 | 49 | == Syntax of command arguments |
45 | 50 |
@@ -137,9 +137,9 @@ | ||
137 | 137 | function is determined as the executed command. |
138 | 138 | . If the command name is a link:builtin.html#types[mandatory or elective |
139 | 139 | built-in], the built-in is determined as the executed command. |
140 | -. If the command name is a link:builtin.html#types[regular built-in], the | |
141 | - built-in is determined as the executed command unless the shell is in the | |
142 | - link:posix.html[POSIXly-correct mode]. | |
140 | +. If the command name is an link:builtin.html#types[extension built-in] and | |
141 | + the shell is not in the link:posix.html[POSIXly-correct mode], the built-in | |
142 | + is determined as the executed command. | |
143 | 143 | . The shell searches the PATH for a executed command: |
144 | 144 | + |
145 | 145 | -- |
@@ -152,8 +152,8 @@ | ||
152 | 152 | to the command name. |
153 | 153 | If such a file is found: |
154 | 154 | |
155 | -- If the command name is the name of a built-in, the built-in is determined as | |
156 | - the executed command. | |
155 | +- If the command name is the name of a link:builtin.html#types[substitutive | |
156 | + built-in], the built-in is determined as the executed command. | |
157 | 157 | - Otherwise, the file is determined as the executed command. |
158 | 158 | (The file will be executed as an external command.) |
159 | 159 |
@@ -18,8 +18,8 @@ | ||
18 | 18 | == Built-ins |
19 | 19 | |
20 | 20 | Parenthesized letters indicate the link:builtin.html#types[types of built-in |
21 | -commands]: (S) for special, (M) mandatory, and (L) elective. | |
22 | -Regular built-ins are not marked. | |
21 | +commands]: (S) for special, (M) mandatory, (L) elective, and (X) extension. | |
22 | +Substitutive built-ins are not marked. | |
23 | 23 | |
24 | 24 | [[alpha-order]] |
25 | 25 | === All built-ins in alphabetic order |
@@ -29,7 +29,7 @@ | ||
29 | 29 | - link:_colon.html[+:+ (colon)] (S) |
30 | 30 | - link:_test.html[+[+ (bracket)] |
31 | 31 | - link:_alias.html[+alias+] (M) |
32 | -- link:_array.html[+array+] | |
32 | +- link:_array.html[+array+] (X) | |
33 | 33 | - link:_bg.html[+bg+] (M) |
34 | 34 | - link:_bindkey.html[+bindkey+] (L) |
35 | 35 | - link:_break.html[+break+] (S) |
@@ -126,7 +126,7 @@ | ||
126 | 126 | - link:_export.html[+export+] (S) |
127 | 127 | - link:_local.html[+local+] (L) |
128 | 128 | - link:_readonly.html[+readonly+] (S) |
129 | -- link:_array.html[+array+] | |
129 | +- link:_array.html[+array+] (X) | |
130 | 130 | - link:_set.html[+set+] (S) |
131 | 131 | - link:_shift.html[+shift+] (S) |
132 | 132 | - link:_read.html[+read+] (M) |
@@ -63,6 +63,7 @@ | ||
63 | 63 | == 補足 |
64 | 64 | |
65 | 65 | POSIX には array コマンドに関する規定はありません。 |
66 | +Yash ではこれを{zwsp}link:builtin.html#types[拡張組込みコマンド]として実装しています。 | |
66 | 67 | |
67 | 68 | +array {{配列名}} [{{値}}...]+ の形式の array コマンドは変数代入を用いて +{{配列名}}=({{値}}...)+ と書くこともできます。 |
68 | 69 |
@@ -60,7 +60,7 @@ | ||
60 | 60 | |
61 | 61 | +-b+:: |
62 | 62 | +--builtin-command+:: |
63 | -link:builtin.html[組込みコマンド] (+--special-builtin --mandatory-builtin --elective-builtin --regular-builtin+ に同じ) | |
63 | +link:builtin.html[組込みコマンド] (+--special-builtin --mandatory-builtin --elective-builtin --extension-builtin --substitutive-builtin+ に同じ) | |
64 | 64 | |
65 | 65 | +-c+:: |
66 | 66 | +--command+:: |
@@ -79,6 +79,9 @@ | ||
79 | 79 | +--executable-file+:: |
80 | 80 | 実行可能ファイル |
81 | 81 | |
82 | ++--extension-builtin+:: | |
83 | +link:builtin.html#types[拡張組込みコマンド] | |
84 | + | |
82 | 85 | +--external-command+:: |
83 | 86 | 外部コマンド |
84 | 87 |
@@ -118,7 +121,8 @@ | ||
118 | 121 | 通常の (グローバルでない) link:syntax.html#aliases[エイリアス] |
119 | 122 | |
120 | 123 | +--regular-builtin+:: |
121 | -通常の{zwsp}link:builtin.html[組込みコマンド] | |
124 | +後方互換性のために残されている古いオプション。 | |
125 | ++--extension-builtin --substitutive-builtin+ に同じ。 | |
122 | 126 | |
123 | 127 | +--running-job+:: |
124 | 128 | 実行中のジョブの{zwsp}link:job.html#jobid[ジョブ ID] |
@@ -139,6 +143,9 @@ | ||
139 | 143 | +--stopped-job+:: |
140 | 144 | 停止中のジョブの{zwsp}link:job.html#jobid[ジョブ ID] |
141 | 145 | |
146 | ++--substitutive-builtin+:: | |
147 | +link:builtin.html#types[代替組込みコマンド] | |
148 | + | |
142 | 149 | +-u+:: |
143 | 150 | +--username+:: |
144 | 151 | ユーザのログイン名 |
@@ -20,8 +20,10 @@ | ||
20 | 20 | dfn:[必須組込みコマンド]と{zwsp}dfn:[任意組込みコマンド]は外部コマンドの存在に関係なく実行される点では特殊組込みコマンドと同様ですが、{zwsp}link:exec.html#function[関数]で上書き可能な点が異なります。 |
21 | 21 | 必須組込みコマンドは常に利用可能ですが、任意組込みコマンドは POSIX では名前しか定義されていないため link:posix.html[POSIX 準拠モード]では使えません。 |
22 | 22 | |
23 | -外部コマンドとして実装可能な組込みコマンドや POSIX に規定されていない組込みコマンドを含む、重要度の低い組込みコマンドはdfn:[通常の組込みコマンド]です。POSIX 準拠モードでは、通常の組込みコマンドは対応する外部コマンドが link:exec.html#search[+PATH+ 変数の検索]で見つかった場合のみ実行されます。 | |
23 | +dfn:[拡張組込みコマンド]は POSIX で言及されていないコマンドです。任意組込みコマンドと同様に、{zwsp}link:posix.html[POSIX 準拠モード]が無効の時は外部コマンドに関係なく使用できますが、POSIX 準拠モードが有効な時は拡張組込みコマンドは存在しないものとして扱われます。 | |
24 | 24 | |
25 | +dfn:[代替組込みコマンド]は link:exec.html#search[+PATH+ 変数の検索]で見つかった外部コマンドの代わりに実行される組込みコマンドです。外部コマンドを起動するオーバーヘッドを回避して実行速度を向上します。 | |
26 | + | |
25 | 27 | [[argsyntax]] |
26 | 28 | == コマンドの引数の構文 |
27 | 29 |
@@ -61,11 +61,11 @@ | ||
61 | 61 | . コマンド名が{zwsp}link:builtin.html#types[特殊組込みコマンド]ならば、その組込みコマンドが実行すべきコマンドとして特定されます。 |
62 | 62 | . コマンド名と同じ名前の<<function,関数>>が存在すれば、その関数が実行すべきコマンドとして特定されます。 |
63 | 63 | . コマンド名が{zwsp}link:builtin.html#types[必須組込みコマンドまたは任意組込みコマンド]ならば、その組込みコマンドが実行すべきコマンドとして特定されます。 |
64 | -. コマンド名が{zwsp}link:builtin.html#types[通常の組込みコマンド]ならば、その組込みコマンドが実行すべきコマンドとして特定されます。(link:posix.html[POSIX 準拠モード]のときを除く) | |
64 | +. コマンド名が{zwsp}link:builtin.html#types[拡張組込みコマンド]ならば、その組込みコマンドが実行すべきコマンドとして特定されます。(link:posix.html[POSIX 準拠モード]のときを除く) | |
65 | 65 | . link:params.html#sv-path[+PATH+ 変数]の値に従って、実行すべき外部コマンドを検索しそのパス名を特定します。 |
66 | 66 | + |
67 | 67 | -- |
68 | -+PATH+ 変数の値は、いくつかのディレクトリのパス名をコロン (+:+) で区切ったものとみなされます (空のパス名はシェルの作業ディレクトリを表しているものとみなします)。それらの各ディレクトリについて順に、ディレクトリの中にコマンド名と同じ名前の実行可能な通常のファイルがあるか調査します。そのようなファイルがあれば、そのファイルが実行すべき外部コマンドとして特定されます (ただし、コマンド名と同じ名前の組込みコマンドがあれば、代わりにその組込みコマンドが実行すべきコマンドとして特定されます)。どのディレクトリにもそのようなファイルが見つからなければ、実行すべきコマンドは見つからなかったものとみなされます。 | |
68 | ++PATH+ 変数の値は、いくつかのディレクトリのパス名をコロン (+:+) で区切ったものとみなされます (空のパス名はシェルの作業ディレクトリを表しているものとみなします)。それらの各ディレクトリについて順に、ディレクトリの中にコマンド名と同じ名前の実行可能な通常のファイルがあるか調査します。そのようなファイルがあれば、そのファイルが実行すべき外部コマンドとして特定されます (ただし、コマンド名と同じ名前の代替組込みコマンドがあれば、代わりにその組込みコマンドが実行すべきコマンドとして特定されます)。どのディレクトリにもそのようなファイルが見つからなければ、実行すべきコマンドは見つからなかったものとみなされます。 | |
69 | 69 | -- |
70 | 70 | |
71 | 71 | 外部コマンドの検索が成功しパス名が特定できた場合、そのパス名が絶対パスならば、シェルはそのパス名を記憶し、再び同じコマンドを実行する際に検索の手間を省きます。ただし、再びコマンドを実行しようとした際に、記憶しているパス名に実行可能ファイルが見当たらない場合は、検索をやり直します。シェルが記憶しているパス名は link:_hash.html[hash 組込みコマンド]で管理できます。 |
@@ -18,7 +18,7 @@ | ||
18 | 18 | == 組込みコマンド |
19 | 19 | |
20 | 20 | 括弧書きの文字は{zwsp}link:builtin.html#types[組込みコマンドの種類]を表します。 |
21 | -(S) は特殊組込みコマンド、(M) は必須組込みコマンド、(L) は任意組込みコマンド、無印は通常の組込みコマンドです。 | |
21 | +(S) は特殊組込みコマンド、(M) は必須組込みコマンド、(L) は任意組込みコマンド、(X) は拡張組込みコマンド、無印は代替組込みコマンドです。 | |
22 | 22 | |
23 | 23 | [[alpha-order]] |
24 | 24 | === 組込みコマンド一覧 (アルファベット順) |
@@ -28,7 +28,7 @@ | ||
28 | 28 | - link:_colon.html[+:+ (コロン)] (S) |
29 | 29 | - link:_test.html[+[+ (括弧)] |
30 | 30 | - link:_alias.html[+alias+] (M) |
31 | -- link:_array.html[+array+] | |
31 | +- link:_array.html[+array+] (X) | |
32 | 32 | - link:_bg.html[+bg+] (M) |
33 | 33 | - link:_bindkey.html[+bindkey+] (L) |
34 | 34 | - link:_break.html[+break+] (S) |
@@ -125,7 +125,7 @@ | ||
125 | 125 | - link:_export.html[+export+] (S) |
126 | 126 | - link:_local.html[+local+] (L) |
127 | 127 | - link:_readonly.html[+readonly+] (S) |
128 | -- link:_array.html[+array+] | |
128 | +- link:_array.html[+array+] (X) | |
129 | 129 | - link:_set.html[+set+] (S) |
130 | 130 | - link:_shift.html[+shift+] (S) |
131 | 131 | - link:_read.html[+read+] (M) |
@@ -32,8 +32,7 @@ | ||
32 | 32 | - +<&+ および +>&+ link:redir.html#dup[リダイレクト]演算子の対象となるファイル記述子はそれぞれ読み込み可能および書き込み可能でなければなりません。 |
33 | 33 | - link:redir.html#socket[ソケットリダイレクト]・{zwsp}link:redir.html#here[ヒアストリング]・{zwsp}link:redir.html#pipe[パイプリダイレクト]・{zwsp}link:redir.html#process[プロセスリダイレクト]は使用できません。 |
34 | 34 | - link:exec.html#simple[単純コマンドの実行]時、コマンドが見つからなくても link:params.html#sv-command_not_found_handler[+COMMAND_NOT_FOUND_HANDLER+ 変数]の値は実行しません。 |
35 | -- link:builtin.html#types[任意組込みコマンド]は実行できません。 | |
36 | -- link:exec.html#search[コマンドの検索]において{zwsp}link:builtin.html#types[通常の組込みコマンド]は対応する外部コマンドがないと見つかりません。 | |
35 | +- link:builtin.html#types[任意組込みコマンドおよび拡張組込みコマンド]は実行できません。 | |
37 | 36 | - いくつかの{zwsp}link:builtin.html[組込みコマンド]で特定のオプションが使えなくなるなど挙動が変わります。特に、長いオプションは使えなくなります。 |
38 | 37 | - link:interact.html[対話モード]でないとき、{zwsp}link:builtin.html#types[特殊組込みコマンド]のオプションやオペランドの使い方が間違っているとシェルは直ちに終了します。また特殊組込みコマンドで代入エラーやリダイレクトエラーが発生したときも直ちに終了します。 |
39 | 38 | - link:interact.html[対話モード]のプロンプトを出す前に link:params.html#sv-prompt_command[+PROMPT_COMMAND+ 変数]の値を実行しません。{zwsp}link:params.html#sv-ps1[+PS1+ 変数]・{zwsp}link:params.html#sv-ps2[+PS2+ 変数]・{zwsp}link:params.html#sv-ps4[+PS4+ 変数]の値の解釈の仕方が違います。{zwsp}link:params.html#sv-yash_ps1[+YASH_PS1+] など +YASH_+ で始まる名前のプロンプト変数は使用されません。 |
@@ -78,10 +78,7 @@ | ||
78 | 78 | search does not trigger execution of the |
79 | 79 | link:params.html#sv-command_not_found_handler[+COMMAND_NOT_FOUND_HANDLER+ |
80 | 80 | variable]. |
81 | -- link:builtin.html#types[Elective built-ins] cannot be executed. | |
82 | -- In link:exec.html#search[command search], a link:builtin.html#types[regular | |
83 | - built-in] needs to have a corresponding external command for the built-in to | |
84 | - be found. | |
81 | +- link:builtin.html#types[Elective and extension built-ins] cannot be executed. | |
85 | 82 | - Some link:builtin.html[built-ins] behave differently. |
86 | 83 | Especially, long command-line options (as well as some others) cannot be |
87 | 84 | used. |
@@ -97,7 +97,8 @@ | ||
97 | 97 | CT_SPECIALBUILTIN, |
98 | 98 | CT_MANDATORYBUILTIN, |
99 | 99 | CT_ELECTIVEBUILTIN, |
100 | - CT_REGULARBUILTIN, | |
100 | + CT_EXTENSIONBUILTIN, | |
101 | + CT_SUBSTITUTIVEBUILTIN, | |
101 | 102 | CT_FUNCTION, |
102 | 103 | } cmdtype_T; |
103 | 104 |
@@ -869,8 +870,8 @@ | ||
869 | 870 | * `name' and `wname' must contain the same string value. |
870 | 871 | * If the SCT_ALL flag is not set: |
871 | 872 | * * a function whose name contains a slash cannot be found |
872 | - * * a regular built-in cannot be found in the POSIXly correct mode if the | |
873 | - * SCT_EXTERNAL flag is not set either. | |
873 | + * * a substitutive built-in cannot be found if the SCT_EXTERNAL flag is not | |
874 | + * set either. | |
874 | 875 | * If the SCT_EXTERNAL flag is set, the SCT_CHECK flag is not set, and `name' |
875 | 876 | * contains a slash, the external command of the given `name' is always found. |
876 | 877 | */ |
@@ -910,11 +911,18 @@ | ||
910 | 911 | ci->type = CT_ELECTIVEBUILTIN; |
911 | 912 | ci->ci_builtin = bi->body; |
912 | 913 | return; |
914 | + case BI_EXTENSION: | |
915 | + if (posixly_correct) { | |
916 | + bi = NULL; | |
917 | + break; | |
918 | + } else { | |
919 | + ci->type = CT_EXTENSIONBUILTIN; | |
920 | + ci->ci_builtin = bi->body; | |
921 | + return; | |
922 | + } | |
913 | 923 | case BI_SPECIAL: |
914 | 924 | assert(false); |
915 | - case BI_REGULAR: | |
916 | - if (!posixly_correct) | |
917 | - goto regular_builtin; | |
925 | + case BI_SUBSTITUTIVE: | |
918 | 926 | break; |
919 | 927 | } |
920 | 928 | } |
@@ -936,9 +944,8 @@ | ||
936 | 944 | cmdpath = get_command_path(name, false); |
937 | 945 | if (cmdpath != NULL) { |
938 | 946 | if (bi != NULL) { |
939 | -regular_builtin: | |
940 | - assert(bi->type == BI_REGULAR); | |
941 | - ci->type = CT_REGULARBUILTIN; | |
947 | + assert(bi->type == BI_SUBSTITUTIVE); | |
948 | + ci->type = CT_SUBSTITUTIVEBUILTIN; | |
942 | 949 | ci->ci_builtin = bi->body; |
943 | 950 | } else { |
944 | 951 | ci->type = CT_EXTERNALPROGRAM; |
@@ -1034,7 +1041,8 @@ | ||
1034 | 1041 | /* falls thru! */ |
1035 | 1042 | case CT_SPECIALBUILTIN: |
1036 | 1043 | case CT_MANDATORYBUILTIN: |
1037 | - case CT_REGULARBUILTIN: | |
1044 | + case CT_EXTENSIONBUILTIN: | |
1045 | + case CT_SUBSTITUTIVEBUILTIN: | |
1038 | 1046 | yash_error_message_count = 0; |
1039 | 1047 | |
1040 | 1048 | const wchar_t *savecbn = current_builtin_name; |
@@ -2467,7 +2475,11 @@ | ||
2467 | 2475 | msgfmt = humanfriendly ? gt("%s: an elective built-in\n") : "%s\n"; |
2468 | 2476 | xprintf(msgfmt, name); |
2469 | 2477 | break; |
2470 | - case CT_REGULARBUILTIN:; | |
2478 | + case CT_EXTENSIONBUILTIN: | |
2479 | + msgfmt = humanfriendly ? gt("%s: an extension built-in\n") : "%s\n"; | |
2480 | + xprintf(msgfmt, name); | |
2481 | + break; | |
2482 | + case CT_SUBSTITUTIVEBUILTIN:; | |
2471 | 2483 | const char *cmdpath; |
2472 | 2484 | if (type & SCT_STDPATH) |
2473 | 2485 | cmdpath = get_command_path_default(name); |
@@ -2475,8 +2487,8 @@ | ||
2475 | 2487 | cmdpath = get_command_path(name, false); |
2476 | 2488 | if (humanfriendly) { |
2477 | 2489 | msgfmt = (cmdpath == NULL) |
2478 | - ? Ngt("%s: a regular built-in (not found in $PATH)\n") | |
2479 | - : Ngt("%s: a regular built-in at %s\n"); | |
2490 | + ? Ngt("%s: a substitutive built-in (not found in $PATH)\n") | |
2491 | + : Ngt("%s: a substitutive built-in for %s\n"); | |
2480 | 2492 | xprintf(gt(msgfmt), name, cmdpath); |
2481 | 2493 | } else { |
2482 | 2494 | xprintf("%s\n", (cmdpath == NULL) ? name : cmdpath); |
@@ -1376,6 +1376,7 @@ | ||
1376 | 1376 | { L'-', L"dirstack-index", OPTARG_NONE, true, NULL, }, |
1377 | 1377 | { L'-', L"elective-builtin", OPTARG_NONE, true, NULL, }, |
1378 | 1378 | { L'-', L"executable-file", OPTARG_NONE, true, NULL, }, |
1379 | + { L'-', L"extension-builtin", OPTARG_NONE, true, NULL, }, | |
1379 | 1380 | { L'-', L"external-command", OPTARG_NONE, true, NULL, }, |
1380 | 1381 | { L'f', L"file", OPTARG_NONE, true, NULL, }, |
1381 | 1382 | { L'-', L"finished-job", OPTARG_NONE, true, NULL, }, |
@@ -1401,6 +1402,7 @@ | ||
1401 | 1402 | { L'-', L"signal", OPTARG_NONE, true, NULL, }, |
1402 | 1403 | { L'-', L"special-builtin", OPTARG_NONE, true, NULL, }, |
1403 | 1404 | { L'-', L"stopped-job", OPTARG_NONE, true, NULL, }, |
1405 | + { L'-', L"substitutive-builtin", OPTARG_NONE, true, NULL, }, | |
1404 | 1406 | { L'S', L"suffix", OPTARG_REQUIRED, true, NULL, }, |
1405 | 1407 | { L'u', L"username", OPTARG_NONE, true, NULL, }, |
1406 | 1408 | { L'v', L"variable", OPTARG_NONE, true, NULL, }, |
@@ -1473,7 +1475,15 @@ | ||
1473 | 1475 | case L'x': |
1474 | 1476 | switch (opt->longopt[2]) { |
1475 | 1477 | case L'e': cgtype |= CGT_EXECUTABLE; break; |
1476 | - case L't': cgtype |= CGT_EXTCOMMAND; break; | |
1478 | + case L't': | |
1479 | + assert(opt->longopt[3] == L'e'); | |
1480 | + switch (opt->longopt[4]) { | |
1481 | + case L'n': | |
1482 | + cgtype |= CGT_XBUILTIN; break; | |
1483 | + case L'r': | |
1484 | + cgtype |= CGT_EXTCOMMAND; break; | |
1485 | + } | |
1486 | + break; | |
1477 | 1487 | default: assert(false); |
1478 | 1488 | } |
1479 | 1489 | break; |
@@ -1497,7 +1507,9 @@ | ||
1497 | 1507 | case L'n': cgtype |= CGT_NALIAS; break; |
1498 | 1508 | case L'r': |
1499 | 1509 | switch (opt->longopt[1]) { |
1500 | - case L'e': cgtype |= CGT_RBUILTIN; break; | |
1510 | + case L'e': | |
1511 | + cgtype |= CGT_XBUILTIN | CGT_UBUILTIN; | |
1512 | + break; | |
1501 | 1513 | case L'u': cgtype |= CGT_RUNNING; break; |
1502 | 1514 | default: assert(false); |
1503 | 1515 | } |
@@ -1511,6 +1523,7 @@ | ||
1511 | 1523 | case L'i': cgtype |= CGT_SIGNAL; break; |
1512 | 1524 | case L'p': cgtype |= CGT_SBUILTIN; break; |
1513 | 1525 | case L't': cgtype |= CGT_STOPPED; break; |
1526 | + case L'u': cgtype |= CGT_UBUILTIN; break; | |
1514 | 1527 | default: assert(false); |
1515 | 1528 | } |
1516 | 1529 | break; |
@@ -134,28 +134,30 @@ | ||
134 | 134 | CGT_SBUILTIN = 1 << 3, // special builtin |
135 | 135 | CGT_MBUILTIN = 1 << 4, // mandatory builtin |
136 | 136 | CGT_LBUILTIN = 1 << 5, // elective builtin |
137 | - CGT_RBUILTIN = 1 << 6, // regular builtin | |
138 | - CGT_BUILTIN = CGT_SBUILTIN | CGT_MBUILTIN | CGT_LBUILTIN | CGT_RBUILTIN, | |
139 | - CGT_EXTCOMMAND = 1 << 7, // external command | |
140 | - CGT_FUNCTION = 1 << 8, // function | |
137 | + CGT_XBUILTIN = 1 << 6, // extension builtin | |
138 | + CGT_UBUILTIN = 1 << 7, // substitutive builtin | |
139 | + CGT_BUILTIN = CGT_SBUILTIN | CGT_MBUILTIN | CGT_LBUILTIN | CGT_XBUILTIN | | |
140 | + CGT_UBUILTIN, | |
141 | + CGT_EXTCOMMAND = 1 << 8, // external command | |
142 | + CGT_FUNCTION = 1 << 9, // function | |
141 | 143 | CGT_COMMAND = CGT_BUILTIN | CGT_EXTCOMMAND | CGT_FUNCTION, |
142 | - CGT_KEYWORD = 1 << 9, // shell keyword | |
143 | - CGT_NALIAS = 1 << 10, // non-global alias | |
144 | - CGT_GALIAS = 1 << 11, // global alias | |
144 | + CGT_KEYWORD = 1 << 10, // shell keyword | |
145 | + CGT_NALIAS = 1 << 11, // non-global alias | |
146 | + CGT_GALIAS = 1 << 12, // global alias | |
145 | 147 | CGT_ALIAS = CGT_NALIAS | CGT_GALIAS, |
146 | - CGT_SCALAR = 1 << 12, // scalar variable | |
147 | - CGT_ARRAY = 1 << 13, // array variable | |
148 | + CGT_SCALAR = 1 << 13, // scalar variable | |
149 | + CGT_ARRAY = 1 << 14, // array variable | |
148 | 150 | CGT_VARIABLE = CGT_SCALAR | CGT_ARRAY, |
149 | - CGT_RUNNING = 1 << 14, // running job | |
150 | - CGT_STOPPED = 1 << 15, // stopped job | |
151 | - CGT_DONE = 1 << 16, // finished job | |
151 | + CGT_RUNNING = 1 << 15, // running job | |
152 | + CGT_STOPPED = 1 << 16, // stopped job | |
153 | + CGT_DONE = 1 << 17, // finished job | |
152 | 154 | CGT_JOB = CGT_RUNNING | CGT_STOPPED | CGT_DONE, |
153 | - CGT_SIGNAL = 1 << 17, // signal name | |
154 | - CGT_LOGNAME = 1 << 18, // login user name | |
155 | - CGT_GROUP = 1 << 19, // group name | |
156 | - CGT_HOSTNAME = 1 << 20, // host name | |
157 | - CGT_BINDKEY = 1 << 21, // line-editing command name | |
158 | - CGT_DIRSTACK = 1 << 22, // directory stack entry | |
155 | + CGT_SIGNAL = 1 << 18, // signal name | |
156 | + CGT_LOGNAME = 1 << 19, // login user name | |
157 | + CGT_GROUP = 1 << 20, // group name | |
158 | + CGT_HOSTNAME = 1 << 21, // host name | |
159 | + CGT_BINDKEY = 1 << 22, // line-editing command name | |
160 | + CGT_DIRSTACK = 1 << 23, // directory stack entry | |
159 | 161 | } le_candgentype_T; |
160 | 162 | typedef struct le_comppattern_T { |
161 | 163 | struct le_comppattern_T *next; |
@@ -8,8 +8,8 @@ | ||
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: yash 2.54\n" |
10 | 10 | "Report-Msgid-Bugs-To: http://osdn.jp/projects/yash/forums/\n" |
11 | -"POT-Creation-Date: 2022-09-26 14:34+0900\n" | |
12 | -"PO-Revision-Date: 2022-09-26 14:38+0900\n" | |
11 | +"POT-Creation-Date: 2022-09-27 00:48+0900\n" | |
12 | +"PO-Revision-Date: 2022-09-27 23:31+0900\n" | |
13 | 13 | "Last-Translator: WATANABE Yuki <magicant@users.osdn.me>\n" |
14 | 14 | "Language-Team: Japanese\n" |
15 | 15 | "Language: ja\n" |
@@ -119,12 +119,12 @@ | ||
119 | 119 | msgid "arithmetic: `%lc' is not a valid number or operator" |
120 | 120 | msgstr "数式展開:「%lc」は有効な数値や演算子ではありません" |
121 | 121 | |
122 | -#: builtin.c:249 | |
122 | +#: builtin.c:252 | |
123 | 123 | #, c-format |
124 | 124 | msgid "the -%lc option cannot be used with the -%lc option" |
125 | 125 | msgstr "-%lc オプションは -%lc オプションとは一緒に使えません" |
126 | 126 | |
127 | -#: builtin.c:275 | |
127 | +#: builtin.c:278 | |
128 | 128 | #, c-format |
129 | 129 | msgid "this command requires an operand" |
130 | 130 | msgid_plural "this command requires %zu operands" |
@@ -132,27 +132,27 @@ | ||
132 | 132 | |
133 | 133 | #. TRANSLATORS: This message is printed when a command that takes no |
134 | 134 | #. * operand was invoked with some operands. |
135 | -#: builtin.c:288 | |
135 | +#: builtin.c:291 | |
136 | 136 | msgid "no operand is expected" |
137 | 137 | msgstr "このコマンドはオペランドを受け付けません" |
138 | 138 | |
139 | 139 | #. TRANSLATORS: This message is printed when a command was invoked with |
140 | 140 | #. * the wrong number of operands. |
141 | -#: builtin.c:292 | |
141 | +#: builtin.c:295 | |
142 | 142 | msgid "too many operands are specified" |
143 | 143 | msgstr "オペランドの数が多すぎます" |
144 | 144 | |
145 | -#: builtin.c:344 yash.c:391 | |
145 | +#: builtin.c:347 yash.c:391 | |
146 | 146 | msgid "Try `man yash' for details.\n" |
147 | 147 | msgstr "詳しくは: man yash\n" |
148 | 148 | |
149 | -#: builtin.c:359 | |
149 | +#: builtin.c:362 | |
150 | 150 | #, c-format |
151 | 151 | msgid "no such built-in `%ls'" |
152 | 152 | msgstr "「%ls」というような組込みコマンドはありません" |
153 | 153 | |
154 | 154 | #. TRANSLATORS: This is printed before syntax info of a built-in. |
155 | -#: builtin.c:367 | |
155 | +#: builtin.c:370 | |
156 | 156 | #, c-format |
157 | 157 | msgid "" |
158 | 158 | "Syntax:\n" |
@@ -162,39 +162,39 @@ | ||
162 | 162 | "%s\n" |
163 | 163 | |
164 | 164 | #. TRANSLATORS: This text is printed before a list of options. |
165 | -#: builtin.c:386 builtin.c:406 | |
165 | +#: builtin.c:389 builtin.c:409 | |
166 | 166 | msgid "Options:\n" |
167 | 167 | msgstr "オプション:\n" |
168 | 168 | |
169 | -#: builtin.c:546 | |
169 | +#: builtin.c:550 | |
170 | 170 | msgid "do nothing" |
171 | 171 | msgstr "何もしない" |
172 | 172 | |
173 | -#: builtin.c:549 | |
173 | +#: builtin.c:553 | |
174 | 174 | msgid "\t: [...]\n" |
175 | 175 | msgstr "\t: [...]\n" |
176 | 176 | |
177 | -#: builtin.c:553 | |
177 | +#: builtin.c:557 | |
178 | 178 | msgid "do nothing successfully" |
179 | 179 | msgstr "何もせず成功を返す" |
180 | 180 | |
181 | -#: builtin.c:556 | |
181 | +#: builtin.c:560 | |
182 | 182 | msgid "\ttrue\n" |
183 | 183 | msgstr "\ttrue\n" |
184 | 184 | |
185 | -#: builtin.c:560 | |
185 | +#: builtin.c:564 | |
186 | 186 | msgid "do nothing unsuccessfully" |
187 | 187 | msgstr "何もせず失敗を返す" |
188 | 188 | |
189 | -#: builtin.c:563 | |
189 | +#: builtin.c:567 | |
190 | 190 | msgid "\tfalse\n" |
191 | 191 | msgstr "\tfalse\n" |
192 | 192 | |
193 | -#: builtin.c:588 | |
193 | +#: builtin.c:592 | |
194 | 194 | msgid "print usage of built-in commands" |
195 | 195 | msgstr "組込みコマンドの使い方を表示する" |
196 | 196 | |
197 | -#: builtin.c:591 | |
197 | +#: builtin.c:595 | |
198 | 198 | msgid "\thelp [built-in...]\n" |
199 | 199 | msgstr "\thelp [組込みコマンド...]\n" |
200 | 200 |
@@ -235,7 +235,7 @@ | ||
235 | 235 | msgstr "「%ls」は有効な数値ではありません" |
236 | 236 | |
237 | 237 | #: builtins/printf.c:694 builtins/test.c:585 builtins/test.c:591 |
238 | -#: builtins/ulimit.c:229 exec.c:1863 exec.c:1936 history.c:1721 sig.c:1429 | |
238 | +#: builtins/ulimit.c:229 exec.c:1871 exec.c:1944 history.c:1721 sig.c:1429 | |
239 | 239 | #: variable.c:2137 variable.c:2197 variable.c:2236 variable.c:2420 yash.c:631 |
240 | 240 | #, c-format |
241 | 241 | msgid "`%ls' is not a valid integer" |
@@ -267,8 +267,8 @@ | ||
267 | 267 | msgid "`%ls' is not a unary operator" |
268 | 268 | msgstr "「%ls」は単項演算子ではありません" |
269 | 269 | |
270 | -#: builtins/test.c:188 builtins/test.c:656 builtins/test.c:664 exec.c:2072 | |
271 | -#: exec.c:2216 exec.c:2225 history.c:1499 lineedit/keymap.c:476 path.c:1274 | |
270 | +#: builtins/test.c:188 builtins/test.c:656 builtins/test.c:664 exec.c:2080 | |
271 | +#: exec.c:2224 exec.c:2233 history.c:1499 lineedit/keymap.c:476 path.c:1274 | |
272 | 272 | #: path.c:1341 strbuf.c:566 strbuf.c:589 |
273 | 273 | msgid "unexpected error" |
274 | 274 | msgstr "想定外のエラーです" |
@@ -389,77 +389,77 @@ | ||
389 | 389 | "\tulimit -a [-H|-S]\n" |
390 | 390 | "\tulimit [-H|-S] [-efilnqrstuvx] [制限]\n" |
391 | 391 | |
392 | -#: exec.c:612 | |
392 | +#: exec.c:613 | |
393 | 393 | msgid "cannot open a pipe" |
394 | 394 | msgstr "パイプを開けません" |
395 | 395 | |
396 | -#: exec.c:1014 exec.c:2240 exec.c:2453 | |
396 | +#: exec.c:1021 exec.c:2248 exec.c:2461 | |
397 | 397 | #, c-format |
398 | 398 | msgid "no such command `%s'" |
399 | 399 | msgstr "「%s」というようなコマンドはありません" |
400 | 400 | |
401 | -#: exec.c:1028 | |
401 | +#: exec.c:1035 | |
402 | 402 | #, c-format |
403 | 403 | msgid "%ls: non-portable built-in is not supported in the POSIXly-correct mode" |
404 | 404 | msgstr "%ls: POSIX 準拠モードでは使えません" |
405 | 405 | |
406 | -#: exec.c:1083 | |
406 | +#: exec.c:1091 | |
407 | 407 | #, c-format |
408 | 408 | msgid "cannot execute command `%s'" |
409 | 409 | msgstr "コマンド「%s」を実行できません" |
410 | 410 | |
411 | -#: exec.c:1084 | |
411 | +#: exec.c:1092 | |
412 | 412 | #, c-format |
413 | 413 | msgid "cannot execute command `%s' (%s)" |
414 | 414 | msgstr "コマンド「%s」(%s) を実行できません" |
415 | 415 | |
416 | -#: exec.c:1142 | |
416 | +#: exec.c:1150 | |
417 | 417 | #, c-format |
418 | 418 | msgid "cannot invoke a new shell to execute script `%s'" |
419 | 419 | msgstr "スクリプト「%s」を実行するための新しいシェルを起動できません" |
420 | 420 | |
421 | -#: exec.c:1492 | |
421 | +#: exec.c:1500 | |
422 | 422 | msgid "cannot make a child process" |
423 | 423 | msgstr "子プロセスを生成できません" |
424 | 424 | |
425 | -#: exec.c:1560 exec.c:1582 | |
425 | +#: exec.c:1568 exec.c:1590 | |
426 | 426 | msgid "cannot open a pipe for the command substitution" |
427 | 427 | msgstr "コマンド置換のためのパイプを開けません" |
428 | 428 | |
429 | -#: exec.c:1619 | |
429 | +#: exec.c:1627 | |
430 | 430 | msgid "command substitution" |
431 | 431 | msgstr "コマンド置換" |
432 | 432 | |
433 | -#: exec.c:1873 | |
433 | +#: exec.c:1881 | |
434 | 434 | msgid "cannot be used in the interactive mode" |
435 | 435 | msgstr "対話モードでは使えません" |
436 | 436 | |
437 | -#: exec.c:1883 | |
437 | +#: exec.c:1891 | |
438 | 438 | msgid "return from a function or script" |
439 | 439 | msgstr "関数やスクリプトから抜ける" |
440 | 440 | |
441 | -#: exec.c:1886 | |
441 | +#: exec.c:1894 | |
442 | 442 | msgid "\treturn [-n] [exit_status]\n" |
443 | 443 | msgstr "\treturn [-n] [終了ステータス]\n" |
444 | 444 | |
445 | -#: exec.c:1918 | |
445 | +#: exec.c:1926 | |
446 | 446 | msgid "not in an iteration" |
447 | 447 | msgstr "反復実行の途中ではありません" |
448 | 448 | |
449 | -#: exec.c:1939 | |
449 | +#: exec.c:1947 | |
450 | 450 | #, c-format |
451 | 451 | msgid "%u is not a positive integer" |
452 | 452 | msgstr "%u は正の整数ではありません" |
453 | 453 | |
454 | -#: exec.c:1949 | |
454 | +#: exec.c:1957 | |
455 | 455 | msgid "not in a loop" |
456 | 456 | msgstr "ループの途中ではありません" |
457 | 457 | |
458 | -#: exec.c:1968 | |
458 | +#: exec.c:1976 | |
459 | 459 | msgid "exit a loop" |
460 | 460 | msgstr "ループを抜ける" |
461 | 461 | |
462 | -#: exec.c:1971 | |
462 | +#: exec.c:1979 | |
463 | 463 | msgid "" |
464 | 464 | "\tbreak [count]\n" |
465 | 465 | "\tbreak -i\n" |
@@ -467,11 +467,11 @@ | ||
467 | 467 | "\tbreak [深さ]\n" |
468 | 468 | "\tbreak -i\n" |
469 | 469 | |
470 | -#: exec.c:1976 | |
470 | +#: exec.c:1984 | |
471 | 471 | msgid "continue a loop" |
472 | 472 | msgstr "ループの先頭に戻る" |
473 | 473 | |
474 | -#: exec.c:1979 | |
474 | +#: exec.c:1987 | |
475 | 475 | msgid "" |
476 | 476 | "\tcontinue [count]\n" |
477 | 477 | "\tcontinue -i\n" |
@@ -479,104 +479,109 @@ | ||
479 | 479 | "\tcontinue [深さ]\n" |
480 | 480 | "\tcontinue -i\n" |
481 | 481 | |
482 | -#: exec.c:2019 | |
482 | +#: exec.c:2027 | |
483 | 483 | msgid "evaluate arguments as a command" |
484 | 484 | msgstr "引数をコマンドとして実行する" |
485 | 485 | |
486 | -#: exec.c:2022 | |
486 | +#: exec.c:2030 | |
487 | 487 | msgid "\teval [-i] [argument...]\n" |
488 | 488 | msgstr "\teval [-i] [引数...]\n" |
489 | 489 | |
490 | -#: exec.c:2081 | |
490 | +#: exec.c:2089 | |
491 | 491 | #, c-format |
492 | 492 | msgid "file `%s' was not found in $YASH_LOADPATH" |
493 | 493 | msgstr "ファイル「%s」は $YASH_LOADPATH 内に見つかりませんでした" |
494 | 494 | |
495 | -#: exec.c:2091 | |
495 | +#: exec.c:2099 | |
496 | 496 | #, c-format |
497 | 497 | msgid "file `%s' was not found in $PATH" |
498 | 498 | msgstr "ファイル「%s」は $PATH 内に見つかりませんでした" |
499 | 499 | |
500 | -#: exec.c:2103 redir.c:276 yash.c:206 | |
500 | +#: exec.c:2111 redir.c:276 yash.c:206 | |
501 | 501 | #, c-format |
502 | 502 | msgid "cannot open file `%s'" |
503 | 503 | msgstr "ファイル「%s」を開けません" |
504 | 504 | |
505 | -#: exec.c:2142 | |
505 | +#: exec.c:2150 | |
506 | 506 | msgid "read a file and execute commands" |
507 | 507 | msgstr "ファイルをスクリプトとして実行する" |
508 | 508 | |
509 | -#: exec.c:2145 | |
509 | +#: exec.c:2153 | |
510 | 510 | msgid "\t. [-AL] file [argument...]\n" |
511 | 511 | msgstr "\t. [-AL] ファイル [引数...]\n" |
512 | 512 | |
513 | -#: exec.c:2193 yash.c:618 | |
513 | +#: exec.c:2201 yash.c:618 | |
514 | 514 | #, c-format |
515 | 515 | msgid "You have a stopped job!" |
516 | 516 | msgid_plural "You have %zu stopped jobs!" |
517 | 517 | msgstr[0] "停止中のジョブが %zu 個あります!" |
518 | 518 | |
519 | -#: exec.c:2197 | |
519 | +#: exec.c:2205 | |
520 | 520 | msgid " Use the -f option to exec anyway.\n" |
521 | 521 | msgstr " それでも exec するには -f オプションを付けてください。\n" |
522 | 522 | |
523 | -#: exec.c:2287 | |
523 | +#: exec.c:2295 | |
524 | 524 | msgid "replace the shell process with an external command" |
525 | 525 | msgstr "シェルのプロセスを外部コマンドに変える" |
526 | 526 | |
527 | -#: exec.c:2290 | |
527 | +#: exec.c:2298 | |
528 | 528 | msgid "\texec [-cf] [-a name] [command [argument...]]\n" |
529 | 529 | msgstr "\texec [-cf] [-a 名前] [コマンド [引数...]]\n" |
530 | 530 | |
531 | -#: exec.c:2350 | |
531 | +#: exec.c:2358 | |
532 | 532 | msgid "the -a or -k option must be used with the -v option" |
533 | 533 | msgstr "-a および -k オプションは -v オプションと一緒にしか使えません" |
534 | 534 | |
535 | -#: exec.c:2430 | |
535 | +#: exec.c:2438 | |
536 | 536 | #, c-format |
537 | 537 | msgid "%ls: a shell keyword\n" |
538 | 538 | msgstr "%ls: シェルの予約語\n" |
539 | 539 | |
540 | -#: exec.c:2459 | |
540 | +#: exec.c:2467 | |
541 | 541 | #, c-format |
542 | 542 | msgid "%s: a special built-in\n" |
543 | 543 | msgstr "%s: 特殊組込みコマンド\n" |
544 | 544 | |
545 | -#: exec.c:2463 | |
545 | +#: exec.c:2471 | |
546 | 546 | #, c-format |
547 | 547 | msgid "%s: a mandatory built-in\n" |
548 | 548 | msgstr "%s: 必須組込みコマンド\n" |
549 | 549 | |
550 | -#: exec.c:2467 | |
550 | +#: exec.c:2475 | |
551 | 551 | #, c-format |
552 | 552 | msgid "%s: an elective built-in\n" |
553 | 553 | msgstr "%s: 任意組込みコマンド\n" |
554 | 554 | |
555 | -#: exec.c:2478 | |
555 | +#: exec.c:2479 | |
556 | 556 | #, c-format |
557 | -msgid "%s: a regular built-in (not found in $PATH)\n" | |
558 | -msgstr "%s: 通常の組込みコマンド ($PATH 内に存在せず)\n" | |
557 | +msgid "%s: an extension built-in\n" | |
558 | +msgstr "%s: 拡張組込みコマンド\n" | |
559 | 559 | |
560 | -#: exec.c:2479 | |
560 | +#: exec.c:2490 | |
561 | 561 | #, c-format |
562 | -msgid "%s: a regular built-in at %s\n" | |
563 | -msgstr "%s: 通常の組込みコマンド (%s)\n" | |
562 | +msgid "%s: a substitutive built-in (not found in $PATH)\n" | |
563 | +msgstr "%s: 代替組込みコマンド ($PATH 内に存在せず)\n" | |
564 | 564 | |
565 | -#: exec.c:2486 | |
565 | +#: exec.c:2491 | |
566 | 566 | #, c-format |
567 | +msgid "%s: a substitutive built-in for %s\n" | |
568 | +msgstr "%s: 代替組込みコマンド (%s)\n" | |
569 | + | |
570 | +#: exec.c:2498 | |
571 | +#, c-format | |
567 | 572 | msgid "%s: a function\n" |
568 | 573 | msgstr "%s: 関数\n" |
569 | 574 | |
570 | -#: exec.c:2536 | |
575 | +#: exec.c:2548 | |
571 | 576 | #, c-format |
572 | 577 | msgid "%s: an external command at %s\n" |
573 | 578 | msgstr "%s: 外部コマンド (%s)\n" |
574 | 579 | |
575 | -#: exec.c:2544 | |
580 | +#: exec.c:2556 | |
576 | 581 | msgid "execute or identify a command" |
577 | 582 | msgstr "コマンドを実行または特定する" |
578 | 583 | |
579 | -#: exec.c:2547 | |
584 | +#: exec.c:2559 | |
580 | 585 | msgid "" |
581 | 586 | "\tcommand [-befp] command [argument...]\n" |
582 | 587 | "\tcommand -v|-V [-abefkp] command...\n" |
@@ -584,23 +589,23 @@ | ||
584 | 589 | "\tcommand [-befp] コマンド [引数...]\n" |
585 | 590 | "\tcommand -v|-V [-abefkp] コマンド...\n" |
586 | 591 | |
587 | -#: exec.c:2552 | |
592 | +#: exec.c:2564 | |
588 | 593 | msgid "identify a command" |
589 | 594 | msgstr "コマンドを特定する" |
590 | 595 | |
591 | -#: exec.c:2555 | |
596 | +#: exec.c:2567 | |
592 | 597 | msgid "\ttype command...\n" |
593 | 598 | msgstr "\ttype コマンド...\n" |
594 | 599 | |
595 | -#: exec.c:2593 | |
600 | +#: exec.c:2605 | |
596 | 601 | msgid "cannot get the time data" |
597 | 602 | msgstr "時間情報を取得できません" |
598 | 603 | |
599 | -#: exec.c:2610 | |
604 | +#: exec.c:2622 | |
600 | 605 | msgid "print CPU time usage" |
601 | 606 | msgstr "消費 CPU 時間を表示する" |
602 | 607 | |
603 | -#: exec.c:2613 | |
608 | +#: exec.c:2625 | |
604 | 609 | msgid "\ttimes\n" |
605 | 610 | msgstr "\ttimes\n" |
606 | 611 |
@@ -890,25 +895,25 @@ | ||
890 | 895 | "\tdisown [ジョブ...]\n" |
891 | 896 | "\tdisown -a\n" |
892 | 897 | |
893 | -#: lineedit/complete.c:1522 | |
898 | +#: lineedit/complete.c:1535 | |
894 | 899 | #, c-format |
895 | 900 | msgid "more than one -%lc option is specified" |
896 | 901 | msgstr "-%lc が二回以上指定されています" |
897 | 902 | |
898 | -#: lineedit/complete.c:1534 | |
903 | +#: lineedit/complete.c:1547 | |
899 | 904 | msgid "the complete built-in can be used during command line completion only" |
900 | 905 | msgstr "complete 組込みコマンドはコマンドライン補完の最中にしか使えません" |
901 | 906 | |
902 | -#: lineedit/complete.c:1547 | |
907 | +#: lineedit/complete.c:1560 | |
903 | 908 | #, c-format |
904 | 909 | msgid "the specified prefix `%ls' does not match the target word `%ls'" |
905 | 910 | msgstr "指定された接頭辞「%ls」は補完対象「%ls」に適合しません" |
906 | 911 | |
907 | -#: lineedit/complete.c:1595 | |
912 | +#: lineedit/complete.c:1608 | |
908 | 913 | msgid "generate completion candidates" |
909 | 914 | msgstr "補完候補を生成する" |
910 | 915 | |
911 | -#: lineedit/complete.c:1598 | |
916 | +#: lineedit/complete.c:1611 | |
912 | 917 | msgid "" |
913 | 918 | "\tcomplete [-A pattern] [-R pattern] [-T] [-P prefix] [-S suffix] \\\n" |
914 | 919 | "\t [-abcdfghjkuv] [[-O] [-D description] words...]\n" |