Re: Space vs. non-space separators in COMP_WORDBREAKS

2021-12-22 Thread konsolebox
On Mon, Dec 20, 2021 at 2:21 PM Chet Ramey wrote: > Except that turns out not to be useful. It's intuitive to say that > whitespace separates words and the non-whitespace word break characters > allow you to complete on parts of words. But it's still a special case that needs to be documented. I

Re: Space vs. non-space separators in COMP_WORDBREAKS

2021-12-20 Thread Chet Ramey
On 12/17/21 9:20 PM, konsolebox wrote: 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

Re: Space vs. non-space separators in COMP_WORDBREAKS

2021-12-17 Thread konsolebox
On Fri, Dec 17, 2021 at 7:13 PM Chet Ramey wrote: > > On 12/17/21 2:00 PM, konsolebox wrote: > > On Sat, Dec 18, 2021, 00:49 Chet Ramey, wrote: > >> Well, the documentation says the line gets broken into words the way > >> readline does it, and readline uses the characters in > >> rl_completer_wo

Re: Space vs. non-space separators in COMP_WORDBREAKS

2021-12-17 Thread Chet Ramey
On 12/17/21 2:00 PM, konsolebox wrote: On Sat, Dec 18, 2021, 00:49 Chet Ramey, 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

Re: Space vs. non-space separators in COMP_WORDBREAKS

2021-12-17 Thread konsolebox
On Sat, Dec 18, 2021, 00:49 Chet Ramey, 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 bo

Re: Space vs. non-space separators in COMP_WORDBREAKS

2021-12-17 Thread Chet Ramey
On 12/16/21 6:56 PM, konsolebox wrote: If I have a function like function _complete_something { printf -v __ '%q ' "$@" logger -p debug -t something "Args: $__" logger -p debug -t something "$(declare -p COMP_WORDS)" } And in COMP_WORDBREAKS I have '=' inclu

Space vs. non-space separators in COMP_WORDBREAKS

2021-12-16 Thread konsolebox
If I have a function like function _complete_something { printf -v __ '%q ' "$@" logger -p debug -t something "Args: $__" logger -p debug -t something "$(declare -p COMP_WORDS)" } And in COMP_WORDBREAKS I have '=' included in the assignment. And I execute this com