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

Re: [PATCH 4/4] Update open completion

Attached updated open completion patch

On Sat, Aug 26, 2023 at 1:08 AM Jun. T <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:

> 2023/08/23 13:00, Shohei YOSHIDA <syohex@xxxxxxxxx> wrote:

> +    '*--env[add the environment variable of the launched application]:env value' \

You can complete parameter names by using _parameters
(although it may not be so useful here).

To complete only exported parameters:
_parameters -g "*export*"
See the description of _parameters in 'man zshcompsys'.

# -g "*export*" may be too restrictive, but I feel it is enough.

The manpage (for _parameters) also says:
'All other arguments are passed to the compadd builtin.'
So you can pass the options -qS= to compadd by:

'*--env[add variable to the environment of the launched application]:environment variable:_parameters -g "*export*" -qS='

# -qS= is to add a '=' after the parameter name, but remove
# the '=' if user types a space.

Could you please post the revised versions of _system_profiler,
_sw_vers, _otool and _open?

Shohei YOSHIDA(syohex@xxxxxxxxx)

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

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