[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Why does foo=bar compgen -e not show foo as a name?
From: |
Chet Ramey |
Subject: |
Re: [Help-bash] Why does foo=bar compgen -e not show foo as a name? |
Date: |
Sun, 29 Apr 2018 18:15:41 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 4/29/18 1:58 AM, Nick Chambers wrote:
> Using bash 4.4, I am able to replicate this on both macos High Sierra
> and Ubuntu 17.10. Why does the following not show foo as an
> environment variable?
It's not exported to the environment, since `compgen' is a builtin command.
It doesn't really make sense for compgen to look in the temporary
environment anyway, since it's supposed to mimic, as much as is practical,
what a compspec constructed from a comparable set of completion options
would do when used for word completion. Word completion doesn't use the
temporary environment.
--
``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/