bug-bash
[Top][All Lists]
Advanced

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

Re: `complete -p -- <cmd>` doesn't yield reusable input when "-F" is ass


From: Chet Ramey
Subject: Re: `complete -p -- <cmd>` doesn't yield reusable input when "-F" is assigned an invalid identifier
Date: Tue, 29 Jan 2019 20:21:43 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

On 1/29/19 8:15 PM, Great Big Dot wrote:
>  
> 
>     On Sun, Jan 27, 2019 at 6:14 PM Chet Ramey <address@hidden
>     <mailto:address@hidden>> wrote:
> 
> 
>     > I prefer this behavior, at least to the extent that the function name
>     argument to -F can't contain any shell metacharacters.
> 
> 
> But it can, and that's the problem. E.g.:

Read for context. If you hadn't omitted the part of your message, quoted in
my reply, that comment referenced, it would be clear that my response was
picking one of the alternatives you proposed.

> 
> $ complete -F 'meta;char' -- cmd
> 
> yields no errors. `complete` is perfectly happy to accept literally any
> argument to "-F", it seems. Empty string, multiple words, metacharacters,
> you name it---so long as it doesn't contain a null byte, `complete` won't
> so much as blink.

That's not what I meant. You can't define such a function. It's useless
to allow such a name, so the appropriate behavior is to flag an error
when that name is used with -F.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

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