Merge pull request #7611 from rhatdan/completions

Fix completions for namespaces
This commit is contained in:
OpenShift Merge Robot
2020-09-14 04:37:09 -04:00
committed by GitHub

View File

@ -2315,7 +2315,7 @@ _podman_container_run() {
__podman_complete_containers_running __podman_complete_containers_running
;; ;;
*) *)
COMPREPLY=( $( compgen -W 'host container:' -- "$cur" ) ) COMPREPLY=( $( compgen -W 'host private container:' -- "$cur" ) )
if [ "$COMPREPLY" = "container:" ]; then if [ "$COMPREPLY" = "container:" ]; then
__podman_nospace __podman_nospace
fi fi
@ -2337,7 +2337,7 @@ _podman_container_run() {
__podman_complete_containers_all --cur "${cur#*:}" __podman_complete_containers_all --cur "${cur#*:}"
;; ;;
*) *)
COMPREPLY=( $( compgen -W "$(__podman_plugins_bundled --type Network) $(__podman_networks) container:" -- "$cur") ) COMPREPLY=( $(compgen -W "bridge none host ns: private slirp4netns $(__podman_networks) container:" -- "$cur"))
if [ "${COMPREPLY[*]}" = "container:" ] ; then if [ "${COMPREPLY[*]}" = "container:" ] ; then
__podman_nospace __podman_nospace
fi fi
@ -2355,7 +2355,7 @@ _podman_container_run() {
__podman_complete_containers_running --cur "${cur#*:}" __podman_complete_containers_running --cur "${cur#*:}"
;; ;;
*) *)
COMPREPLY=( $( compgen -W 'host container:' -- "$cur" ) ) COMPREPLY=( $( compgen -W 'host container: private' -- "$cur" ) )
if [ "$COMPREPLY" = "container:" ]; then if [ "$COMPREPLY" = "container:" ]; then
__podman_nospace __podman_nospace
fi fi
@ -2384,7 +2384,7 @@ _podman_container_run() {
return return
;; ;;
--userns) --userns)
COMPREPLY=( $( compgen -W "host" -- "$cur" ) ) COMPREPLY=( $( compgen -W "auto container: host keep-id ns: private" -- "$cur" ) )
return return
;; ;;
--volumes-from) --volumes-from)