[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to change the command completion behavior in bash
From: |
Peng Yu |
Subject: |
Re: How to change the command completion behavior in bash |
Date: |
Tue, 17 Nov 2009 13:33:48 -0600 |
On Tue, Nov 17, 2009 at 1:15 PM, Chet Ramey <chet.ramey@case.edu> wrote:
> Peng Yu wrote:
>> On Mon, Nov 16, 2009 at 8:30 AM, Chet Ramey <chet.ramey@case.edu> wrote:
>>>> If I have the following in the command line,
>>>>
>>>> ~/.bash
>>>>
>>>> when I type <TAB>, it will become /home/my_user_name/.bash
>>>>
>>>> I'm wondering if it is possible to configure bash command completion,
>>>> so that it will still be '~/.bash'
>>> You don't say what version of bash you're using, but bash-3.2 and bash-4.0
>>> both preserve the tilde by default.
>
> I think I may have been confused. If you're not doing command completion
> with the tilde-prefixed string (that is, if it's an argument to another
> command already on the line), you're probably using the
> bash_completion set of programmable completions, and the completion
> specification for the command to which this is an argument is probably
> expanding the tilde.
>
> I assumed you were trying to complete the above string as a command, not
> an argument to a command.
>
> What is the full command line on which you're attempting completion?
I'm trying to complete an argument rather than a command as I just
replied in the previous message.