[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:13:05 -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/4/11 9:51 PM, Clark J. Wang wrote:

> Tested with 4.2.10. Overall it works fine for me. But it still has problem
> for following scenario:
> $ complete -d -o bashdefault cd
> $ cd $PWD<TAB>
> # it expands to this:
> $ cd \$PWD<SPACE>
> Bash 4.1 also behaves like that so I'm not sure if it's OK.

Out of scope.  By default, readline always quotes matches as if they were
filenames, and relies on the application to turn that off where
appropriate.  The -d option has the effect of telling readline to treat
the matches as filenames, which causes them to be quoted.

This points out a pair of opportunities, though: there is no option for
a progcomp to tell readline to *not* quote the completions as if they
were filenames, and it might be a good idea to save and restore the value
of the `rl_filename_completion_desired' option when `complete -f' or
`complete -d' returns no matches.


``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]