[Top][All Lists]

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

Re: Issue with Bash-4.3 Official Patch 27

From: Geir Hauge
Subject: Re: Issue with Bash-4.3 Official Patch 27
Date: Thu, 16 Oct 2014 22:37:36 +0200

2014-10-16 15:09 GMT+02:00 Chet Ramey <address@hidden>:

> On 10/15/14, 1:49 PM, address@hidden wrote:
> > But anyway.
> > In my opinion I should trust a shell not violating their own rules and be
> > able to import their own variables.
> That's not the issue.  The shell can import variables like that just fine,
> as evidenced by exported functions actually working.  The question is
> whether or not `export' lets you set and export non-identifiers.  It does
> and should not.
> > So the % character should be allowed to be used in variable names.
> No, shell variable names should continue to be shell identifiers.  You
> can already use `%' (any character, really) in environment variable
> names.

Regardless though, shouldn't source <(declare -xp) work whether or not
the environment contains invalid identifiers? It doesn't at present:

$ env %=% bash -c 'echo "$BASH_VERSION"; source <(declare -xp)'
/dev/fd/63: line 1: declare: `%': not a valid identifier

Isn't declare -p output meant to be reusable as shell input?

Geir Hauge

reply via email to

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