From c18ad2bfd9034fe6b80e3f33c076af731be6778b Mon Sep 17 00:00:00 2001 From: baude Date: Thu, 18 Apr 2019 16:21:31 -0500 Subject: Generate systemd unit files for containers the podman generate systemd command will generate a systemd unit file based on the attributes of an existing container and user inputs. the command outputs the unit file to stdout for the user to copy or redirect. it is enabled for the remote client as well. users can set a restart policy as well as define a stop timeout override for the container. Signed-off-by: baude --- completions/bash/podman | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'completions/bash/podman') diff --git a/completions/bash/podman b/completions/bash/podman index a02a47190..e3c0c1dbf 100644 --- a/completions/bash/podman +++ b/completions/bash/podman @@ -919,6 +919,7 @@ _podman_generate() { " subcommands=" kube + systemd " __podman_subcommands "$subcommands $aliases" && return @@ -2460,6 +2461,32 @@ _podman_generate_kube() { esac } +_podman_generate_systemd() { + local options_with_args=" + --restart-policy + -t + --timeout" + + local boolean_options=" + -h + --help + -n + --name + " + + case "$cur" in + -*) + COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur")) + ;; + *) + COMPREPLY=( $( compgen -W " + $(__podman_containers --all) + " -- "$cur" ) ) + __ltrim_colon_completions "$cur" + ;; + esac +} + _podman_play_kube() { local options_with_args=" --authfile -- cgit v1.2.3-54-g00ecf