bug-bash
[Top][All Lists]
Advanced

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

completion handles variables inconsistently


From: Martin von Gagern
Subject: completion handles variables inconsistently
Date: Thu, 11 Aug 2011 12:31:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0

Hi!

If the current word on the command line contains a shell variable, then
the expansion works as if the variable had been expanded, but then
quotes the variable. An example is probably a lot better than theory:

Steps to reproduce
1. Type "echo $HOME/.bas"
2. Press tab
3. Press tab again

Actual results:
2. expands to "echo \$HOME/.bash", assuming that all files ~/.bas* share
the h as the fifth letter of their filename, and that at least two files
differ in their sixth letter.
3. no list of possible completions, as \$HOME no longer is a variable
reference, and there is no directory of that name suitable for expansion.

Expected results:
2. "echo $HOME/.bash"
3. List of file names printed to choose from

Past versions of bash up to 4.1 used to expand the variable when
completing. In those cases, the completed version would look like "echo
/home/user/.bash". A plain 4.2 build without any patches does exhibit
the new behaviour. So it's an issue introduced in that code base.
Unfortunately I know no source repository for bash where I could bisect
this down to a small commit.

I've reported this as https://bugs.gentoo.org/378669 as well, but there
appears to be nothing specific to Gentoo about this. So I'm forwarding
the bug report here.

Greetings,
 Martin von Gagern

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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