summaryrefslogtreecommitdiff
path: root/bashline.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2018-12-20 11:41:58 -0500
committerChet Ramey <chet.ramey@case.edu>2018-12-20 11:41:58 -0500
commitf250956cb2a8dca13fc0242affc225f9d6983604 (patch)
tree2df8e15963af786dc8efed1c91c4d823a3bf05bb /bashline.c
parent2ae59c1134a75d5778997b7202b15b0586283042 (diff)
downloadbash-5.0-testing.tar.gz
bash-5.0-rc1 releasebash-5.0-rc1bash-5.0-testing
Diffstat (limited to 'bashline.c')
-rw-r--r--bashline.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bashline.c b/bashline.c
index d56cd79d..2846aabf 100644
--- a/bashline.c
+++ b/bashline.c
@@ -1583,7 +1583,8 @@ attempt_shell_completion (text, start, end)
/* command completion if programmable completion fails */
/* If we have a completion for the initial word, we can prefer that */
in_command_position = s == start && (iw_compspec || STREQ (n, text)); /* XXX */
- foundcs = foundcs && (iw_compspec == 0);
+ if (iw_compspec && in_command_position)
+ foundcs = 0;
}
/* empty command name following command separator */
else if (s >= e && n[0] == '\0' && text[0] == '\0' && start > 0 &&