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

Re: A way to untie -T vars?



On Mon, Jan 23, 2023 at 1:47 AM Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
>
> Here foo is array-local-tag-tied-unique-hide-hideval. I believe it can
> be untied and become array-local-tag-unique-hide-hideval (only "tied"
> is gone).

Hm.

As best I can tell:

array local left justified 10 zero filled 10 uppercase tagged unique
tied FOO foo

(plus export, hide, and hideval, which typeset +m does not display) is
the largest possible set of type fields for a tied pair.  If "left" is
replaced by "right" you can't have "zero filled", and "uppercase"
could be replaced only by "lowercase".

Of course the ${(t)FOO} words are not the same and don't include the size data.

scalar-local-left-right_zeros-lower-tag-tied-export-unique-hide-hideval

Also, although you can assign justification/filling to a tied pair,
none of it actually applies when expanding the array elements, so it's
questionable whether "untie" needs to preserve it for the array.  I
suppose in Sebastian's use case, it should?

Another interesting note, "typeset -x" implies "-g" but "local -x" does not.

Pondering.




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