[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash tab variable expansion question?

From: Chet Ramey
Subject: Re: bash tab variable expansion question?
Date: Tue, 06 Sep 2011 20:17:01 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0.1) Gecko/20110830 Thunderbird/6.0.1

On 9/5/11 4:40 AM, Roger wrote:
>> The option works, as far as I can see.
>> "ls $HOM" completes to "ls $HOME " instead of "ls $HOME/", though.

This is not going to work until I do something else.  Readline decides
whether or not to append a slash to a directory name, and it doesn't
know that $HOME is a directory name.  This has been the case for as
long as readline has existed.

> Weird.
> On Gentoo here, "echo $HO" does complete to "echo $HOME", but "ls $HO"
> fails to complete here.

There's probably nothing in the `ls' compspec to tell the programmable
completion code to attempt variable completion.  You need a
`-o bashdefault' for that.


``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]