On Wed, Feb 7, 2018 at 11:12 PM, Chet Ramey <[email protected]> wrote:
>
> You might try, as an intermediate step, removing `'' and `"' from
> $COMP_WORDBREAKS and seeing how that works. I would be interested if it
> affected readline's ability to complete within quoted strings.
>
I have tried this, and it works ok for me. It doesn't seem to change
anything in the ability of readline to complete quoted strings /
filenames, at least as far as I can tell. What worked with " in
COMP_WORDBREAKS, seems to work without, what didn't, doesn't. In most
cases the quotes are *not* separated from neither the previous, nor
the following word, as in, for-example
ls "/tmp/foo/a b"
which is split by readline (with the *default* COMP_WORDBREAKS value,
as well as without " in it), like:
ls | "/tmp/foo/a b"
so this is expected.
Obviously, readline has no problem completing inside the quotes in
both cases.
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.
As I don't konw the internals of readline, I do not know in what
corner case the presence of " in COMP_WORDBREAKS could have an
effect.
/npat