bug-bash
[Top][All Lists]
Advanced

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

Re: Incorrect alias expansion within command substitution


From: Robert Elz
Subject: Re: Incorrect alias expansion within command substitution
Date: Fri, 04 Feb 2022 05:25:59 +0700

    Date:        Thu, 3 Feb 2022 16:19:08 -0500
    From:        Greg Wooledge <greg@wooledge.org>
    Message-ID:  <YfxGzCsd4AgoKTM/@wooledge.org>

  | This declares the variables at the wrong scope.

You are correct - I never normally use "declare" for anything, so
I had forgotten that it was essentially a clone of "local" (rather
than "local" being "declare -l" or something similar (I know
declare has a "-l" which is something entirely different, that's
not the point).

Since this is bash local stuff, it would be useful to add an "uplevel"
option to declare, so that things like this can work.   It has -g already,
and while useful, it doesn't solve this problem.

kre





reply via email to

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