Re: How to get filename completion without variable expansion?
From:
Chet Ramey
Subject:
Re: How to get filename completion without variable expansion?
Date:
Thu, 17 Nov 2011 14:36:37 -0500
User-agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0
On 11/17/11 1:16 PM, Pierre Gaston wrote:
>> This is the default bash-4.2 behavior.
>>
> I think he wants something different than the current behavior. He
> wants the variable to stay a variable so that it is expanded when the
> command is executed while the current behavior is to escape the $ so
> that there is no expansion is happening when the command is executed .
I understand. Try the direxpand patch. It includes the heuristics I
referenced in
http://lists.gnu.org/archive/html/bug-bash/2011-09/msg00007.html
and explained in more detail in
http://lists.gnu.org/archive/html/bug-bash/2011-09/msg00015.html
which provide a mostly-acceptable solution to that problem. Keep in
mind that `$' is always going to be ambiguous.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/