It's been a year the last time I consulted you.
371 // Skip strange symbols after quotation
372 while (*string && !isspace(*string))
373 string++;
Could you please tell me why you add this logic? Or would you give me some examples which have "strange symbols after quotation"? Thanks sincerely.
The reason I care about this question is that, these three lines make some xml files, more specifically, some test attributes(in PARAM tag) invalid. For example we have a command like this:
COMMAND name="acl"
PARAM name="type" ptype="ACL_TYPE" (ACL_TYPE is selected from l3, l3v6, etc.)
PARAM name="some_arg" test=' "${type}"!="l3" '
Behavior before the commit: can't input some_arg if type is l3 (which mean result of test is false). (Suppose type is l3, klish can parse the test string to ["l3", "!=", "l3"] correctly)
Behavior after the commit: can input some_arg even if type is l3 (which mean result of test is true). (Suppose type is l3, klish will parse the test string to ["l3"] incorrectly)
The way to make test attribute work again is adding blank space on both sides of unequal sign, e.g. test='"${type}" != "l3"'.
Related call chain is clish_shell_parse_pargv() -> line_test() -> lub_system_line_test() -> lub_argv_new() -> lub_argv_init() -> lub_string_wordcount() -> lub_string_nextword().
Wishing your reply! Best regards!