nsh/nsh_parse: Fix handling of back-quotes
The logic that handles back-quotes was faulty, i.e. example command set FOO `ls -l` would be split into two tokens as follows: - set FOO `ls - -l` This results in nsh: `: no matching ` error, this fixes that issue.
This commit is contained in:
parent
700b0ed235
commit
4ce809e7d4
@ -1826,7 +1826,13 @@ static FAR char *nsh_argument(FAR struct nsh_vtbl_s *vtbl,
|
||||
|
||||
/* Is it a back-quote ? These are not removed here */
|
||||
|
||||
if (*pend != '`')
|
||||
if (*pend == '`')
|
||||
{
|
||||
/* Yes, keep the quotes in place */
|
||||
|
||||
pend = qend;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* No, get rid of the single / double quotes here */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user