diff options
author | Denis Pynkin <denis.pynkin@collabora.com> | 2019-11-01 03:00:13 +0300 |
---|---|---|
committer | Denis Pynkin <denis.pynkin@collabora.com> | 2020-03-25 15:23:54 +0300 |
commit | e9b1ebfc1152ca49106021a08865da89acfc1512 (patch) | |
tree | 97f382ce8ca02bc1f6ec9d81c01deb369affdb73 /bash | |
parent | 0c89055b191a0dd90489418402a51c20e5f1f935 (diff) | |
download | ostree-e9b1ebfc1152ca49106021a08865da89acfc1512.tar.gz |
bash-completion: add completion for `ostree sign`
Add bash completion with supported options for signing command.
Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
Diffstat (limited to 'bash')
-rw-r--r-- | bash/ostree | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/bash/ostree b/bash/ostree index 4aec588b..7256e40a 100644 --- a/bash/ostree +++ b/bash/ostree @@ -1484,6 +1484,48 @@ _ostree_show() { return 0 } +_ostree_sign() { + local boolean_options=" + $main_boolean_options + --delete -d + --verify -v + " + + local options_with_args=" + --sign-type + --keys-file + --keys-dir + --repo + " + + local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" ) + + case "$prev" in + --keys-file|--keys-dir|--repo) + __ostree_compreply_dirs_only + return 0 + ;; + $options_with_args_glob ) + return 0 + ;; + esac + + case "$cur" in + -*) + local all_options="$boolean_options $options_with_args" + __ostree_compreply_all_options + ;; + *) + local argpos=$( __ostree_pos_first_nonflag $( __ostree_to_alternatives "$options_with_args" ) ) + + if [ $cword -eq $argpos ]; then + __ostree_compreply_commits + fi + esac + + return 0 +} + _ostree_static_delta_apply_offline() { local boolean_options=" $main_boolean_options @@ -1747,6 +1789,7 @@ _ostree() { reset rev-parse show + sign static-delta summary " |