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

Re: color



On Fri, Feb 3, 2023 at 4:23 PM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> Trying to get  rid of the calls to typeset

The first thing you should do is try to get rid of the calls to "sed".
You'll be happier in the long run if you don't have to keep adding
increasingly baroque regular expressions.

> ... completely strange.  Why is 'color' unique in this way?

It's not unique, it's an associative array.  Variables like "commands"
(after loading from zsh/parameter module) will show up the same way.

You're going to have to have separate cases for each of
scalar/array/associative.  To get both the keys and the values of an
associate array, you need ${(kv)aary}.

This set of threads has gone on long enough, the whole point of your
function is to show you parameter type information so start paying
attention to what's different about THAT and you'll make more
progress.




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