zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Ray Andrews <rayandrews@eastlink.ca>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: color
Date: Fri, 3 Feb 2023 20:25:39 -0800	[thread overview]
Message-ID: <CAH+w=7Ype9eFZg=-bU1nSiZ2K_b_Za+rF9cJE3gjGALFf6Zdqg@mail.gmail.com> (raw)
In-Reply-To: <ec368e9d-a642-fffb-f0af-7087916d8aab@eastlink.ca>

On Fri, Feb 3, 2023 at 4:23 PM Ray Andrews <rayandrews@eastlink.ca> 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.


  reply	other threads:[~2023-02-04  4:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-04  0:21 color Ray Andrews
2023-02-04  4:25 ` Bart Schaefer [this message]
2023-02-04 16:00   ` color Ray Andrews

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7Ype9eFZg=-bU1nSiZ2K_b_Za+rF9cJE3gjGALFf6Zdqg@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=rayandrews@eastlink.ca \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).