]>
Commit | Line | Data |
---|---|---|
ca3cd23c | 1 | BASH PATCH REPORT |
2 | ================= | |
3 | ||
4 | Bash-Release: 2.05b | |
5 | Patch-ID: bash205b-003 | |
6 | ||
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 | |
10 | ||
11 | Bug-Description: | |
12 | ||
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 | |
16 | names. | |
17 | ||
18 | Patch: | |
19 | ||
20 | *** ../bash-2.05b/bashline.c Tue May 7 15:52:42 2002 | |
21 | --- bashline.c Sat Aug 3 11:40:16 2002 | |
22 | *************** | |
23 | *** 1045,1049 **** | |
24 | --- 1045,1052 ---- | |
25 | else | |
26 | { | |
27 | + #define CMD_IS_DIR(x) (absolute_pathname(x) == 0 && *(x) != '~' && test_for_directory (x)) | |
28 | + | |
29 | matches = rl_completion_matches (text, command_word_completion_function); | |
30 | + | |
31 | /* If we are attempting command completion and nothing matches, we | |
32 | do not want readline to perform filename completion for us. We | |
33 | *************** | |
34 | *** 1053,1057 **** | |
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 | |
40 | --- 1056,1060 ---- | |
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 | |
46 | *************** | |
47 | *** 1062,1066 **** | |
48 | conflict. */ | |
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 | |
53 | --- 1065,1069 ---- | |
54 | conflict. */ | |
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 |