do the IFS_QUOTE dance right; this finally fixes ""$@
This commit is contained in:
parent
2e4cd72899
commit
d09aca4175
15
eval.c
15
eval.c
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.169 2015/05/23 17:43:19 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.170 2015/07/06 17:45:33 tg Exp $");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* string expansion
|
* string expansion
|
||||||
@ -291,21 +291,14 @@ expand(
|
|||||||
c = *sp++;
|
c = *sp++;
|
||||||
break;
|
break;
|
||||||
case OQUOTE:
|
case OQUOTE:
|
||||||
switch (word) {
|
if (word != IFS_WORD)
|
||||||
case IFS_QUOTE:
|
|
||||||
/* """something */
|
|
||||||
word = IFS_WORD;
|
|
||||||
break;
|
|
||||||
case IFS_WORD:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
word = IFS_QUOTE;
|
word = IFS_QUOTE;
|
||||||
break;
|
|
||||||
}
|
|
||||||
tilde_ok = 0;
|
tilde_ok = 0;
|
||||||
quote = 1;
|
quote = 1;
|
||||||
continue;
|
continue;
|
||||||
case CQUOTE:
|
case CQUOTE:
|
||||||
|
if (word == IFS_QUOTE)
|
||||||
|
word = IFS_WORD;
|
||||||
quote = st->quotew;
|
quote = st->quotew;
|
||||||
continue;
|
continue;
|
||||||
case COMSUB:
|
case COMSUB:
|
||||||
|
Loading…
Reference in New Issue
Block a user