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>
This commit is contained in:
Denis Pynkin 2019-11-01 03:00:13 +03:00
parent 0c89055b19
commit e9b1ebfc11

View File

@ -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
"