aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 58da0a2a0..cfcc0b818 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -207,17 +207,17 @@
207#define IF_BASH_SUBSTR IF_ASH_BASH_COMPAT 207#define IF_BASH_SUBSTR IF_ASH_BASH_COMPAT
208/* BASH_TEST2: [[ EXPR ]] 208/* BASH_TEST2: [[ EXPR ]]
209 * Status of [[ support: 209 * Status of [[ support:
210 * We replace && and || with -a and -o 210 * && and || work as they should
211 * = is glob match operator, not equality operator: STR = GLOB
212 * (in GLOB, quoting is significant on char-by-char basis: a*cd"*")
213 * == same as =
214 * add =~ regex match operator: STR =~ REGEX
211 * TODO: 215 * TODO:
212 * singleword+noglob expansion: 216 * singleword+noglob expansion:
213 * v='a b'; [[ $v = 'a b' ]]; echo 0:$? 217 * v='a b'; [[ $v = 'a b' ]]; echo 0:$?
214 * [[ /bin/n* ]]; echo 0:$? 218 * [[ /bin/n* ]]; echo 0:$?
215 * -a/-o are not AND/OR ops! (they are just strings)
216 * quoting needs to be considered (-f is an operator, "-f" and ""-f are not; etc) 219 * quoting needs to be considered (-f is an operator, "-f" and ""-f are not; etc)
217 * = is glob match operator, not equality operator: STR = GLOB 220 * ( ) < > should not have special meaning
218 * (in GLOB, quoting is significant on char-by-char basis: a*cd"*")
219 * == same as =
220 * add =~ regex match operator: STR =~ REGEX
221 */ 221 */
222#define BASH_TEST2 (ENABLE_ASH_BASH_COMPAT * ENABLE_ASH_TEST) 222#define BASH_TEST2 (ENABLE_ASH_BASH_COMPAT * ENABLE_ASH_TEST)
223#define BASH_SOURCE ENABLE_ASH_BASH_COMPAT 223#define BASH_SOURCE ENABLE_ASH_BASH_COMPAT
@@ -11823,7 +11823,8 @@ simplecmd(void)
11823 tokpushback = 1; 11823 tokpushback = 1;
11824 goto out; 11824 goto out;
11825 } 11825 }
11826 wordtext = (char *) (t == TAND ? "-a" : "-o"); 11826 /* pass "&&" or "||" to [[ ]] as literal args */
11827 wordtext = (char *) (t == TAND ? "&&" : "||");
11827#endif 11828#endif
11828 case TWORD: 11829 case TWORD:
11829 n = stzalloc(sizeof(struct narg)); 11830 n = stzalloc(sizeof(struct narg));