Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: information about feature availability



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.



Messages sorted by: Reverse Date, Date, Thread, Author