summaryrefslogtreecommitdiff
path: root/completions
diff options
context:
space:
mode:
authorAdrian Reber <areber@redhat.com>2018-09-20 18:02:01 +0000
committerAdrian Reber <adrian@lisas.de>2018-10-03 21:41:40 +0200
commitdc987af0b0146ec5fd2026ca8db403806c3425df (patch)
tree0a414aaeef16309ea7b197611adb5e327d7160f1 /completions
parent5246238e7efbf9280e07f45df9ee14ecc3404f20 (diff)
downloadpodman-dc987af0b0146ec5fd2026ca8db403806c3425df.tar.gz
podman-dc987af0b0146ec5fd2026ca8db403806c3425df.tar.bz2
podman-dc987af0b0146ec5fd2026ca8db403806c3425df.zip
completions: add checkpoint/restore completions
Signed-off-by: Adrian Reber <areber@redhat.com>
Diffstat (limited to 'completions')
-rw-r--r--completions/bash/podman42
1 files changed, 42 insertions, 0 deletions
diff --git a/completions/bash/podman b/completions/bash/podman
index f63bf4469..604a25f5d 100644
--- a/completions/bash/podman
+++ b/completions/bash/podman
@@ -87,6 +87,10 @@ __podman_complete_containers_all() {
__podman_complete_containers "$@" --all
}
+__podman_complete_containers_created() {
+ __podman_complete_containers "$@" --all --filter status=created
+}
+
__podman_complete_containers_running() {
__podman_complete_containers "$@" --filter status=running
}
@@ -710,6 +714,24 @@ _podman_container_attach() {
_podman_attach
}
+_podman_container_checkpoint() {
+ local options_with_args="
+ --help -h
+ "
+ local boolean_options="
+ --keep
+ -k
+ "
+ case "$cur" in
+ -*)
+ COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur"))
+ ;;
+ *)
+ __podman_complete_containers_running
+ ;;
+ esac
+}
+
_podman_container_commit() {
_podman_commit
}
@@ -770,6 +792,24 @@ _podman_container_restart() {
_podman_restart
}
+_podman_container_restore() {
+ local options_with_args="
+ --help -h
+ "
+ local boolean_options="
+ --keep
+ -k
+ "
+ case "$cur" in
+ -*)
+ COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur"))
+ ;;
+ *)
+ __podman_complete_containers_created
+ ;;
+ esac
+}
+
_podman_container_rm() {
_podman_rm
}
@@ -817,6 +857,7 @@ _podman_container() {
"
subcommands="
attach
+ checkpoint
commit
create
diff
@@ -831,6 +872,7 @@ _podman_container() {
port
refresh
restart
+ restore
rm
run
start