From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 32225 invoked from network); 4 Feb 2023 04:26:41 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 4 Feb 2023 04:26:41 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1675484801; b=ec9mYmpfKdLWoH6F26tcCxI2WCAyRQLz3lEyF6HpOWFpmHYkintV9MAdrZMwuLSGzEe69xFuzm A+KkAEYn3riQzaELQn2LMCq5JgJf2OlYFmLeYA649nMPSWGen77OFvKpbJI4ugU3ItNOZ2N/le vhYpKkkf9cggJ6MYpeVpfNMGBY7SxwQhVkP6ANGZSataxfqC0FvlEH8c4nyWDjIZ3dtmGJqfBw HBnF03Fhozej3Xg5Qpy0ubbliMuFUToHJhTb8fRiZaKo6EzGAG3tzwlZ2ZwHdD+cb04n3eKNJz DFmdOuWVTWzBEVC5ihvxXH1ZjWK/hhGuHJzjYWZPahRdKA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f51.google.com) smtp.remote-ip=209.85.218.51; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1675484801; bh=ZH5YXi/GxoNj34Xoh4QyLKaKIha7AEMoPumo5glQMlk=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=MsWzNY2BKJGtlvln/YELUa36Miry4ahCWaZLfsiBLIvrt3Q7QaPoPk+PJ7+FJPNsbkwNyttEil QpswxY/JPpfP5cA9TXDpCE6L/VbYlFL6WW/QaMxEwfl3QB7Z6hBw9VJGPfuYuej7HlQAu2Ud0/ N2Ito49CUrhhkhWONwTzompXdDqV9CtdxjBIURj4M/pM/CkXXAqGz/k79Pu9qj6pcl2BEPXukz G3cumGgYN8Dsw9ijl0AwEnTVs7lbYTnvSL2HBPtolTe9BVXdtWrbLttY/gNZqLWOnJJNfay+Tw 6eXQeux0Z4ByYrzRdmz26U2BAoTqMt8bgB2sHbK9vmz6wQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=SCsNxxqgaID36jIJVNf1UJg+NFeNrCFv3kf0WN2V80Q=; b=ZrWmjcZDi9usAbFZLUv0X5dVtm p7Z758KGSHIlMggGIbS2qA5tHjVh4Ew2Rd8AnvkhMS9nuXuZEUvRqr3DWObt6WgueMLPQjAaiwGJy mjmE41OsDk4pi8euNYQixgwTh5xTHh6gyBqvxuEZW5oYzbId1wf2zT31YJC2eWjhLRJQxlXeC3ElU 1BizuX7pzaLUUY8GCL5tzACwDq0M56Ca9Ha20erqz6QhCf5ihbyY4EfihnSS3c5GEher9G1di6hXG JEaX3KLqhN4UHYTtXV9V/+JIB6zm68253FTY8mGn2kgN5qWLINZjAcA+wEB8A/xp5K8EN/4fqp03y ZLNMZylg==; Received: by zero.zsh.org with local id 1pOA8P-000LRI-6m; Sat, 04 Feb 2023 04:26:41 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f51.google.com) smtp.remote-ip=209.85.218.51; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f51.google.com ([209.85.218.51]:42905) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pOA7a-000Kl7-RT; Sat, 04 Feb 2023 04:25:51 +0000 Received: by mail-ej1-f51.google.com with SMTP id bk15so20549443ejb.9 for ; Fri, 03 Feb 2023 20:25:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=SCsNxxqgaID36jIJVNf1UJg+NFeNrCFv3kf0WN2V80Q=; b=O+fGVVwmfrKoS40m20jG/Pjwu/9otFXd0HshVr/GM4RI2Nc//zxc+JpEe6xXVZnTwb T/F1unHiQcoKrlne2xOy4qhmwir4XvL6pT8VCO1jq5tCeR/IHiHFZI5x1RSXIHVMBllS 97yMFfNafWB7j9SQD5MKPijJfmB1jal0dtJtGb7yyuEcR1wEuiXtclP92UMmRPKubbTz rCJp0bR7qBdHn3TzHygegmXiR2pH6aGrAefBdgn5qqIvPqFiDbCwkbIEL2P9p6dbyE+5 Q72pWd9dYNQef/7swqz+S9caYGUHPgO5kyFQY4BjM0NxXq0M3WPZYWTaixH4N8PpLmQD mMug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SCsNxxqgaID36jIJVNf1UJg+NFeNrCFv3kf0WN2V80Q=; b=ttVp3ho0OouRRu52h65j+Pq+maXIUpyCsfUvNArFVd7NWm57lK2VLyX2TRSs6U0/51 hVgzsl5PRRRaYsPrQkF0bXqJUKyIFkJ3OW60ETmOpJMvqGmqUerPdV2raYOmW4C8EJRZ yBBJ2KpWqH/DVqX1W8z6q3P//Xvo1fyQGMOUVE94jzOTiQ1a5GUFaye59Gn28QBlQqil 1GqjHw4VK5FLWJiSs4E63a5fWbMT4/OJ8POqX/VjUMXJjoSAfEGA9RtCmI9SDDlTaTQR DWEV8o28N9364RzVPLmqM+mv5UNtswkPvswydqRHZ7Hevujk+fLPaiM9myvjj+iJiPV2 NlRw== X-Gm-Message-State: AO0yUKUDm6r6DGRaS9IiBgM0tmjHLUF6mJlkz/otlqPZ2RzJy9358+6g 4UJQONwPXR2ZNCBHUulUuKNkrVT8w/E1AeYos8qMCtj57h+FCw== X-Google-Smtp-Source: AK7set/tqOXRygHTUorr2YlFkX2HQUYRsy96c/h5HJ0mZvGRuIBwMrdzyUjDzg9iA1R7gNlUHUKcKSm4pB0RAsMYSz8= X-Received: by 2002:a17:906:c5b:b0:877:e1ef:e49a with SMTP id t27-20020a1709060c5b00b00877e1efe49amr3681244ejf.147.1675484750461; Fri, 03 Feb 2023 20:25:50 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Fri, 3 Feb 2023 20:25:39 -0800 Message-ID: Subject: Re: color To: Ray Andrews Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 28901 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Fri, Feb 3, 2023 at 4:23 PM Ray Andrews 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.