[Top][All Lists]

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

Re: super annoying completion change

From: DJ Mills
Subject: Re: super annoying completion change
Date: Thu, 8 Dec 2011 10:52:23 -0500

On Wed, Dec 7, 2011 at 9:43 PM, Miles Bader <miles@gnu.org> wrote:
> I notice that recently the behavior of bash completion w/r/t
> environment variables has changed, in a reallllly annoying way:
> If one has an environment variable like:
>   ls=/usr/local/src
> and then hit <TAB> to complete the following command line:
>   $ cd $ls/ema<TAB>
> where the intent is to do "cd /usr/local/src/emacs", then:
> * The _old_ behavior of bash was to (1) expand "$ls" to
>  "/usr/local/src", and then (2) proceed to complete
>  "/usr/local/src/ema" into "/usr/local/src/emacs".  Handy!
> * The _new_ behavior is to just add a backslash before "$" and then
>  (apparently) try to complete on the literal-$-prefixed string --
>  which of course usually fails, as there is no such subdirectory.
>  Gahhhh!
> Given that filenames/directories containing a literal "$" are quite
> rare in general, and the old behavior enabled a _very_ useful way of
> using environment variables as "bookmarks", I think this change should
> be reverted (obviously compatibility is not a concern, as this change
> was itself an incompatible change).
> My bash version is "4.2.20(1)-release (x86_64-pc-linux-gnu)" in Debian
> sid.  If this isn't actually a bash problem then apologies... (dunno
> what it would be then, though)!
> Thanks,
> -Miles
> --
> Friendless, adj. Having no favors to bestow. Destitute of fortune. Addicted to
> utterance of truth and common sense.

There have been a number of threads discussing this issue.


This discussion includes a patch and ways to fix the issue.

reply via email to

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