[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Completion of ENV variables seems to be broken - leading slash (or e
Re: Completion of ENV variables seems to be broken - leading slash (or even more) is added
Sun, 10 Jul 2011 15:41:46 -0700
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:18.104.22.168) Thunderbird/22.214.171.124 Mnenhy/0.7.6.666
Am Dienstag, 15. März 2011 21:44:37 UTC+1 schrieb Chet Ramey:
The bash-4.1 solution, though it modified what the user typed, did not
result in any ambiguity. A filename was a filename, and if it contained
characters that needed to be quoted, readline did so.
I might be able to finesse this issue and retain the bash-4.2 behavior
by changing state when rewriting the directory name for opendir(2), but
I have to think about it some more.
you elsewhere suggested to write a completion function for cd
that does the expansion. May I point out that the expansion
of variables is not only a matter with the cd command but
for any other command that expects directory or file names?
I understand the dilemma, nobody prevents me from creating
a directory named '$HOME' but what do I expect when typing
It *SHOULD* expand $HOME since bash performs variable name expansion
on the command line.
If it doesn't, it is broken.
If you want a filename with $ in front of it, you use
cd '$HOME'/<tab> or
Variable expansion on the command line has always been integral to
the processing of the command line, are you saying this is broken in 4.2?
That sounds pretty bad.