[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to get filename completion without variable expansion?
From: |
Pierre Gaston |
Subject: |
Re: How to get filename completion without variable expansion? |
Date: |
Thu, 17 Nov 2011 20:16:38 +0200 |
On Thu, Nov 17, 2011 at 6:22 PM, Chet Ramey <chet.ramey@case.edu> wrote:
> On 11/16/11 7:13 AM, jens.schmidt35@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 .