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

Re: [PATCH 1/4] Update system_profiler completion



attached fixed version.

On Fri, Aug 25, 2023 at 2:24 PM Shohei Yoshida <syohex@xxxxxxxxx> wrote:


On Fri, Aug 25, 2023 at 1:56 PM Jun T <takimoto-j@xxxxxxxxxxxxxxxxx> 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 (between
# different versions of OS X)?
_data_types=( SP{AirPort,Applications,Audio,...(snip)...,WWAN}DataType )
# the dynamic alternative is:
#_data_types=( ${${(f)"$(_call_program path system_profiler -listDataTypes 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.

--
Shohei YOSHIDA(syohex@xxxxxxxxx)


--
Shohei YOSHIDA(syohex@xxxxxxxxx)

Attachment: 0001-Update-system_profiler-completion.patch
Description: Binary data



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