[Top][All Lists]

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

Re: Custom word completion, word splitting, bad behavior

From: Chet Ramey
Subject: Re: Custom word completion, word splitting, bad behavior
Date: Mon, 12 Feb 2018 11:33:17 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 2/7/18 5:11 PM, Nick Patavalis wrote:

> On the other hand, readline seems not to be able to complete something
> like:
>     ls /tm"p/foo/a b"
> (and I don't understand why), though this is true, regardless of
> whether " is in COMP_WORDBREAKS or not. I *both* cases, the command line
> is split (correctly) like:
>    ls | /tm"p/foo/a b"
> so, probably, this is irrelevant with the discussion at hand.

Because, as I said in my original reply, readline understands how to
complete inside quoted strings. If point is after the `b', for instance,
and you hit TAB, readline scans back to the open quote and passes
"p/foo/a b" to the completion function.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

reply via email to

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