diff options
author | Chet Ramey <chet.ramey@case.edu> | 2011-12-12 22:09:11 -0500 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2011-12-12 22:09:11 -0500 |
commit | e05be32def741aff2237e1bb5ba5494ceca12654 (patch) | |
tree | eac8a7b29b833b57355cd1ac2a48cc010cf64ba3 /bashline.c | |
parent | bf19c529dd3f03b0dfc500900484c2d9fa221e23 (diff) | |
download | bash-e05be32def741aff2237e1bb5ba5494ceca12654.tar.gz |
commit bash-20101025 snapshot
Diffstat (limited to 'bashline.c')
-rw-r--r-- | bashline.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -993,6 +993,20 @@ bash_forward_shellword (count, key) return 0; } + /* Are we in a quoted string? If we are, move to the end of the quoted + string and continue the outer loop. We only want quoted strings, not + backslash-escaped characters, but char_is_quoted doesn't + differentiate. */ + if (char_is_quoted (rl_line_buffer, p) && p > 0 && rl_line_buffer[p-1] != '\\') + { + do + ADVANCE_CHAR (rl_line_buffer, slen, p); + while (p < rl_end && char_is_quoted (rl_line_buffer, p)); + count--; + continue; + } + + /* Rest of code assumes we are not in a quoted string. */ /* Move forward until we hit a non-metacharacter. */ while (p < rl_end && (c = rl_line_buffer[p]) && WORDDELIM (c)) { |