index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Levente Polyak <anthraxx@archlinux.org> | 2023-04-14 18:30:10 +0200 |
---|---|---|
committer | Levente Polyak <anthraxx@archlinux.org> | 2023-05-20 00:08:12 +0200 |
commit | e1142935e508ac1f70ec3c074655124056dc7666 (patch) | |
tree | fc89d7354988cd951a04fd003d7223872e05264e | |
parent | bc182032eb4a1cbae573c9f09bdd9f8338b20d23 (diff) |
-rw-r--r-- | contrib/completion/zsh/_devtools.in | 13 |
diff --git a/contrib/completion/zsh/_devtools.in b/contrib/completion/zsh/_devtools.in index e782fba..cc8d5cf 100644 --- a/contrib/completion/zsh/_devtools.in +++ b/contrib/completion/zsh/_devtools.in @@ -233,6 +233,10 @@ _pkgctl_cmds=( "repo[Manage Git packaging repositories and their configuration]" ) +_pkgctl_args=( + '(-h --help)'{-h,--help}'[Display usage]' +) + _pkgctl_diff_args=("${_diffpkg_args[@]}") _handle_subcommands() { @@ -243,8 +247,13 @@ _handle_subcommands() { '*::arg:->args' case $state in cmds) - local service_cmds=${service_name}_cmds[@] - _values "${(P)service_cmds}" + if [[ "${line[-1]}" == -* ]] && typeset -p ${service_name}_args &> /dev/null; then + local argname="${service_name}_args[@]" + _arguments -s "${(P)argname}" + else + local service_cmds=${service_name}_cmds[@] + _values "${(P)service_cmds}" + fi ;; args) local service_sub=${service_name}_$line[1] |