[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: |
Wed, 14 Feb 2018 14:11:24 -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:09 PM, Nick Patavalis wrote:
> On Wed, Feb 7, 2018 at 10:56 PM, Chet Ramey <chet.ramey@case.edu> wrote:
>> On 2/6/18 3:52 PM, Nick Patavalis wrote:
>>>
>>> In any case, splitting it like:
>>>
>>> foo | --bar | =" | baz" aa bb
>>>
>>> (the last part a single word) does not look reasonable to me (even if
>>> it may be convenient in some occasions I cannot think of). It looks
>>> like a mix-up between the roles of " as a quoting character and as a
>>> word break character.
>>
>> That may, in fact, be unreasonable. I'll take a look.
>>
>> (It is not what I thought you were talking about as a problem: it seemed
>> to me that the `="' part was where you were objecting.)
>>
>
> My worst problem is not the way '="' is split, but instead, how the rest
> of the line is not (baz" aa bb).
As it turns out, the problem is the way `="' is split. If you want to
treat quoted strings the way readline does, you can't use `'' or `"' as
a word delimiter when splitting the line, regardless of whether or not
they're in rl_completer_word_break_chars ($COMP_WORDBREAKS).
I'll have a fix in the next devel branch push.
Chet
--
``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/
- Custom word completion, word splitting, bad behavior, Nick Patavalis, 2018/02/05
- Re: Custom word completion, word splitting, bad behavior, Chet Ramey, 2018/02/05
- Re: Custom word completion, word splitting, bad behavior, Nick Patavalis, 2018/02/06
- Re: Custom word completion, word splitting, bad behavior, Chet Ramey, 2018/02/07
- Re: Custom word completion, word splitting, bad behavior, Nick Patavalis, 2018/02/07
- Re: Custom word completion, word splitting, bad behavior,
Chet Ramey <=
- Re: Custom word completion, word splitting, bad behavior, Chet Ramey, 2018/02/07
- Re: Custom word completion, word splitting, bad behavior, Nick Patavalis, 2018/02/07
- Re: Custom word completion, word splitting, bad behavior, Chet Ramey, 2018/02/12
- Re: Custom word completion, word splitting, bad behavior, Nick Patavalis, 2018/02/13