diff options
| author | Score_Under <seejay.11@gmail.com> | 2021-02-04 12:12:08 +0000 |
|---|---|---|
| committer | Score_Under <seejay.11@gmail.com> | 2021-02-04 13:20:36 +0000 |
| commit | c90c27f8fc86cbe361a4b3a5ffcaadebc16337b0 (patch) | |
| tree | e08fcd56e698b1db0539e2696ed77df4243ce42b /src/_gpgconf | |
| parent | Merge pull request #777 from dancek/patch-1 (diff) | |
| download | zsh-completions-c90c27f8fc86cbe361a4b3a5ffcaadebc16337b0.tar zsh-completions-c90c27f8fc86cbe361a4b3a5ffcaadebc16337b0.tar.gz zsh-completions-c90c27f8fc86cbe361a4b3a5ffcaadebc16337b0.tar.bz2 zsh-completions-c90c27f8fc86cbe361a4b3a5ffcaadebc16337b0.tar.lz zsh-completions-c90c27f8fc86cbe361a4b3a5ffcaadebc16337b0.tar.xz zsh-completions-c90c27f8fc86cbe361a4b3a5ffcaadebc16337b0.tar.zst zsh-completions-c90c27f8fc86cbe361a4b3a5ffcaadebc16337b0.zip | |
Add completion for gpgconf
Diffstat (limited to 'src/_gpgconf')
| -rw-r--r-- | src/_gpgconf | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/_gpgconf b/src/_gpgconf new file mode 100644 index 0000000..6909db9 --- /dev/null +++ b/src/_gpgconf @@ -0,0 +1,44 @@ +#compdef gpgconf +# Description: +# Completions for gpgconf (configuration utility provided with GnuPG +# <https://gnupg.org>) +# +# Authors: +# * "score" <seejay.11@gmail.com> https://keybase.io/score_under + +_gpgconf_component() { + local values=( + "${(@f)$(gpgconf --list-components \ + | perl -lne 'my ($name, $desc, $x) = split /:/; print "${name}[$desc]"')}" + ) + if [ "${action[2]}" = all ]; then + values+=('all[All daemon components]') + fi + + _values 'component' "${(o)values[@]}" +} + +_arguments \ + '--help[print help text]' \ + '--list-components[list all components]' \ + '--check-programs[check all programs]' \ + '--apply-defaults[apply global default values]' \ + '--list-dirs[get the configuration directories for gpgconf]' \ + '--list-config[list global configuration file]' \ + '--check-config[check global configuration file]' \ + '--query-swdb[query the software version database]' \ + '--reload[reload all or a given component]:component:_gpgconf_component all' \ + '--launch[launch a given component]:component:_gpgconf_component all' \ + '--kill[kill a given component]:component:_gpgconf_component all' \ + '--create-socketdir[create a directory for sockets below /run/user or /var/run/user]' \ + '--remove-socketdir[remove a directory created with command --create-socketdir]' \ + '--list-options[list options]:component:_gpgconf_component' \ + '--change-options[change options]:component:_gpgconf_component' \ + '--check-options[check options]:component:_gpgconf_component' \ + '--apply-profile[update configuration files using the specified file]:configuration file:_path_files' \ + '--status-fd[write status info to the specified file descriptor]:file descriptor' \ + '(-o --output)'{-o,--output}'[write output to the specified file]:output file:_path_files' \ + '(-v --verbose)'{-v,--verbose}'[verbose]' \ + '(-q --quiet)'{-q,--quiet}'[quiet]' \ + '(-n --dry-run)'{-n,--dry-run}'[do not make any changes]' \ + '(-r --runtime)'{-r,--runtime}'[activate changes at runtime, if possible]' |
