[Top][All Lists]

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

Re: Feature Request: Add option to make completed values always become p

From: Chet Ramey
Subject: Re: Feature Request: Add option to make completed values always become properly escaped
Date: Fri, 25 Feb 2022 09:46:32 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.0

On 2/25/22 3:29 AM, konsolebox wrote:
On Mon, Feb 21, 2022 at 4:32 PM Chet Ramey <chet.ramey@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

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    chet@case.edu    http://tiswww.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]