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: Mon, 4 Feb 2019 14:17:59 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.5.0

On 2/4/19 11:48 AM, Grisha Levit wrote:
> On Sun, Jan 27, 2019 at 6:15 PM Chet Ramey <chet.ramey@case.edu> wrote:
>> the function name argument to -F can't contain any shell metacharacters
> 
> Should the change [1] to make this happen have strpbrk() instead of
> strcspn()?  It seems to have the opposite of the intended effect as
> is.

Probably. There are several ways to do this, but the implementation works
better if I use strpbrk instead of strcspn. (It's incomplete as it stands
now.) Thanks.

-- 
``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]