summaryrefslogtreecommitdiff
path: root/completions
diff options
context:
space:
mode:
authorAdrian Reber <areber@redhat.com>2019-02-05 16:54:01 +0000
committerAdrian Reber <areber@redhat.com>2019-06-03 22:05:13 +0200
commit7b1ab8a0f4c1dc00e72684e3127ab4a4c1241e73 (patch)
tree3000672f94b69de0b912c548d4b6d794aa54332b /completions
parent2aa3261744b4247996abf3ef552e03a89f77cfb8 (diff)
downloadpodman-7b1ab8a0f4c1dc00e72684e3127ab4a4c1241e73.tar.gz
podman-7b1ab8a0f4c1dc00e72684e3127ab4a4c1241e73.tar.bz2
podman-7b1ab8a0f4c1dc00e72684e3127ab4a4c1241e73.zip
Added bash completion for container migration
Signed-off-by: Adrian Reber <areber@redhat.com>
Diffstat (limited to 'completions')
-rw-r--r--completions/bash/podman24
1 files changed, 22 insertions, 2 deletions
diff --git a/completions/bash/podman b/completions/bash/podman
index 49c8c0e52..4972188aa 100644
--- a/completions/bash/podman
+++ b/completions/bash/podman
@@ -742,6 +742,10 @@ _podman_container_attach() {
}
_podman_container_checkpoint() {
+ local options_with_args="
+ -e
+ --export
+ "
local boolean_options="
-a
--all
@@ -755,9 +759,15 @@ _podman_container_checkpoint() {
--leave-running
--tcp-established
"
+ case "$prev" in
+ -e|--export)
+ _filedir
+ return
+ ;;
+ esac
case "$cur" in
-*)
- COMPREPLY=($(compgen -W "$boolean_options" -- "$cur"))
+ COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur"))
;;
*)
__podman_complete_containers_running
@@ -844,6 +854,10 @@ _podman_container_restart() {
}
_podman_container_restore() {
+ local options_with_args="
+ -i
+ --import
+ "
local boolean_options="
-a
--all
@@ -855,9 +869,15 @@ _podman_container_restore() {
--latest
--tcp-established
"
+ case "$prev" in
+ -i|--import)
+ _filedir
+ return
+ ;;
+ esac
case "$cur" in
-*)
- COMPREPLY=($(compgen -W "$boolean_options" -- "$cur"))
+ COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur"))
;;
*)
__podman_complete_containers_created