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

Feature Suggestion



I would like to suggest a new zsh feature, to anybody who
has the inclination to implement it:

The "magic" relationship between path/PATH, manpath/MANPATH,
and fpath/FPATH (are there others?) should be made genericly
available via a typeset flag. e.g.

	# Ties myarray and MYARRAY as a "mirrored" array & colon-
	# separated-scalar pair.

	typeset -m myarray=(x y z)
	echo $MYARRAY

	(output: x:y:z)	

And, why be restricted to ":" as separator for the scalar?

	typeset -m"," LIST=a,b,c
	echo $list[2]

	(output: b)

Or actually, why be restricted by the lowercase/upercase convention?

	# Syntax still needs some thought

	typeset -m myarray1:myarray2

While we're on the subject of arrays... it would be nice if there
was a way to use array values without having to first assign it to
a variable. e.g.

	x=(a b c); echo $x[2] 	# works
	echo (a b c)[2]		# doesn't
	echo $[(a b c)[2]]	# doesn't either

Thanks,
--
Alex Ramos



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