aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-08-14 11:04:58 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2018-08-14 11:04:58 +0200
commitc97df2939ec82bdc36586897e02416f935e89519 (patch)
treea70016313aa61431c3f469dcac6b6533587a371f
parent4bf08542480fe6271692cc9359f9747e9d727a79 (diff)
downloadbusybox-w32-c97df2939ec82bdc36586897e02416f935e89519.tar.gz
busybox-w32-c97df2939ec82bdc36586897e02416f935e89519.tar.bz2
busybox-w32-c97df2939ec82bdc36586897e02416f935e89519.zip
hush: tweak comment, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/hush.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 4b46752a3..881331c5b 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -3162,7 +3162,7 @@ static int o_get_last_ptr(o_string *o, int n)
3162 * code for partially-quoted strings. 3162 * code for partially-quoted strings.
3163 * 3163 *
3164 * Unfortunately, if we want to match bash and ash behavior in all cases, 3164 * Unfortunately, if we want to match bash and ash behavior in all cases,
3165 * the logic can't be see as "shell-syntax argument is first transformed 3165 * the logic can't be "shell-syntax argument is first transformed
3166 * to a string, then globbed, and if globbing does not match anything, 3166 * to a string, then globbed, and if globbing does not match anything,
3167 * it is used verbatim". Here are two examples where it fails: 3167 * it is used verbatim". Here are two examples where it fails:
3168 * 3168 *
@@ -3171,14 +3171,14 @@ static int o_get_last_ptr(o_string *o, int n)
3171 * The globbing can't be avoided (because of '?' at the end). 3171 * The globbing can't be avoided (because of '?' at the end).
3172 * The glob pattern is: b\\\*? - IOW, both \ and * are literals 3172 * The glob pattern is: b\\\*? - IOW, both \ and * are literals
3173 * and are glob-escaped. If this does not match, bash/ash print b\*? 3173 * and are glob-escaped. If this does not match, bash/ash print b\*?
3174 * - IOW: they "unbackslash" the pattern. 3174 * - IOW: they "unbackslash" the glob pattern.
3175 * Now, look at this: 3175 * Now, look at this:
3176 * 3176 *
3177 * v='\\\*'; echo b$v? 3177 * v='\\\*'; echo b$v?
3178 * 3178 *
3179 * The glob pattern is the same here: b\\\*? - an unquoted $var expansion 3179 * The glob pattern is the same here: b\\\*? - the unquoted $v expansion
3180 * should be used as glob pattern with no changes. However, if glob 3180 * should be used as glob pattern with no changes. However, if glob
3181 * does not match, bash/ash print b\\\*? - NOT THE SAME as 1st example! 3181 * does not match, bash/ash print b\\\*? - NOT THE SAME as first example!
3182 * 3182 *
3183 * ash implements this by having an encoded representation of the word 3183 * ash implements this by having an encoded representation of the word
3184 * to glob, which IS NOT THE SAME as the glob pattern - it has more data. 3184 * to glob, which IS NOT THE SAME as the glob pattern - it has more data.