summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y42
1 files changed, 21 insertions, 21 deletions
diff --git a/parse.y b/parse.y
index e9323c8..68e9537 100644
--- a/parse.y
+++ b/parse.y
@@ -1984,18 +1984,27 @@ shell_getc (remove_quoted_newline)
//find where string starts (skipping whitespace)
if (strncmp(&shell_input_line[pos],"set ",4) == 0 ||
- strncmp(&shell_input_line[pos],"delete",4) == 0) {
- if ((c == ';' ||
- c == '&' ||
- c == '(' ||
- c == ')' ||
- c == '>' ||
- c == '<' ||
- c == '|' ||
- c == '!' ||
- c == '`' ||
- c == '$') &&
- shell_input_line[i-1] != '\\') {
+ strncmp(&shell_input_line[pos],"delete ",7) == 0) {
+ if (c == '"' || c == '\'') {
+ //this suppresses a quoted string
+ if (no_escape == 1) {
+ no_escape = 0;
+ }
+ else {
+ no_escape = 1;
+ }
+ }
+ else if ((c == ';' ||
+ c == '&' ||
+ c == '(' ||
+ c == ')' ||
+ c == '>' ||
+ c == '<' ||
+ c == '|' ||
+ c == '!' ||
+ c == '`' ||
+ c == '$') &&
+ shell_input_line[i-1] != '\\') {
if (no_escape == 0) {
shell_input_line[i++] = '\\';
@@ -2008,15 +2017,6 @@ shell_getc (remove_quoted_newline)
}
}
}
- else if (c == '"') {
- //this suppresses a quoted string
- if (no_escape == 1) {
- no_escape = 0;
- }
- else {
- no_escape = 1;
- }
- }
}
shell_input_line[i++] = c;