[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bash205b-003 patch
From: |
Paul Pogonyshev |
Subject: |
bash205b-003 patch |
Date: |
Sun, 26 Jan 2003 17:50:08 +0200 |
User-agent: |
KMail/1.4.3 |
Hi.
The patch bash205b-003 doesn't solve the problem it is intended to solve:
In certain cases, bash appends a space instead of a slash to a directory
name relative to the current directory when performing command name
completion. This affects partial completion of intermediate directory
names.
Here is how to reproduce the problem:
$ mkdir foobar
$ mkdir foobar/foobar
$ mkdir foobar/foobar/foobar
Now type `fooba' in command line and press TAB. Bash correctly expands this
to `foobar/'. Type further: `foobar/foo' and press TAB. This time bash does
the wrong thing: `foobar/foobar ' instead of `foobar/foobar/'.
The patch below fixes this by simply commenting out a piece of code in
bashline.c. I couldn't think of a reasoning for this code, and found no
problems with bash after its removal. But if you find anything, please
inform me so i can fix it in my copy.
I found no cvs repository for bash, so the patch is a hacked one made in my
copy of sources (2.05b + 4 patches found in ftp://ftp.cwru.edu/pub/bash/).
best regards,
Paul Pogonyshev
--- bashline.c 2003-01-26 17:16:47.000000000 +0200
+++ bashline.c 2003-01-26 17:16:47.000000000 +0200
@@ -1055,6 +1055,7 @@ attempt_shell_completion (text, start, e
filenames and leave directories in the match list. */
if (matches == (char **)NULL)
rl_ignore_some_completions_function = bash_ignore_filenames;
+#if 0
else if (matches[1] == 0 && CMD_IS_DIR(matches[0]))
/* Turn off rl_filename_completion_desired so readline doesn't
append a slash if there is a directory with the same name
@@ -1074,6 +1075,7 @@ attempt_shell_completion (text, start, e
completion. If there are multiple completions this won't
make a difference and the problem won't occur. */
rl_filename_completion_desired = 0;
+#endif
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bash205b-003 patch,
Paul Pogonyshev <=