correct command-printing bug
This commit is contained in:
parent
6a8f21b2cc
commit
168518a993
@ -233,9 +233,9 @@ int yylex(void){
|
|||||||
if(nextis('[')){
|
if(nextis('[')){
|
||||||
*w++='[';
|
*w++='[';
|
||||||
c=advance();
|
c=advance();
|
||||||
*w++=c;
|
|
||||||
if(c<'0' || '9'<c){
|
if(c<'0' || '9'<c){
|
||||||
RedirErr:
|
RedirErr:
|
||||||
|
*w++ = c;
|
||||||
*w=0;
|
*w=0;
|
||||||
yyerror(t->type==PIPE?"pipe syntax"
|
yyerror(t->type==PIPE?"pipe syntax"
|
||||||
:"redirection syntax");
|
:"redirection syntax");
|
||||||
@ -266,6 +266,7 @@ int yylex(void){
|
|||||||
t->rtype=CLOSE;
|
t->rtype=CLOSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*w=0;
|
||||||
if(c!=']'
|
if(c!=']'
|
||||||
|| t->type==DUP && (t->rtype==HERE || t->rtype==APPEND))
|
|| t->type==DUP && (t->rtype==HERE || t->rtype==APPEND))
|
||||||
goto RedirErr;
|
goto RedirErr;
|
||||||
@ -320,3 +321,4 @@ int yylex(void){
|
|||||||
yylval.tree=t;
|
yylval.tree=t;
|
||||||
return t->type;
|
return t->type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user