7 Bug-Reported-by: jan.q.bruun-andersen@posten.se
8 Bug-Reference-ID: <BE156C6450189B4ABAF7381F0AD4724A0165674F@002exmbs002.ad.posten.se>
9 Bug-Reference-URL: http://mail.gnu.org/pipermail/bug-bash/2002-July/004789.html
13 In certain cases, Bash appends a space instead of a slash to a directory
14 name relative to the current directory when performing command name
15 completion. This affects partial completion of intermediate directory
20 *** ./bashline.c Tue May 7 15:52:42 2002
21 --- ./bashline.c Sat Aug 3 11:40:16 2002
27 + #define CMD_IS_DIR(x) (absolute_pathname(x) == 0 && *(x) != '~' && test_for_directory (x))
29 matches = rl_completion_matches (text, command_word_completion_function);
31 /* If we are attempting command completion and nothing matches, we
32 do not want readline to perform filename completion for us. We
35 if (matches == (char **)NULL)
36 rl_ignore_some_completions_function = bash_ignore_filenames;
37 ! else if (matches[1] == 0 && *matches[0] != '/')
38 /* Turn off rl_filename_completion_desired so readline doesn't
39 append a slash if there is a directory with the same name
41 if (matches == (char **)NULL)
42 rl_ignore_some_completions_function = bash_ignore_filenames;
43 ! else if (matches[1] == 0 && CMD_IS_DIR(matches[0]))
44 /* Turn off rl_filename_completion_desired so readline doesn't
45 append a slash if there is a directory with the same name
49 rl_filename_completion_desired = 0;
50 ! else if (matches[0] && matches[1] && STREQ (matches[0], matches[1]) && *matches[0] != '/')
51 /* There are multiple instances of the same match (duplicate
52 completions haven't yet been removed). In this case, all of
55 rl_filename_completion_desired = 0;
56 ! else if (matches[0] && matches[1] && STREQ (matches[0], matches[1]) && CMD_IS_DIR (matches[0]))
57 /* There are multiple instances of the same match (duplicate
58 completions haven't yet been removed). In this case, all of