[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Enable compgen even when programmable completions are not available?
From: |
Eli Schwartz |
Subject: |
Re: Enable compgen even when programmable completions are not available? |
Date: |
Fri, 30 Jun 2023 13:50:18 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 |
On 6/30/23 1:19 PM, Robert Elz wrote:
> Date: Thu, 29 Jun 2023 23:05:38 +0100
> From: Kerin Millar <kfm@plushkava.net>
> Message-ID: <20230629230538.cbef14a75694143ccf034a02@plushkava.net>
>
> | The thing is that portage also has a legitimate stake in needing
> | to enumerate all variable names.
>
> Why isn't "set" good enough for that?
>
> (set -o posix; set) | sed 's/=.*$//' | whatever_processes_them
>
> You need posix mode, so bash doesn't dump functions as well (which IMO
> it shouldn't do with set, ever, but has probably been doing it since
> prehistoric times, and somewhere, there's probably 1 user depending upon
> it...)
So then you get what? The exact same thing, with all the attendant
flaws, as declare -p which is already known not to work?
You still have to sed/grep the contents, and you still have the original
declare -p problem that you need to parse the value of the variable in
order to figure out *where* it is so you can discard and ignore it...
which is impractical without an actual shell parser.
--
Eli Schwartz
- Re: Enable compgen even when programmable completions are not available?, (continued)
Re: Enable compgen even when programmable completions are not available?, Fabien Orjollet, 2023/06/27
- Re: Enable compgen even when programmable completions are not available?, Kerin Millar, 2023/06/27
- Re: Enable compgen even when programmable completions are not available?, of1, 2023/06/27
- Re: Enable compgen even when programmable completions are not available?, Kerin Millar, 2023/06/27
- Re: Enable compgen even when programmable completions are not available?, Fabien Orjollet, 2023/06/28
- Re: Enable compgen even when programmable completions are not available?, Fabien Orjollet, 2023/06/28
- Re: Enable compgen even when programmable completions are not available?, Kerin Millar, 2023/06/28