On 2/25/22 3:29 AM, konsolebox wrote:
On Mon, Feb 21, 2022 at 4:32 PM Chet Ramey <chet.ra...@case.edu> wrote:
What does `properly quoted' mean here and how does it differ from the
quoting you get when you force complete to treat the completions as
filenames with `complete -o filenames'?
I realized that a "quote all ' option is not what I want since I need
to rely on nospace and manual adding of space when a single result is
valid. Having "quote all" enabled backslash escapes the space as
well. What I need more is an option that allows replacing the current
word including the quote (', ", or $') that begins it with the result
as is rather than appending the result to the quote. Maybe a method
that can prevent space from being added on a specific completion
result can be added instead too.
So `noquote' doesn't work for this purpose?
If you want to modify the options for the currently-running completion
function, you could use `compopt'.
I also tried using the filenames option (which I remembered using
before) but it adds a slash to the result when the result matches a
directory. For example, "test" which refers to a task becomes
"test/".
That's an interesting idea for another completion option. Maybe something
like `-o markdirs' or `-o nomarkdirs' since it is on by default. It's
already a bindable readline option.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/