bashcompletion enhancements

* now all podman subcommands can be completed
* images can be completed when run as root (not sudo)
* bug corrected that made podman_top and podman_tag

Signed-off-by: baude <bbaude@redhat.com>

Closes: #716
Approved by: mheon
This commit is contained in:
baude 2018-05-02 15:01:27 -05:00 committed by Atomic Bot
parent 9fc85522fb
commit 5ae940a574
1 changed files with 4 additions and 4 deletions

View File

@ -1360,7 +1360,7 @@ _podman_rmi() {
COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur"))
;; ;;
*) *)
__podman_list_images __podman_complete_images --id
;; ;;
esac esac
} }
@ -1385,7 +1385,7 @@ _podman_stats() {
esac esac
} }
podman_tag() { _podman_tag() {
local options_with_args=" local options_with_args="
" "
local boolean_options=" local boolean_options="
@ -1393,7 +1393,7 @@ podman_tag() {
_complete_ "$options_with_args" "$boolean_options" _complete_ "$options_with_args" "$boolean_options"
} }
podman_top() { _podman_top() {
local options_with_args=" local options_with_args="
" "
local boolean_options=" local boolean_options="
@ -1690,4 +1690,4 @@ _cli_bash_autocomplete() {
return 0 return 0
} }
complete -F _cli_bash_autocomplete $PROG complete -F _cli_bash_autocomplete podman