diff options
author | Chet Ramey <chet.ramey@case.edu> | 2015-08-13 15:38:31 -0400 |
---|---|---|
committer | Tom Powell <zifnab@zifnab06.net> | 2015-10-08 20:53:30 -0700 |
commit | 857afac0f64e6be71026c49215f16ba7ca5fef71 (patch) | |
tree | ebc80903f998da74eeacdf0738c571f43cdc01f3 /bashline.c | |
parent | 4d010329a43b9b008495459831a8702bbed566a6 (diff) | |
download | android_external_bash-857afac0f64e6be71026c49215f16ba7ca5fef71.tar.gz android_external_bash-857afac0f64e6be71026c49215f16ba7ca5fef71.tar.bz2 android_external_bash-857afac0f64e6be71026c49215f16ba7ca5fef71.zip |
Bash-4.3 patch 41
Change-Id: Idb9857dac265c724460d61857c0643815d96eb9d
Diffstat (limited to 'bashline.c')
-rw-r--r-- | bashline.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1468,10 +1468,23 @@ attempt_shell_completion (text, start, end) os = start; n = 0; + was_assignment = 0; s = find_cmd_start (os); e = find_cmd_end (end); do { + /* Don't read past the end of rl_line_buffer */ + if (s > rl_end) + { + s1 = s = e1; + break; + } + /* Or past point if point is within an assignment statement */ + else if (was_assignment && s > rl_point) + { + s1 = s = e1; + break; + } /* Skip over assignment statements preceding a command name. If we don't find a command name at all, we can perform command name completion. If we find a partial command name, we should perform |