Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Crash when exporting scalar without value and getsparam fails
- X-seq: zsh-workers 34207
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Crash when exporting scalar without value and getsparam fails
- Date: Sat, 10 Jan 2015 08:56:26 +0100
- Cc: zsh workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=RA/M1HYemiGqin24QR0cl18KlmTpbRJf597ZtZB+2e4=; b=ms7y9Uv9V+X/HsxmAhsvjs0yGD0ORu/DBgePJ1fve9X9d9VjCzkpZ6XhYefQiONl/r NkXcARVLrWJhPwOjhX+Pc95nJxMNc6ocwA/pKO0lipFMbe81Hh6Og5qzW7jnzSed2PdI 0SvDR679IXwhSIxzOWOlIO52xLn1mSdiufNlr30BxyjmWo2oWI1hV8nG6JeS8ZF38FPn KhAPB9TcKolUxhGt525/Ft9VsEIVnwauEehQJxujkjrl6K94/29JF6xWC2ai8sxdiB1C cBE1iDBsGmjKpg6GVL/qlBFFC21ylcKEIEzA5dzhHg12CHj+n/prYvcybAM2Le5VR9sE BwcA==
- In-reply-to: <150109225231.ZM24510@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAHYJk3TaSOSdKqaJez4nWW7C5zwP7OTdbKP4qD4z7bVJGAsvOg@mail.gmail.com> <150109225231.ZM24510@torch.brasslantern.com>
On Sat, Jan 10, 2015 at 7:52 AM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Jan 9, 2:26pm, Mikael Magnusson wrote:
> } bug:
> } unset IFS
> } export IFS
> }
> } Would the non-gnu equivalent of addenv(pm, getsparam(pname) ?: ""); do
> } the trick here? Or should it just return with an error?
>
> I think it should do nothing to the environment and return success.
>
> % bash -c 'unset IFS; export IFS; echo $?; printenv | grep IFS'
> 0
> %
>
> However, we need an unset parameter object with the export flag set,
> so that it will become both set and exported when next a value is
> assigned to it. I think that can be done but don't immediately
> recall how.
Ah yes, this is what happens for other parameters in zsh too.
% unset foo
% export foo
% printenv|grep foo
% foo=3
% printenv|grep foo
foo=3
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author