[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: direxpand in 4.3 is different from in 4.2

From: Chet Ramey
Subject: Re: direxpand in 4.3 is different from in 4.2
Date: Fri, 14 Mar 2014 12:06:48 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

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.

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.

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]