[Top][All Lists]

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

Re: nameref in temp environment

From: Chet Ramey
Subject: Re: nameref in temp environment
Date: Sun, 22 May 2016 21:12:38 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.1.0

On 5/20/16 6:47 PM, Grisha Levit wrote:

> I would propose that the following behavior would be least surprising for
> assignments before command names:
>   * iff |$ref| is a valid nameref for assignment, assigning/appending to
>     |ref| modifies the target variable (for ksh93 compat)
>   *
>     the target variable is added to the export list if it was not there
>     before (for ksh93 compat)
>   *
>     if |$ref| is a nameref but is not valid for assignment (or is not set)
>       o |ref=x| puts |ref=x| in the env
>       o |ref+=x| puts |ref=${ref}x| in the env (using the target’s value)
>   * the nameref variable is added to the export list with the new value of
>     its target

This sounds basically reasonable.  I'll take a look at how it works out.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

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