bug-bash
[Top][All Lists]
Advanced

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

Re: Space vs. non-space separators in COMP_WORDBREAKS


From: Chet Ramey
Subject: Re: Space vs. non-space separators in COMP_WORDBREAKS
Date: Fri, 17 Dec 2021 14:13:07 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.4.0

On 12/17/21 2:00 PM, konsolebox wrote:
On Sat, Dec 18, 2021, 00:49 Chet Ramey, <chet.ramey@case.edu> wrote:
Well, the documentation says the line gets broken into words the way
readline does it, and readline uses the characters in
rl_completer_word_breaks as delimiters but doesn't remove them from
the list. It just uses them as word separators to bound the word to be
completed.

But that doesn't explain why the spaces are removed and I can't find
anywhere in the documentation of readline that explains it.  I would
have to study the code itself to know why.

Because nobody wants empty arguments to deal with, but it's useful to
know where readline splits the words when it finds the word it wants to
be completed.

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