zsh-workers
 help / color / mirror / code / Atom feed
* Minor export oddity
@ 2001-06-21  3:50 Bart Schaefer
  0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 2001-06-21  3:50 UTC (permalink / raw)
  To: zsh-workers

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   


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-06-21  3:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-21  3:50 Minor export oddity Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).