Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID
	autolearn=ham autolearn_force=no version=3.4.1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=brasslantern-com.20150623.gappssmtp.com; s=20150623;
        h=from:message-id:date:in-reply-to:comments:references:to:subject
         :mime-version:content-type;
        bh=gF/7DCSjzz8ZUECKRcyjtwE48njfndyEnOQsbX+EiW4=;
        b=LZPRobxf0zt1r4FjlR3n2eL6GPcLEJWpESEJxaKg897ddGQ3MEXxifGX6uFC9B4/4U
         uyB9mRKWdverkrosb0UcL6hfq04yCmHhV9cWFfAxHev15m1s/SspFZ4z60O7Qmadkywv
         MakSwvqci26g1KsYi5DZUh6GPyMEmRHQAkraNRibb8jdh2LofJPC/1PSxRozpjc4RewS
         c5kFSY45pKmszeafaySI2cCZkpiaVLPKksaa7rQZ99FzJFEYON00UgOVDieKIkqfXIs/
         PkjUjjy3eaTS3QnpWgx4zm6qjn2/oEgTKTtx8lBbx1tfyQAImF3XPJbRzhxfdjsy40wH
         vPag==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:message-id:date:in-reply-to:comments
         :references:to:subject:mime-version:content-type;
        bh=gF/7DCSjzz8ZUECKRcyjtwE48njfndyEnOQsbX+EiW4=;
        b=GEZTC9lke9e9zt5u+HMkRbbVvwCRoKkgpI63xFZC9/vR8HubJopR42cXfljzO/a4y6
         QhpuPB9unN6nOt5kqbLXYA5ohvnUmTKmxW1smlJ5p/OXAJHyViYbvxoD+VpSlyPbphyH
         Tj/LEnPGdSQhM4jvNsG1y8YN2KiLJw/p+DdSkUx5Ru9P72nnmP36Z13iDTYMXoish1Jn
         4g3zKvLiuejxa2fo0kZm+h9h7BFxt7Bxuz7gyj/WUMKHVV+WqtKoes4GGbmFRzxlWCM4
         9nRomzud9YEzTD1d3CBK9rbcICcOfvv6Ih+jsphESQK6a8k3HneShbL1T+evhKWbOWAb
         6C0w==
X-Gm-Message-State: AG10YOSQqDtyijktCSBosrQqeZHPI3LmmYlOQkT+Sd/XtU3VdzW3LF6sFW1WY+OPIbSV7g==
X-Received: by 10.66.145.105 with SMTP id st9mr18188879pab.32.1455475450647;
        Sun, 14 Feb 2016 10:44:10 -0800 (PST)
From: Bart Schaefer <schaefer@brasslantern.com>
Message-Id: <160214104428.ZM20624@torch.brasslantern.com>
Date: Sun, 14 Feb 2016 10:44:28 -0800
In-Reply-To: <CAKc7PVBrDBe-QQ5=3uC_G_eQSmg1MvSaG8QBdQN3Zn_htHkZmw@mail.gmail.com>
Comments: In reply to Sebastian Gniazdowski <sgniazdowski@gmail.com>
        "Re: Should (t)path = array-unique-special work this way" (Feb 14, 11:04am)
References: <CAKc7PVCDHQDc=sby5wGNEtWCA6omFhmP8uPWbsPXwTQv9tDqFw@mail.gmail.com> 
	<160205091543.ZM29723@torch.brasslantern.com> 
	<CAKc7PVBrDBe-QQ5=3uC_G_eQSmg1MvSaG8QBdQN3Zn_htHkZmw@mail.gmail.com>
X-Mailer: OpenZMail Classic (0.9.2 24April2005)
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Should (t)path = array-unique-special work this way
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Seq: zsh-workers 37970

On Feb 14, 11:04am, Sebastian Gniazdowski wrote:
}
} Wanted to write a snapshot feature, basically declare -p > snapshot;
} setopt typesetsilent; source ./snapshot, but the omission of -U is
} quite a blocker.

This doesn't work in the general case anyway, because the output of
"typeset -p" (aka "declare -p") doesn't properly reflect local scopes.
That is, if you're in a local scope, sourcing the "declare -p" output
will create all the variables at that local scope, not at the scopes
where they were originally defined.

In fact it's impossible to correctly reconstruct the local and global
scopes because of the runtime dynamic scoping rules.

