On Thu, Nov 17, 2011 at 6:22 PM, Chet Ramey <chet.ra...@case.edu> wrote:
> On 11/16/11 7:13 AM, jens.schmid...@arcor.de wrote:
>> Hi,
>>
>> I have the following problem:
>>
>> (Environment or regular) variable FOO contains the path of existing
>> directory "/foo". When I have a file "/foo/bar" in that directory and when
>> I press TAB in the following commandline ('|' denoting the cursor position)
>>
>> $ cat $FOO/b|<TAB>
>>
>> bash expands the commandline to
>>
>> $ cat /foo/bar |
>>
>> However, I would like to expand it to
>>
>> $ cat $FOO/bar |
>>
>> that is, keep the variable unexpanded, exactly as bash does not expand tilde
>> characters during filename completion.
>
> 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 .