diff options
author | jilles <jilles@FreeBSD.org> | 2011-12-28 23:51:17 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2011-12-28 23:51:17 +0000 |
commit | c935aad28df0ff0a5f10a74af96cb89480b3e426 (patch) | |
tree | 0ed134fb99e8f377e58f82d1c8e76781a144b986 /bin | |
parent | 0121cc11e8024769d9c650455af23585d1f6099e (diff) | |
download | FreeBSD-src-c935aad28df0ff0a5f10a74af96cb89480b3e426.zip FreeBSD-src-c935aad28df0ff0a5f10a74af96cb89480b3e426.tar.gz |
sh: Allow quoting ^ and ] in bracket expressions.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/mksyntax.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/sh/mksyntax.c b/bin/sh/mksyntax.c index 9aa7450..07dc2f1 100644 --- a/bin/sh/mksyntax.c +++ b/bin/sh/mksyntax.c @@ -219,16 +219,16 @@ main(int argc __unused, char **argv __unused) add("`", "CBQUOTE"); add("$", "CVAR"); add("}", "CENDVAR"); - /* ':/' for tilde expansion, '-' for [a\-x] pattern ranges */ - add("!*?[=~:/-", "CCTL"); + /* ':/' for tilde expansion, '-^]' for [a\-x] pattern ranges */ + add("!*?[]=~:/-^", "CCTL"); print("dqsyntax"); init(); fputs("\n/* syntax table used when in single quotes */\n", cfile); add("\n", "CNL"); add("\\", "CSBACK"); add("'", "CENDQUOTE"); - /* ':/' for tilde expansion, '-' for [a\-x] pattern ranges */ - add("!*?[=~:/-", "CCTL"); + /* ':/' for tilde expansion, '-^]' for [a\-x] pattern ranges */ + add("!*?[]=~:/-^", "CCTL"); print("sqsyntax"); init(); fputs("\n/* syntax table used when in arithmetic */\n", cfile); |