[Bug 14216] lineedit: tab completion special char set seems wrong
bugzilla at busybox.net
bugzilla at busybox.net
Fri Sep 17 15:36:16 UTC 2021
https://bugs.busybox.net/show_bug.cgi?id=14216
Denys Vlasenko <vda.linux at googlemail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #1 from Denys Vlasenko <vda.linux at googlemail.com> ---
Fixed in git:
static const char *is_special_char(char c)
{
- return strchr(" `\"#$%^&*()=+{}[]:;'|\\<>", c);
+ // {: It's mandatory to escape { only if entire name is "{"
+ // (otherwise it's not special. Example: file named "{ "
+ // can be escaped simply as "{\ "; "{a" or "a{" need no escaping),
+ // or if shell supports brace expansion
+ // (ash doesn't, hush optionally does).
+ // (): unlike {, shell treats () specially even in contexts
+ // where they clearly are not valid (e.g. "echo )" is an error).
+ // #: needs escaping to not start a shell comment.
+ return strchr(" `'\"\\#$~?*[{()&;|<>", c);
+ // Used to also have %^=+}]: but not necessary to escape?
}
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list