* information about feature availability
@ 2003-07-11 15:48 Joe Gainey
2003-07-11 16:21 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Joe Gainey @ 2003-07-11 15:48 UTC (permalink / raw)
To: zsh-users
Can anyone tell me if any of the following can be done with zsh?
1. assignments of the form:
varname[word]=( [word]=word [word]=word ... )
2. validating variable assigment using predetermined function.
3. I would also like to be able to use reference variables. This
`feature' is a little less important since it seams that zsh has
scoping capabilities (local vs. global).
/Joe
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: information about feature availability
2003-07-11 15:48 information about feature availability Joe Gainey
@ 2003-07-11 16:21 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2003-07-11 16:21 UTC (permalink / raw)
To: zsh-users
On Jul 11, 11:48am, Joe Gainey wrote:
}
} Can anyone tell me if any of the following can be done with zsh?
}
} 1. assignments of the form:
} varname[word]=( [word]=word [word]=word ... )
No. Assignments of the form
varname=( key1 value1 key2 value2 ... )
are supported where varname has previously been declared as an associative
array, but an associative array cannot be the value of an array field (as
is implied by "varname[word]=( ... )"), and the [key]=value syntax inside
the parens is not yet supported.
} 2. validating variable assigment using predetermined function.
No, zsh does not yet support discipline functions.
} 3. I would also like to be able to use reference variables.
True namerefs in the ksh sense are also not yet supported. However, you
can get a very similar effect by using ${(P)varname}.
} [namerefs are] a little less important since it seams that zsh
} has scoping capabilities (local vs. global).
Yes, zsh supports function-scoped variables with "local"; this works a
bit like Perl's "local" in that the names are dynamically scoped (not
like "my" static scoping) but function-level is the only local scope.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-07-11 16:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-11 15:48 information about feature availability Joe Gainey
2003-07-11 16:21 ` 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).