Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

direxpand in 4.3 is different from in 4.2

103 views
Skip to first unread message

Clark Wang

unread,
Mar 14, 2014, 2:39:23 AM3/14/14
to bash.bug list
For example in 4.3 when direxpand is enabled, `cd ./tmp<TAB>' would be
expand `./tmp' to the full path (e.g. `/root/tmp/'). I think this is not
good especially when the full dir path is very long. Bash 4.2 (tested with
4.2.37) does not behave like this. Could we keep the 4.2 behavior?

-clark

Chet Ramey

unread,
Mar 14, 2014, 12:06:48 PM3/14/14
to Clark Wang, bash.bug list, chet....@case.edu
This isn't accurate. When you build bash-4.3 with the default options, and
choose to enable direxpand using shopt, you get the same behavior as in
bash-4.2. In particular, relative paths aren't expanded to full paths.

If, on the other hand, you build bash with the enable-direxpand-default
configuration option, you do get this behavior. I left the relative-path
expansion option enabled when bash is built this way. In retrospect, I
should probably have left it out. If you prefer it disabled, you can
change the assignment to dircomplete_expand_relpath in bashline.c.

That is not to say there aren't problems with relative paths and completion
in bash-4.3, but they aren't with direxpand. Additionally, I'm not talking
about the situation when bash-completion is included in the mix.

Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU ch...@case.edu http://cnswww.cns.cwru.edu/~chet/

Clark Wang

unread,
Mar 16, 2014, 10:05:55 PM3/16/14
to Chet Ramey, bash.bug list
On Sat, Mar 15, 2014 at 12:06 AM, Chet Ramey <chet....@case.edu> wrote:

> On 3/14/14 2:39 AM, Clark Wang wrote:
> > For example in 4.3 when direxpand is enabled, `cd ./tmp<TAB>' would be
> > expand `./tmp' to the full path (e.g. `/root/tmp/'). I think this is not
> > good especially when the full dir path is very long. Bash 4.2 (tested
> with
> > 4.2.37) does not behave like this. Could we keep the 4.2 behavior?
>
> This isn't accurate. When you build bash-4.3 with the default options, and
> choose to enable direxpand using shopt, you get the same behavior as in
> bash-4.2. In particular, relative paths aren't expanded to full paths.
>
> Recompiled with default options and it worked fine. Thanks.
0 new messages