*** /fs2/chet/bash/bash-20180608/bashline.c 2018-06-08 14:58:14.000000000 -0400 --- bashline.c 2018-06-12 14:43:38.000000000 -0400 *************** *** 1593,1598 **** else if (s >= e && n[0] == '\0' && text[0] == '\0' && start > 0) { ! foundcs = 0; /* empty command name following assignments */ ! in_command_position = was_assignment; } else if (s == start && e == end && STREQ (n, text) && start > 0) --- 1593,1598 ---- else if (s >= e && n[0] == '\0' && text[0] == '\0' && start > 0) { ! foundcs = 0; /* empty command name following optional assignments */ ! in_command_position += was_assignment; } else if (s == start && e == end && STREQ (n, text) && start > 0) *************** *** 1606,1610 **** /* If we have defined a compspec for the initial (command) word, call it and process the results like any other programmable completion. */ ! if (in_command_position && foundcs == 0 && iw_compspec) prog_complete_matches = programmable_completions (INITIALWORD, text, s, e, &foundcs); --- 1606,1610 ---- /* If we have defined a compspec for the initial (command) word, call it and process the results like any other programmable completion. */ ! if (in_command_position && have_progcomps && foundcs == 0 && iw_compspec) prog_complete_matches = programmable_completions (INITIALWORD, text, s, e, &foundcs);