diff options
Diffstat (limited to 'completions/bash/podman')
-rw-r--r-- | completions/bash/podman | 44 |
1 files changed, 37 insertions, 7 deletions
diff --git a/completions/bash/podman b/completions/bash/podman index e6ffb135f..041703810 100644 --- a/completions/bash/podman +++ b/completions/bash/podman @@ -1,3 +1,7 @@ +# +# This bash script was originally copied and converted from the upstream +# github.com:docker/docker project +# : ${PROG:=$(basename ${BASH_SOURCE})} @@ -952,6 +956,7 @@ _podman_network() { -h " subcommands=" + create inspect ls rm @@ -968,6 +973,27 @@ _podman_network() { esac } +_podman_network_create() { + local options_with_args=" + -d + --driver + --gateway + --ip-range + --subnet + " + local boolean_options=" + --help + -h + --internal + " + _complete_ "$options_with_args" "$boolean_options" + + case "$cur" in + -*) + COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) + ;; + esac +} _podman_network_inspect() { local options_with_args=" " @@ -1002,7 +1028,7 @@ _podman_network_ls() { esac } -_podman_network_ls() { +_podman_network_rm() { local options_with_args=" " local boolean_options=" @@ -1390,20 +1416,24 @@ _podman_import() { --quiet -q " - _complete_ "$options_with_args" "$boolean_options" + case "$prev" in + --change|-c|--message|-m) + return + ;; + esac case "$cur" in -*) COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) ;; *) - local counter=$( __podman_pos_first_nonflag "$options_with_args" ) - if [ "$cword" -eq "$((counter))" ]; then - __podman_complete_images --repo --tag - return - else + local counter=$(__podman_pos_first_nonflag '--change|-c|--message|-m') + if [ "$cword" -eq "$counter" ]; then _filedir return + elif [ "$cword" -eq "$((counter + 1))" ]; then + __podman_complete_images --repo --tag + return fi ;; esac |