ksh/ksh93-read-dont-ignore-esc.dif
2012-06-06 12:18:05 +00:00

26 lines
603 B
Plaintext

--- src/cmd/ksh93/bltins/read.c
+++ src/cmd/ksh93/bltins/read.c 2012-06-04 09:58:53.848644056 +0200
@@ -570,7 +570,13 @@ int sh_readline(register Shell_t *shp,ch
case S_QUOTE:
c = shp->ifstable[*cp++];
inquote = !inquote;
- goto skip;
+ if(val)
+ {
+ stakputs(val);
+ use_stak = 1;
+ *val = 0;
+ }
+ continue;
case S_ESC:
/* process escape character */
if((c = shp->ifstable[*cp++]) == S_NL)
@@ -582,6 +588,7 @@ int sh_readline(register Shell_t *shp,ch
{
stakputs(val);
use_stak = 1;
+ was_escape = 1;
*val = 0;
}
continue;