diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-06-14 19:42:12 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-06-14 19:42:12 +0200 |
commit | 82a6fb3ea6b49bcf1ef21ab589179ee2d6ffdc09 (patch) | |
tree | eb8ffd6fcf3a111f5392ecb47a6ad45401ae6d82 /shell/hush.c | |
parent | 2441060bebec2d65c9d106335223f37ec6e8ea5b (diff) | |
download | busybox-w32-82a6fb3ea6b49bcf1ef21ab589179ee2d6ffdc09.tar.gz busybox-w32-82a6fb3ea6b49bcf1ef21ab589179ee2d6ffdc09.tar.bz2 busybox-w32-82a6fb3ea6b49bcf1ef21ab589179ee2d6ffdc09.zip |
ash: fix . builtin
Also, move [[ ]] comment to test.c and expand it
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush.c')
-rw-r--r-- | shell/hush.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/shell/hush.c b/shell/hush.c index 245fb586d..fe05e4715 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -311,22 +311,9 @@ struct command { | |||
311 | #if ENABLE_HUSH_BASH_COMPAT | 311 | #if ENABLE_HUSH_BASH_COMPAT |
312 | # define CMD_SINGLEWORD_NOGLOB 2 | 312 | # define CMD_SINGLEWORD_NOGLOB 2 |
313 | #endif | 313 | #endif |
314 | // Basically, word splitting and pathname expansion should NOT be performed | ||
315 | // Examples: | ||
316 | // no word splitting: a="a b"; [[ $a = "a b" ]]; echo $? should print "0" | ||
317 | // no pathname expansion: [[ /bin/m* = "/bin/m*" ]]; echo $? should print "0" | ||
318 | // Additional operators: | ||
319 | // || and && should work as -o and -a | ||
320 | // =~ regexp match | ||
321 | // == should do _pattern match_ against right side. bash does this: | ||
322 | // # [[ *a* == bab ]] && echo YES | ||
323 | // # [[ bab == *a* ]] && echo YES | ||
324 | // YES | ||
325 | // != does the negated == (i.e., also with pattern matching) | ||
326 | // Apart from the above, [[ expr ]] should work as [ expr ] | ||
327 | 314 | ||
328 | /* used for "export noglob=* glob* a=`echo a b`" */ | 315 | /* used for "export noglob=* glob* a=`echo a b`" */ |
329 | /*#define CMD_SINGLEWORD_NOGLOB_COND 3 */ | 316 | //#define CMD_SINGLEWORD_NOGLOB_COND 3 |
330 | // It is hard to implement correctly, it adds significant amounts of tricky code, | 317 | // It is hard to implement correctly, it adds significant amounts of tricky code, |
331 | // and all this is only useful for really obscure export statements | 318 | // and all this is only useful for really obscure export statements |
332 | // almost nobody would use anyway. #ifdef CMD_SINGLEWORD_NOGLOB_COND | 319 | // almost nobody would use anyway. #ifdef CMD_SINGLEWORD_NOGLOB_COND |