Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Minor export oddity
- X-seq: zsh-workers 15015
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Minor export oddity
- Date: Thu, 21 Jun 2001 03:50:06 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
It's possible to export parameters named "1", "2", etc., but it's not
possible to assign values to them. You have to export them with typeset
to get them to actually appear in the environment. So:
schaefer[501] export 1=bar
BUG: parameter recreated with wrong flags
export: 1: can't assign initial value for array
schaefer[502] typeset -gx 1=baz
BUG: parameter recreated with wrong flags
typeset: 1: can't assign initial value for array
And:
schaefer[508] foo() { typeset -gx 1 ; printenv | grep ^1 }
schaefer[509] foo
1=
schaefer[510] export 2
schaefer[511] printenv | grep ^2
schaefer[512] typeset -gx 2
schaefer[513] printenv | grep ^2
2=
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author