diff options
Diffstat (limited to 'completions/bash/podman')
-rw-r--r-- | completions/bash/podman | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/completions/bash/podman b/completions/bash/podman index e8185235b..a83cfc790 100644 --- a/completions/bash/podman +++ b/completions/bash/podman @@ -404,6 +404,16 @@ __podman_local_interfaces() { ip addr show scope global 2>/dev/null | sed -n 's| \+inet \([0-9.]\+\).* \([^ ]\+\)|\1 \2|p' } +__podman_complete_restart() { + case "$prev" in + --restart) + COMPREPLY=( $( compgen -W "always no on-failure" -- "$cur") ) + return + ;; + esac + return 1 +} + __podman_complete_local_interfaces() { local additional_interface if [ "$1" = "--add" ] ; then @@ -2178,6 +2188,7 @@ _podman_container_run() { --preserve-fds --publish -p --pull + --restart --runtime --rootfs --security-opt @@ -2232,6 +2243,7 @@ _podman_container_run() { --sig-proxy=false " __podman_complete_detach_keys && return + __podman_complete_restart && return fi case "$cur" in @@ -2315,7 +2327,7 @@ _podman_container_run() { __podman_complete_containers_running ;; *) - COMPREPLY=( $( compgen -W 'host container:' -- "$cur" ) ) + COMPREPLY=( $( compgen -W 'host private container:' -- "$cur" ) ) if [ "$COMPREPLY" = "container:" ]; then __podman_nospace fi @@ -2337,7 +2349,7 @@ _podman_container_run() { __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 __podman_nospace fi @@ -2355,7 +2367,7 @@ _podman_container_run() { __podman_complete_containers_running --cur "${cur#*:}" ;; *) - COMPREPLY=( $( compgen -W 'host container:' -- "$cur" ) ) + COMPREPLY=( $( compgen -W 'host container: private' -- "$cur" ) ) if [ "$COMPREPLY" = "container:" ]; then __podman_nospace fi @@ -2384,7 +2396,7 @@ _podman_container_run() { return ;; --userns) - COMPREPLY=( $( compgen -W "host" -- "$cur" ) ) + COMPREPLY=( $( compgen -W "auto container: host keep-id ns: private" -- "$cur" ) ) return ;; --volumes-from) |