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

Re: PATCH: update completions for some common Unix commands



Oliver Kiddle wrote on Fri, May 01, 2015 at 11:58:29 +0200:
> diff --git a/Completion/BSD/Type/_jails b/Completion/BSD/Type/_jails
> new file mode 100644
> index 0000000..36bffec
> --- /dev/null
> +++ b/Completion/BSD/Type/_jails
> @@ -0,0 +1,5 @@
> +#autoload
> +
> +jails=( ${${${${(f)"$(_call_program jails jls -n)"}##*jid=}/ name=/:}%% *} )
> +
> +_describe -t jails jail jails "$@"

Maybe use 'jls jid name' so as to not rely on 'jid' and 'name' being
consecutive in the output of 'jls -n'?

Should jail names be offered as completions, rather than just as
descriptions?  I think most jail-related commands commands accept either
jname or jid to identify a jail.



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