summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorroot <root@eng-140.vyatta.com>2008-07-25 14:29:39 -0700
committerroot <root@eng-140.vyatta.com>2008-07-25 14:29:39 -0700
commit082b170efdb062ec735eafa5213dbeb18fd7ecaa (patch)
treef5b60fa2252ca493a0c377771b45ccbdab080d4e /parse.y
parent7ae3debfae6b542cb4778d179971e6b112faede4 (diff)
downloadvyatta-bash-082b170efdb062ec735eafa5213dbeb18fd7ecaa.tar.gz
vyatta-bash-082b170efdb062ec735eafa5213dbeb18fd7ecaa.zip
additional special characters to trap, added back free() after additional testing, removed generated files from project.
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y5
1 files changed, 4 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index dd2f337..f4e09ec 100644
--- a/parse.y
+++ b/parse.y
@@ -1983,6 +1983,8 @@ shell_getc (remove_quoted_newline)
c == ')' ||
c == '>' ||
c == '<' ||
+ c == '|' ||
+ c == '`' ||
c == '$') &&
shell_input_line[i-1] != '\\') {
if (no_escape == 0) {
@@ -2046,6 +2048,7 @@ shell_getc (remove_quoted_newline)
history_buf[history_index] = '\0';
expansions = pre_process_line (history_buf, 1, 1);
flag = expansions != history_buf;
+ free(history_buf);
}
else {
expansions = pre_process_line (shell_input_line, 1, 1);
@@ -2054,7 +2057,7 @@ shell_getc (remove_quoted_newline)
# if defined (BANG_HISTORY)
history_expansion_inhibited = old_hist;
# endif
- if (expansions != shell_input_line)
+ if (flag)
{
free (shell_input_line);
shell_input_line = expansions;