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

Re: A way to untie -T vars?



On Sat, Jan 21, 2023 at 8:38 AM Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
>
> I'm using -U flag to quickly uniquify the scalar, however this method is problematic as the array vars are left over.

Oh, now I see what you mean.  You're adding an array with typeset -T
so that -U will remove duplicates from the scalar, but then you want
only the scalar to be left at the end -- the array is just a vehicle
for the "uniqueness" semantics.

Is using a tied array really that much faster than VAR=${(us.:.)VAR} ?




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