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=-1.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_IMAGE_ONLY_24,HTML_MESSAGE, HTML_SHORT_LINK_IMG_3,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28630 invoked from network); 25 Aug 2023 05:26:03 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 25 Aug 2023 05:26:03 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1692941163; b=s1i73KrNkkHN4nY39SRgvNJsRg1wa0LXclrYELhUzXtxx4YesidRpy4ooI5nxsgdWNCLJnzdpO lpJe4FZEE6XiTBmJe2MTrfCVgzIceN0HOzSEFrU0YAs0BDioc2Bfa9W7h4HtGZzjcMOb0TgBCr mRgaoGi5/O/rZcBDy8JBPBSLxhdWax81o8bMCE+dBUhApzF2LR3C46ysFmoZ69Hzs9PEQZ+JXR EdAgcIexAAoZqgeRic7EFQPN3L5rPZ3XFUZglXpiz86ZkX7iWZGz+rIo0BqYGnxnUrA3OQc+qt 5iHlk9XiUJIPoGXLN+jgq5QhA3dxQlGQOxHr9ipL/J7tJA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yw1-f175.google.com) smtp.remote-ip=209.85.128.175; dkim=pass header.d=gmail.com header.s=20221208 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1692941163; bh=VQsBLk93KbryBEn8nkZ292FMN5LSDmqQiYlqaQP2udk=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=XZBUNFhIXDw2lis60rnjvhyLL/rAefX9ZEuIaTjxvWOwBn02g1EwwULKgtk5iRw5kv3RGELFSt 2ycdiaPNJbK+IrAhBeV+Pg+HjfbZI3xmHpe2WbcR+svr86WichpDTXVgDjF8KNHYXnN3+3W4wf PBuPrecQX2j7e1UnfdE4rmXD2fx93AEn1XQwmH6PCly+lTptpuJRW+6uetdBDcqJno/S9nBEJt 26De58QiW0u7tGS4RfGK8L03EI9/r9AX1WlBeyss9GJ4jcTzvVWenLbnPHCvcWYNKEGMKOMAnf EzeO44rhXxNnmhxB2ABecRSyC2afRc7gpx+LHNCB94jIHQ==; 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:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=/o0lzo85fdlCCkUb7I4vm51NGXPecPH8doXdpn4BL/A=; b=E/ijyNd3OprBDjRl5v8tyjez+v xDjyLsaNgADqbKng6m1DqpXC2HudIhWHi6hszwqQD0Nr0v8ZRGendfKmK/zpXirlBbyR/BM2E4YFx xBsqTiWYk75F4ScZdgIISOVpRS2c/5gjTKv+0lKys7R2TLImygPNiziUZp9z4Tj8bcB6yZ74Y0rcc dZwwTJ3TCMTzTebmM/zwpDAh6LEEhbt2y4WrxZZSYfVnGZsRXlSGl1cHxOomrxmqKchvL6Lmeq74W IHiNjoTuTWtOUbAVK55MJg2NzYewRSEITHgiyyJOGYTY7MXW29q5JU4FntSdFteGXaPE176vCuQlN W+Axb0jg==; Received: by zero.zsh.org with local id 1qZPKc-000N6d-Tg; Fri, 25 Aug 2023 05:26:02 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yw1-f175.google.com) smtp.remote-ip=209.85.128.175; dkim=pass header.d=gmail.com header.s=20221208 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-yw1-f175.google.com ([209.85.128.175]:61836) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qZPJg-000Ml4-1c; Fri, 25 Aug 2023 05:25:05 +0000 Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-59234aaca15so6731207b3.3 for ; Thu, 24 Aug 2023 22:25:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692941102; x=1693545902; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=/o0lzo85fdlCCkUb7I4vm51NGXPecPH8doXdpn4BL/A=; b=Y6nOu4FjWcccrSBtss9j9uNZXE3dEVOomEFPKuPbtzBoFsKnlEqWvymFldUGCqIx7l UfpW3u6zUknAeQSBsr19g9e/mewmbhfTB8fpKJPV7mC7zs06ZABaFOgzZCAj8ssv8SBp QVqkKR+mlvAD7qqsM52M/trLT8JNXPpTCxsPvS7gnidLy1bT4UIFnCIpAEKywjljghtT YO4gakYp2LTvva2AndM81Rii7ygNCOtospGyAWpEc2cidZtT38zYn247UDNGJMdE9IjM gjkRcz/opveJQj/2dsbxC1Gus0lDXmmNLaPWkldTAKENWR1+angHnUsv2srPA/bhyIv+ Ghiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692941102; x=1693545902; h=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=/o0lzo85fdlCCkUb7I4vm51NGXPecPH8doXdpn4BL/A=; b=hXAmR19RiysG4n8RluCtdOqZutkhVWdKZC+nl0OCkGZpUacakimObfgJsEcHN/hAOg Cwpa0DoasEKS2IHwDmRVhDEkAxYJbbCCjl0tc038zbdDO3BOE0inBVKRrQLfW7GrHdS/ KBpLRu1CTXwhqmkTIBQ184ePtuXAQ5znXCpYdbZ18H7y32xNyCjLtf9HWS5ydJhMowbA n17jz+m31CUtSCFiqFekj3BzA62lPEk3uqSubZbt1gG8E4sQErJ+D6HPJOf1fNUm80z2 4pWBfwHOjIlNtISrebXoTN9V5gafv7+gsUQ/PvbHNs4Wo0A9TFXX+bjq51JuVuoCkPyS W1Mw== X-Gm-Message-State: AOJu0Ywm9Uh0+DiMZnA96JUhtGba6kDWWQAMprabXtfq5AekNYi9hlPq u+Wh7AHe4ZY+OxqseL43XDkCP+dk6tPZ75s6OLjcPMDT X-Google-Smtp-Source: AGHT+IHYlgF31PlYzS6kb2r5C9Cd3HzPsDJ5ROXoJOdWGaRBR4Ygmg4dBGYvjW3EMd25Aj1zFUOmVBcd7Ww2FKxi3SA= X-Received: by 2002:a0d:c707:0:b0:577:3c17:5b2c with SMTP id j7-20020a0dc707000000b005773c175b2cmr16959574ywd.27.1692941102089; Thu, 24 Aug 2023 22:25:02 -0700 (PDT) MIME-Version: 1.0 References: <20230823040004.171642-1-syohex@gmail.com> <20230823040004.171642-2-syohex@gmail.com> In-Reply-To: From: Shohei Yoshida Date: Fri, 25 Aug 2023 14:24:51 +0900 Message-ID: Subject: Re: [PATCH 1/4] Update system_profiler completion To: zsh-workers@zsh.org Content-Type: multipart/alternative; boundary="000000000000040b470603b89151" X-Seq: 52092 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: --000000000000040b470603b89151 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Aug 25, 2023 at 1:56=E2=80=AFPM Jun T wrote: > > # TODO: Should this be static? Calling `system_profiler -listDataTypes` > takes > # about 0.07-0.08 secs on my machine. Does this list ever change (betwee= n > # different versions of OS X)? > _data_types=3D( SP{AirPort,Applications,Audio,...(snip)...,WWAN}DataType = ) > # the dynamic alternative is: > #_data_types=3D( ${${(f)"$(_call_program path system_profiler -listDataTy= pes > 2>/dev/null)"}[2,-1]} ) > > At least on macOS Ventura (the latest), "system_profiler -listDataTypes" > gives somewhat different list of data types. And I think the time > required by this command is negligible (I can't notice any delay). > So isn't it better to use the 'dynamic alternative' in the above comment? > I think the dynamic alternative is better if possible. --=20 Shohei YOSHIDA(syohex@gmail.com) --000000000000040b470603b89151 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Aug 25, 2023 at 1:56=E2=80=AF= PM Jun T <takimoto-j@kba= .biglobe.ne.jp> wrote:

# TODO: Should this be static?=C2=A0 Calling `system_profiler -listDataType= s` takes
# about 0.07-0.08 secs on my machine.=C2=A0 Does this list ever change (bet= ween
# different versions of OS X)?
_data_types=3D( SP{AirPort,Applications,Audio,...(snip)...,WWAN}DataType )<= br> # the dynamic alternative is:
#_data_types=3D( ${${(f)"$(_call_program path system_profiler -listDat= aTypes 2>/dev/null)"}[2,-1]} )

At least on macOS Ventura (the latest), "system_profiler -listDataType= s"
gives somewhat different list of data types. And I think the time
required by this command is negligible (I can't notice any delay).
So isn't it better to use the 'dynamic alternative' in the abov= e comment?

I think the dynamic alternative i= s better if possible.

--
Shohei YOSHIDA(s= yohex@gmail.com)
--000000000000040b470603b89151--