aboutsummaryrefslogtreecommitdiff
path: root/completions
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2017-12-15 16:58:36 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2017-12-18 16:46:05 +0000
commit5770dc2640c216525ab84031e3712fcc46b3b087 (patch)
tree8a1c5c4e4a6ce6a35a3767247623a62bfd698f77 /completions
parentde3468e120d489d046c08dad72ba2262e222ccb1 (diff)
downloadpodman-5770dc2640c216525ab84031e3712fcc46b3b087.tar.gz
podman-5770dc2640c216525ab84031e3712fcc46b3b087.tar.bz2
podman-5770dc2640c216525ab84031e3712fcc46b3b087.zip
Rename all references to kpod to podman
The decision is in, kpod is going to be named podman. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #145 Approved by: umohnani8
Diffstat (limited to 'completions')
-rw-r--r--completions/bash/podman (renamed from completions/bash/kpod)397
1 files changed, 195 insertions, 202 deletions
diff --git a/completions/bash/kpod b/completions/bash/podman
index f5caeceb3..9a5351ade 100644
--- a/completions/bash/kpod
+++ b/completions/bash/podman
@@ -2,22 +2,22 @@
: ${PROG:=$(basename ${BASH_SOURCE})}
-__kpod_previous_extglob_setting=$(shopt -p extglob)
+__podman_previous_extglob_setting=$(shopt -p extglob)
shopt -s extglob
-__kpod_q() {
- kpod ${host:+-H "$host"} ${config:+--config "$config"} 2>/dev/null "$@"
+__podman_q() {
+ podman ${host:+-H "$host"} ${config:+--config "$config"} 2>/dev/null "$@"
}
-# __kpod_containers returns a list of containers. Additional options to
-# `kpod ps` may be specified in order to filter the list, e.g.
-# `__kpod_containers --filter status=running`
+# __podman_containers returns a list of containers. Additional options to
+# `podman ps` may be specified in order to filter the list, e.g.
+# `__podman_containers --filter status=running`
# By default, only names are returned.
-# Set KPOD_COMPLETION_SHOW_CONTAINER_IDS=yes to also complete IDs.
+# Set PODMAN_COMPLETION_SHOW_CONTAINER_IDS=yes to also complete IDs.
# An optional first option `--id|--name` may be used to limit the
# output to the IDs or names of matching items. This setting takes
# precedence over the environment setting.
-__kpod_containers() {
+__podman_containers() {
local format
if [ "$1" = "--id" ] ; then
format='{{.ID}}'
@@ -25,58 +25,58 @@ __kpod_containers() {
elif [ "$1" = "--name" ] ; then
format='{{.Names}}'
shift
- elif [ "${KPOD_COMPLETION_SHOW_CONTAINER_IDS}" = yes ] ; then
+ elif [ "${PODMAN_COMPLETION_SHOW_CONTAINER_IDS}" = yes ] ; then
format='{{.ID}} {{.Names}}'
else
format='{{.Names}}'
fi
- __kpod_q ps --format "$format" "$@"
+ __podman_q ps --format "$format" "$@"
}
-# __kpod_complete_containers applies completion of containers based on the current
+# __podman_complete_containers applies completion of containers based on the current
# value of `$cur` or the value of the optional first option `--cur`, if given.
-# Additional filters may be appended, see `__kpod_containers`.
-__kpod_complete_containers() {
+# Additional filters may be appended, see `__podman_containers`.
+__podman_complete_containers() {
local current="$cur"
if [ "$1" = "--cur" ] ; then
current="$2"
shift 2
fi
- COMPREPLY=( $(compgen -W "$(__kpod_containers "$@")" -- "$current") )
+ COMPREPLY=( $(compgen -W "$(__podman_containers "$@")" -- "$current") )
}
-__kpod_complete_containers_all() {
- __kpod_complete_containers "$@" --all
+__podman_complete_containers_all() {
+ __podman_complete_containers "$@" --all
}
-__kpod_complete_containers_running() {
- __kpod_complete_containers "$@" --filter status=running
+__podman_complete_containers_running() {
+ __podman_complete_containers "$@" --filter status=running
}
-__kpod_complete_containers_stopped() {
- __kpod_complete_containers "$@" --filter status=exited
+__podman_complete_containers_stopped() {
+ __podman_complete_containers "$@" --filter status=exited
}
-__kpod_complete_containers_unpauseable() {
- __kpod_complete_containers "$@" --filter status=paused
+__podman_complete_containers_unpauseable() {
+ __podman_complete_containers "$@" --filter status=paused
}
-__kpod_complete_container_names() {
- local containers=( $(__kpod_q ps -aq --no-trunc) )
- local names=( $(__kpod_q inspect --format '{{.Name}}' "${containers[@]}") )
+__podman_complete_container_names() {
+ local containers=( $(__podman_q ps -aq --no-trunc) )
+ local names=( $(__podman_q inspect --format '{{.Name}}' "${containers[@]}") )
names=( "${names[@]#/}" ) # trim off the leading "/" from the container names
COMPREPLY=( $(compgen -W "${names[*]}" -- "$cur") )
}
-__kpod_complete_container_ids() {
- local containers=( $(__kpod_q ps -aq) )
+__podman_complete_container_ids() {
+ local containers=( $(__podman_q ps -aq) )
COMPREPLY=( $(compgen -W "${containers[*]}" -- "$cur") )
}
-__kpod_images() {
+__podman_images() {
local images_args=""
- case "$KPOD_COMPLETION_SHOW_IMAGE_IDS" in
+ case "$PODMAN_COMPLETION_SHOW_IMAGE_IDS" in
all)
images_args="--no-trunc -a"
;;
@@ -86,14 +86,14 @@ __kpod_images() {
esac
local repo_print_command
- if [ "${KPOD_COMPLETION_SHOW_TAGS:-yes}" = "yes" ]; then
+ if [ "${PODMAN_COMPLETION_SHOW_TAGS:-yes}" = "yes" ]; then
repo_print_command='print $1; print $1":"$2'
else
repo_print_command='print $1'
fi
local awk_script
- case "$KPOD_COMPLETION_SHOW_IMAGE_IDS" in
+ case "$PODMAN_COMPLETION_SHOW_IMAGE_IDS" in
all|non-intermediate)
awk_script='NR>1 { print $3; if ($1 != "<none>") { '"$repo_print_command"' } }'
;;
@@ -102,34 +102,34 @@ __kpod_images() {
;;
esac
- __kpod_q images $images_args | awk "$awk_script" | grep -v '<none>$'
+ __podman_q images $images_args | awk "$awk_script" | grep -v '<none>$'
}
-__kpod_complete_images() {
- COMPREPLY=( $(compgen -W "$(__kpod_images)" -- "$cur") )
+__podman_complete_images() {
+ COMPREPLY=( $(compgen -W "$(__podman_images)" -- "$cur") )
__ltrim_colon_completions "$cur"
}
-__kpod_complete_image_repos() {
- local repos="$(__kpod_q images | awk 'NR>1 && $1 != "<none>" { print $1 }')"
+__podman_complete_image_repos() {
+ local repos="$(__podman_q images | awk 'NR>1 && $1 != "<none>" { print $1 }')"
COMPREPLY=( $(compgen -W "$repos" -- "$cur") )
}
-__kpod_complete_image_repos_and_tags() {
- local reposAndTags="$(__kpod_q images | awk 'NR>1 && $1 != "<none>" { print $1; print $1":"$2 }')"
+__podman_complete_image_repos_and_tags() {
+ local reposAndTags="$(__podman_q images | awk 'NR>1 && $1 != "<none>" { print $1; print $1":"$2 }')"
COMPREPLY=( $(compgen -W "$reposAndTags" -- "$cur") )
__ltrim_colon_completions "$cur"
}
-# __kpod_networks returns a list of all networks. Additional options to
-# `kpod network ls` may be specified in order to filter the list, e.g.
-# `__kpod_networks --filter type=custom`
+# __podman_networks returns a list of all networks. Additional options to
+# `podman network ls` may be specified in order to filter the list, e.g.
+# `__podman_networks --filter type=custom`
# By default, only names are returned.
-# Set KPOD_COMPLETION_SHOW_NETWORK_IDS=yes to also complete IDs.
+# Set PODMAN_COMPLETION_SHOW_NETWORK_IDS=yes to also complete IDs.
# An optional first option `--id|--name` may be used to limit the
# output to the IDs or names of matching items. This setting takes
# precedence over the environment setting.
-__kpod_networks() {
+__podman_networks() {
local format
if [ "$1" = "--id" ] ; then
format='{{.ID}}'
@@ -137,50 +137,50 @@ __kpod_networks() {
elif [ "$1" = "--name" ] ; then
format='{{.Name}}'
shift
- elif [ "${KPOD_COMPLETION_SHOW_NETWORK_IDS}" = yes ] ; then
+ elif [ "${PODMAN_COMPLETION_SHOW_NETWORK_IDS}" = yes ] ; then
format='{{.ID}} {{.Name}}'
else
format='{{.Name}}'
fi
- __kpod_q network ls --format "$format" "$@"
+ __podman_q network ls --format "$format" "$@"
}
-# __kpod_complete_networks applies completion of networks based on the current
+# __podman_complete_networks applies completion of networks based on the current
# value of `$cur` or the value of the optional first option `--cur`, if given.
-# Additional filters may be appended, see `__kpod_networks`.
-__kpod_complete_networks() {
+# Additional filters may be appended, see `__podman_networks`.
+__podman_complete_networks() {
local current="$cur"
if [ "$1" = "--cur" ] ; then
current="$2"
shift 2
fi
- COMPREPLY=( $(compgen -W "$(__kpod_networks "$@")" -- "$current") )
+ COMPREPLY=( $(compgen -W "$(__podman_networks "$@")" -- "$current") )
}
-__kpod_complete_containers_in_network() {
- local containers=$(__kpod_q network inspect -f '{{range $i, $c := .Containers}}{{$i}} {{$c.Name}} {{end}}' "$1")
+__podman_complete_containers_in_network() {
+ local containers=$(__podman_q network inspect -f '{{range $i, $c := .Containers}}{{$i}} {{$c.Name}} {{end}}' "$1")
COMPREPLY=( $(compgen -W "$containers" -- "$cur") )
}
-__kpod_runtimes() {
- __kpod_q info | sed -n 's/^Runtimes: \(.*\)/\1/p'
+__podman_runtimes() {
+ __podman_q info | sed -n 's/^Runtimes: \(.*\)/\1/p'
}
-__kpod_complete_runtimes() {
- COMPREPLY=( $(compgen -W "$(__kpod_runtimes)" -- "$cur") )
+__podman_complete_runtimes() {
+ COMPREPLY=( $(compgen -W "$(__podman_runtimes)" -- "$cur") )
}
-# __kpod_services returns a list of all services. Additional options to
-# `kpod service ls` may be specified in order to filter the list, e.g.
-# `__kpod_services --filter name=xxx`
+# __podman_services returns a list of all services. Additional options to
+# `podman service ls` may be specified in order to filter the list, e.g.
+# `__podman_services --filter name=xxx`
# By default, only node names are returned.
-# Set KPOD_COMPLETION_SHOW_SERVICE_IDS=yes to also complete IDs.
+# Set PODMAN_COMPLETION_SHOW_SERVICE_IDS=yes to also complete IDs.
# An optional first option `--id|--name` may be used to limit the
# output to the IDs or names of matching items. This setting takes
# precedence over the environment setting.
-__kpod_services() {
+__podman_services() {
local fields='$2' # default: service name only
- [ "${KPOD_COMPLETION_SHOW_SERVICE_IDS}" = yes ] && fields='$1,$2' # ID & name
+ [ "${PODMAN_COMPLETION_SHOW_SERVICE_IDS}" = yes ] && fields='$1,$2' # ID & name
if [ "$1" = "--id" ] ; then
fields='$1' # IDs only
@@ -189,42 +189,35 @@ __kpod_services() {
fields='$2' # names only
shift
fi
- __kpod_q service ls "$@" | awk "NR>1 {print $fields}"
+ __podman_q service ls "$@" | awk "NR>1 {print $fields}"
}
-# __kpod_complete_services applies completion of services based on the current
+# __podman_complete_services applies completion of services based on the current
# value of `$cur` or the value of the optional first option `--cur`, if given.
-# Additional filters may be appended, see `__kpod_services`.
-__kpod_complete_services() {
+# Additional filters may be appended, see `__podman_services`.
+__podman_complete_services() {
local current="$cur"
if [ "$1" = "--cur" ] ; then
current="$2"
shift 2
fi
- COMPREPLY=( $(compgen -W "$(__kpod_services "$@")" -- "$current") )
+ COMPREPLY=( $(compgen -W "$(__podman_services "$@")" -- "$current") )
}
-# __kpod_append_to_completions appends the word passed as an argument to every
+# __podman_append_to_completions appends the word passed as an argument to every
# word in `$COMPREPLY`.
# Normally you do this with `compgen -S` while generating the completions.
# This function allows you to append a suffix later. It allows you to use
-# the __kpod_complete_XXX functions in cases where you need a suffix.
-__kpod_append_to_completions() {
+# the __podman_complete_XXX functions in cases where you need a suffix.
+__podman_append_to_completions() {
COMPREPLY=( ${COMPREPLY[@]/%/"$1"} )
}
-# __kpod_is_experimental tests whether the currently configured Kpod daemon
-# runs in experimental mode. If so, the function exits with 0 (true).
-# Otherwise, or if the result cannot be determined, the exit value is 1 (false).
-__kpod_is_experimental() {
- [ "$(__kpod_q version -f '{{.Server.Experimental}}')" = "true" ]
-}
-
-# __kpod_pos_first_nonflag finds the position of the first word that is neither
+# __podman_pos_first_nonflag finds the position of the first word that is neither
# option nor an option's argument. If there are options that require arguments,
# you should pass a glob describing those options, e.g. "--option1|-o|--option2"
# Use this function to restrict completions to exact positions after the argument list.
-__kpod_pos_first_nonflag() {
+__podman_pos_first_nonflag() {
local argument_flags=$1
local counter=$((${subcommand_pos:-${command_pos}} + 1))
@@ -255,10 +248,10 @@ __kpod_pos_first_nonflag() {
echo $counter
}
-# __kpod_map_key_of_current_option returns `key` if we are currently completing the
+# __podman_map_key_of_current_option returns `key` if we are currently completing the
# value of a map option (`key=value`) which matches the extglob given as an argument.
# This function is needed for key-specific completions.
-__kpod_map_key_of_current_option() {
+__podman_map_key_of_current_option() {
local glob="$1"
local key glob_pos
@@ -280,12 +273,12 @@ __kpod_map_key_of_current_option() {
[[ ${words[$glob_pos]} == @($glob) ]] && echo "$key"
}
-# __kpod_value_of_option returns the value of the first option matching `option_glob`.
+# __podman_value_of_option returns the value of the first option matching `option_glob`.
# Valid values for `option_glob` are option names like `--log-level` and globs like
# `--log-level|-l`
# Only positions between the command and the current word are considered.
-__kpod_value_of_option() {
- local option_extglob=$(__kpod_to_extglob "$1")
+__podman_value_of_option() {
+ local option_extglob=$(__podman_to_extglob "$1")
local counter=$((command_pos + 1))
while [ $counter -lt $cword ]; do
@@ -299,23 +292,23 @@ __kpod_value_of_option() {
done
}
-# __kpod_to_alternatives transforms a multiline list of strings into a single line
+# __podman_to_alternatives transforms a multiline list of strings into a single line
# string with the words separated by `|`.
-# This is used to prepare arguments to __kpod_pos_first_nonflag().
-__kpod_to_alternatives() {
+# This is used to prepare arguments to __podman_pos_first_nonflag().
+__podman_to_alternatives() {
local parts=( $1 )
local IFS='|'
echo "${parts[*]}"
}
-# __kpod_to_extglob transforms a multiline list of options into an extglob pattern
+# __podman_to_extglob transforms a multiline list of options into an extglob pattern
# suitable for use in case statements.
-__kpod_to_extglob() {
- local extglob=$( __kpod_to_alternatives "$1" )
+__podman_to_extglob() {
+ local extglob=$( __podman_to_alternatives "$1" )
echo "@($extglob)"
}
-# __kpod_subcommands processes subcommands
+# __podman_subcommands processes subcommands
# Locates the first occurrence of any of the subcommands contained in the
# first argument. In case of a match, calls the corresponding completion
# function and returns 0.
@@ -325,16 +318,16 @@ __kpod_to_extglob() {
# TODO if the preceding command has options that accept arguments and an
# argument is equal ot one of the subcommands, this is falsely detected as
# a match.
-__kpod_subcommands() {
+__podman_subcommands() {
local subcommands="$1"
local counter=$(($command_pos + 1))
while [ $counter -lt $cword ]; do
case "${words[$counter]}" in
- $(__kpod_to_extglob "$subcommands") )
+ $(__podman_to_extglob "$subcommands") )
subcommand_pos=$counter
local subcommand=${words[$counter]}
- local completions_func=_kpod_${command}_${subcommand}
+ local completions_func=_podman_${command}_${subcommand}
declare -F $completions_func >/dev/null && $completions_func
return 0
;;
@@ -344,32 +337,32 @@ __kpod_subcommands() {
return 1
}
-# __kpod_nospace suppresses trailing whitespace
-__kpod_nospace() {
+# __podman_nospace suppresses trailing whitespace
+__podman_nospace() {
# compopt is not available in ancient bash versions
type compopt &>/dev/null && compopt -o nospace
}
-__kpod_complete_resolved_hostname() {
+__podman_complete_resolved_hostname() {
command -v host >/dev/null 2>&1 || return
COMPREPLY=( $(host 2>/dev/null "${cur%:}" | awk '/has address/ {print $4}') )
}
-__kpod_local_interfaces() {
+__podman_local_interfaces() {
command -v ip >/dev/null 2>&1 || return
ip addr show scope global 2>/dev/null | sed -n 's| \+inet \([0-9.]\+\).* \([^ ]\+\)|\1 \2|p'
}
-__kpod_complete_local_interfaces() {
+__podman_complete_local_interfaces() {
local additional_interface
if [ "$1" = "--add" ] ; then
additional_interface="$2"
fi
- COMPREPLY=( $( compgen -W "$(__kpod_local_interfaces) $additional_interface" -- "$cur" ) )
+ COMPREPLY=( $( compgen -W "$(__podman_local_interfaces) $additional_interface" -- "$cur" ) )
}
-__kpod_complete_capabilities() {
+__podman_complete_capabilities() {
# The list of capabilities is defined in types.go, ALL was added manually.
COMPREPLY=( $( compgen -W "
ALL
@@ -414,7 +407,7 @@ __kpod_complete_capabilities() {
" -- "$cur" ) )
}
-__kpod_complete_detach-keys() {
+__podman_complete_detach-keys() {
case "$prev" in
--detach-keys)
case "$cur" in
@@ -426,14 +419,14 @@ __kpod_complete_detach-keys() {
;;
esac
- __kpod_nospace
+ __podman_nospace
return
;;
esac
return 1
}
-__kpod_complete_log_drivers() {
+__podman_complete_log_drivers() {
COMPREPLY=( $( compgen -W "
awslogs
etwlogs
@@ -449,7 +442,7 @@ __kpod_complete_log_drivers() {
" -- "$cur" ) )
}
-__kpod_complete_log_options() {
+__podman_complete_log_options() {
# see docs/reference/logging/index.md
local awslogs_options="awslogs-region awslogs-group awslogs-stream"
local fluentd_options="env fluentd-address fluentd-async-connect fluentd-buffer-limit fluentd-retry-wait fluentd-max-retries labels tag"
@@ -463,7 +456,7 @@ __kpod_complete_log_options() {
local all_options="$fluentd_options $gcplogs_options $gelf_options $journald_options $logentries_options $json_file_options $syslog_options $splunk_options"
- case $(__kpod_value_of_option --log-driver) in
+ case $(__podman_value_of_option --log-driver) in
'')
COMPREPLY=( $( compgen -W "$all_options" -S = -- "$cur" ) )
;;
@@ -499,11 +492,11 @@ __kpod_complete_log_options() {
;;
esac
- __kpod_nospace
+ __podman_nospace
}
-__kpod_complete_log_driver_options() {
- local key=$(__kpod_map_key_of_current_option '--log-opt')
+__podman_complete_log_driver_options() {
+ local key=$(__podman_map_key_of_current_option '--log-opt')
case "$key" in
fluentd-async-connect)
COMPREPLY=( $( compgen -W "false true" -- "${cur##*=}" ) )
@@ -511,7 +504,7 @@ __kpod_complete_log_driver_options() {
;;
gelf-address)
COMPREPLY=( $( compgen -W "udp" -S "://" -- "${cur##*=}" ) )
- __kpod_nospace
+ __podman_nospace
return
;;
gelf-compression-level)
@@ -524,7 +517,7 @@ __kpod_complete_log_driver_options() {
;;
syslog-address)
COMPREPLY=( $( compgen -W "tcp:// tcp+tls:// udp:// unix://" -- "${cur##*=}" ) )
- __kpod_nospace
+ __podman_nospace
__ltrim_colon_completions "${cur}"
return
;;
@@ -567,7 +560,7 @@ __kpod_complete_log_driver_options() {
;;
splunk-url)
COMPREPLY=( $( compgen -W "http:// https://" -- "${cur##*=}" ) )
- __kpod_nospace
+ __podman_nospace
__ltrim_colon_completions "${cur}"
return
;;
@@ -583,13 +576,13 @@ __kpod_complete_log_driver_options() {
return 1
}
-__kpod_complete_log_levels() {
+__podman_complete_log_levels() {
COMPREPLY=( $( compgen -W "debug info warn error fatal" -- "$cur" ) )
}
-# __kpod_complete_signals returns a subset of the available signals that is most likely
-# relevant in the context of kpod containers
-__kpod_complete_signals() {
+# __podman_complete_signals returns a subset of the available signals that is most likely
+# relevant in the context of podman containers
+__podman_complete_signals() {
local signals=(
SIGCONT
SIGHUP
@@ -604,27 +597,27 @@ __kpod_complete_signals() {
COMPREPLY=( $( compgen -W "${signals[*]} ${signals[*]#SIG}" -- "$( echo $cur | tr '[:lower:]' '[:upper:]')" ) )
}
-__kpod_complete_user_group() {
+__podman_complete_user_group() {
if [[ $cur == *:* ]] ; then
COMPREPLY=( $(compgen -g -- "${cur#*:}") )
else
COMPREPLY=( $(compgen -u -S : -- "$cur") )
- __kpod_nospace
+ __podman_nospace
fi
}
-__kpod_list_images() {
- COMPREPLY=($(compgen -W "$(kpod images -q)" -- $cur))
+__podman_list_images() {
+ COMPREPLY=($(compgen -W "$(podman images -q)" -- $cur))
}
-__kpod_list_containers() {
- COMPREPLY=($(compgen -W "$(kpod ps -aq)" -- $cur))
+__podman_list_containers() {
+ COMPREPLY=($(compgen -W "$(podman ps -aq)" -- $cur))
}
-__kpod_images() {
+__podman_images() {
local images_args=""
- case "$KPOD_COMPLETION_SHOW_IMAGE_IDS" in
+ case "$PODMAN_COMPLETION_SHOW_IMAGE_IDS" in
all)
images_args="--no-trunc -a"
;;
@@ -634,14 +627,14 @@ __kpod_images() {
esac
local repo_print_command
- if [ "${KPOD_COMPLETION_SHOW_TAGS:-yes}" = "yes" ]; then
+ if [ "${PODMAN_COMPLETION_SHOW_TAGS:-yes}" = "yes" ]; then
repo_print_command='print $1; print $1":"$2'
else
repo_print_command='print $1'
fi
local awk_script
- case "$KPOD_COMPLETION_SHOW_IMAGE_IDS" in
+ case "$PODMAN_COMPLETION_SHOW_IMAGE_IDS" in
all|non-intermediate)
awk_script='NR>1 { print $3; if ($1 != "<none>") { '"$repo_print_command"' } }'
;;
@@ -650,10 +643,10 @@ __kpod_images() {
;;
esac
- __kpod_q images $images_args | awk "$awk_script" | grep -v '<none>$'
+ __podman_q images $images_args | awk "$awk_script" | grep -v '<none>$'
}
-_kpod_attach() {
+_podman_attach() {
local options_with_args="
--detach-keys
"
@@ -664,7 +657,7 @@ _kpod_attach() {
_complete_ "$options_with_args" "$boolean_options"
}
-_kpod_diff() {
+_podman_diff() {
local options_with_args="
--format
"
@@ -677,12 +670,12 @@ _kpod_diff() {
COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur"))
;;
*)
- __kpod_list_images
+ __podman_list_images
;;
esac
}
-_kpod_exec() {
+_podman_exec() {
local options_with_args="
-e
--env
@@ -697,7 +690,7 @@ _kpod_exec() {
_complete_ "$options_with_args" "$boolean_options"
}
-_kpod_export() {
+_podman_export() {
local options_with_args="
--output
-o
@@ -711,12 +704,12 @@ _kpod_export() {
COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur"))
;;
*)
- __kpod_list_images
+ __podman_list_images
;;
esac
}
-_kpod_history() {
+_podman_history() {
local options_with_args="
--format
"
@@ -732,13 +725,13 @@ _kpod_history() {
COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur"))
;;
*)
- __kpod_list_images
+ __podman_list_images
;;
esac
}
-_kpod_import() {
+_podman_import() {
local options_with_args="
--change
-c
@@ -756,12 +749,12 @@ _kpod_import() {
COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur"))
;;
*)
- __kpod_list_images
+ __podman_list_images
;;
esac
}
-_kpod_info() {
+_podman_info() {
local boolean_options="
--help
-h
@@ -778,12 +771,12 @@ _kpod_info() {
COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur"))
;;
*)
- __kpod_list_images
+ __podman_list_images
;;
esac
}
-_kpod_images() {
+_podman_images() {
local boolean_options="
--help
-h
@@ -809,7 +802,7 @@ _kpod_images() {
esac
}
-_kpod_inspect() {
+_podman_inspect() {
local boolean_options="
--help
-h
@@ -830,7 +823,7 @@ _kpod_inspect() {
;;
esac
}
-_kpod_kill() {
+_podman_kill() {
local options_with_args="
--signal -s
"
@@ -840,7 +833,7 @@ _kpod_kill() {
_complete_ "$options_with_args" "$boolean_options"
}
-_kpod_logs() {
+_podman_logs() {
local options_with_args="
--since
--tail
@@ -856,12 +849,12 @@ _kpod_logs() {
COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur"))
;;
*)
- __kpod_list_containers
+ __podman_list_containers
;;
esac
}
-_kpod_pull() {
+_podman_pull() {
local options_with_args="
--authfile
--creds
@@ -877,11 +870,11 @@ _kpod_pull() {
_complete_ "$options_with_args" "$boolean_options"
}
-_kpod_unmount() {
- _kpod_umount $@
+_podman_unmount() {
+ _podman_umount $@
}
-_kpod_umount() {
+_podman_umount() {
local boolean_options="
--help
-h
@@ -898,7 +891,7 @@ _kpod_umount() {
esac
}
-_kpod_mount() {
+_podman_mount() {
local boolean_options="
--help
-h
@@ -919,7 +912,7 @@ _kpod_mount() {
esac
}
-_kpod_push() {
+_podman_push() {
local boolean_options="
--compress
--quiet
@@ -946,7 +939,7 @@ _kpod_push() {
esac
}
-_kpod_container_run() {
+_podman_container_run() {
local options_with_args="
--add-host
--attach -a
@@ -1043,21 +1036,21 @@ _kpod_container_run() {
--rm
--sig-proxy=false
"
- __kpod_complete_detach-keys && return
+ __podman_complete_detach-keys && return
fi
local all_options="$options_with_args $boolean_options"
- __kpod_complete_log_driver_options && return
+ __podman_complete_log_driver_options && return
- local key=$(__kpod_map_key_of_current_option '--security-opt')
+ local key=$(__podman_map_key_of_current_option '--security-opt')
case "$key" in
label)
[[ $cur == *: ]] && return
COMPREPLY=( $( compgen -W "user: role: type: level: disable" -- "${cur##*=}") )
if [ "${COMPREPLY[*]}" != "disable" ] ; then
- __kpod_nospace
+ __podman_nospace
fi
return
;;
@@ -1073,7 +1066,7 @@ _kpod_container_run() {
--add-host)
case "$cur" in
*:)
- __kpod_complete_resolved_hostname
+ __podman_complete_resolved_hostname
return
;;
esac
@@ -1083,7 +1076,7 @@ _kpod_container_run() {
return
;;
--cap-add|--cap-drop)
- __kpod_complete_capabilities
+ __podman_complete_capabilities
return
;;
--cidfile|--env-file|--init-path|--label-file)
@@ -1097,11 +1090,11 @@ _kpod_container_run() {
;;
'')
COMPREPLY=( $( compgen -W '/' -- "$cur" ) )
- __kpod_nospace
+ __podman_nospace
;;
/*)
_filedir
- __kpod_nospace
+ __podman_nospace
;;
esac
return
@@ -1109,41 +1102,41 @@ _kpod_container_run() {
--env|-e)
# we do not append a "=" here because "-e VARNAME" is legal systax, too
COMPREPLY=( $( compgen -e -- "$cur" ) )
- __kpod_nospace
+ __podman_nospace
return
;;
--ipc)
case "$cur" in
*:*)
cur="${cur#*:}"
- __kpod_complete_containers_running
+ __podman_complete_containers_running
;;
*)
COMPREPLY=( $( compgen -W 'host container:' -- "$cur" ) )
if [ "$COMPREPLY" = "container:" ]; then
- __kpod_nospace
+ __podman_nospace
fi
;;
esac
return
;;
--log-driver)
- __kpod_complete_log_drivers
+ __podman_complete_log_drivers
return
;;
--log-opt)
- __kpod_complete_log_options
+ __podman_complete_log_options
return
;;
--network)
case "$cur" in
container:*)
- __kpod_complete_containers_all --cur "${cur#*:}"
+ __podman_complete_containers_all --cur "${cur#*:}"
;;
*)
- COMPREPLY=( $( compgen -W "$(__kpod_plugins_bundled --type Network) $(__kpod_networks) container:" -- "$cur") )
+ COMPREPLY=( $( compgen -W "$(__podman_plugins_bundled --type Network) $(__podman_networks) container:" -- "$cur") )
if [ "${COMPREPLY[*]}" = "container:" ] ; then
- __kpod_nospace
+ __podman_nospace
fi
;;
esac
@@ -1152,35 +1145,35 @@ _kpod_container_run() {
--pid)
case "$cur" in
*:*)
- __kpod_complete_containers_running --cur "${cur#*:}"
+ __podman_complete_containers_running --cur "${cur#*:}"
;;
*)
COMPREPLY=( $( compgen -W 'host container:' -- "$cur" ) )
if [ "$COMPREPLY" = "container:" ]; then
- __kpod_nospace
+ __podman_nospace
fi
;;
esac
return
;;
--runtime)
- __kpod_complete_runtimes
+ __podman_complete_runtimes
return
;;
--security-opt)
COMPREPLY=( $( compgen -W "apparmor= label= no-new-privileges seccomp=" -- "$cur") )
if [ "${COMPREPLY[*]}" != "no-new-privileges" ] ; then
- __kpod_nospace
+ __podman_nospace
fi
return
;;
--storage-opt)
COMPREPLY=( $( compgen -W "size" -S = -- "$cur") )
- __kpod_nospace
+ __podman_nospace
return
;;
--user|-u)
- __kpod_complete_user_group
+ __podman_complete_user_group
return
;;
--userns)
@@ -1188,10 +1181,10 @@ _kpod_container_run() {
return
;;
--volumes-from)
- __kpod_complete_containers_all
+ __podman_complete_containers_all
return
;;
- $(__kpod_to_extglob "$options_with_args") )
+ $(__podman_to_extglob "$options_with_args") )
return
;;
esac
@@ -1201,23 +1194,23 @@ _kpod_container_run() {
COMPREPLY=( $( compgen -W "$all_options" -- "$cur" ) )
;;
*)
- local counter=$( __kpod_pos_first_nonflag $( __kpod_to_alternatives "$options_with_args" ) )
+ local counter=$( __podman_pos_first_nonflag $( __podman_to_alternatives "$options_with_args" ) )
if [ $cword -eq $counter ]; then
- __kpod_complete_images
+ __podman_complete_images
fi
;;
esac
}
-_kpod_create() {
- _kpod_container_run
+_podman_create() {
+ _podman_container_run
}
-_kpod_run() {
- _kpod_container_run
+_podman_run() {
+ _podman_container_run
}
-_kpod_rm() {
+_podman_rm() {
local boolean_options="
--all
-a
@@ -1235,12 +1228,12 @@ _kpod_rm() {
COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur"))
;;
*)
- __kpod_list_containers
+ __podman_list_containers
;;
esac
}
-_kpod_rmi() {
+_podman_rmi() {
local boolean_options="
--help
-h
@@ -1255,12 +1248,12 @@ _kpod_rmi() {
COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur"))
;;
*)
- __kpod_list_images
+ __podman_list_images
;;
esac
}
-_kpod_stats() {
+_podman_stats() {
local boolean_options="
--help
--all
@@ -1275,12 +1268,12 @@ _kpod_stats() {
COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur"))
;;
*)
- __kpod_list_containers
+ __podman_list_containers
;;
esac
}
-kpod_tag() {
+podman_tag() {
local options_with_args="
"
local boolean_options="
@@ -1288,7 +1281,7 @@ kpod_tag() {
_complete_ "$options_with_args" "$boolean_options"
}
-kpod_top() {
+podman_top() {
local options_with_args="
"
local boolean_options="
@@ -1296,7 +1289,7 @@ kpod_top() {
_complete_ "$options_with_args" "$boolean_options"
}
-_kpod_version() {
+_podman_version() {
local options_with_args="
"
local boolean_options="
@@ -1304,7 +1297,7 @@ _kpod_version() {
_complete_ "$options_with_args" "$boolean_options"
}
-_kpod_save() {
+_podman_save() {
local options_with_args="
--output -o
--format
@@ -1316,7 +1309,7 @@ _kpod_save() {
_complete_ "$options_with_args" "$boolean_options"
}
-_kpod_export() {
+_podman_export() {
local options_with_args="
--output -o
"
@@ -1325,7 +1318,7 @@ _kpod_export() {
_complete_ "$options_with_args" "$boolean_options"
}
-_kpod_pause() {
+_podman_pause() {
local options_with_args="
--help -h
"
@@ -1333,7 +1326,7 @@ _kpod_pause() {
_complete_ "$options_with_args" "$boolean_options"
}
-_kpod_ps() {
+_podman_ps() {
local options_with_args="
--filter -f
--format
@@ -1350,7 +1343,7 @@ _kpod_ps() {
_complete_ "$options_with_args" "$boolean_options"
}
-_kpod_start() {
+_podman_start() {
local options_with_args="
--detach-keys
"
@@ -1364,7 +1357,7 @@ _kpod_start() {
--interactive"
_complete_ "$options_with_args" "$boolean_options"
}
-_kpod_stop() {
+_podman_stop() {
local options_with_args="
--timeout -t
"
@@ -1374,7 +1367,7 @@ _kpod_stop() {
_complete_ "$options_with_args" "$boolean_options"
}
-_kpod_unpause() {
+_podman_unpause() {
local options_with_args="
--help -h
"
@@ -1382,7 +1375,7 @@ _kpod_unpause() {
_complete_ "$options_with_args" "$boolean_options"
}
-_kpod_wait() {
+_podman_wait() {
local options_with_args=""
local boolean_options="--help -h"
_complete_ "$options_with_args" "$boolean_options"
@@ -1405,7 +1398,7 @@ _complete_() {
esac
}
-_kpod_load() {
+_podman_load() {
local options_with_args="
--input -i
--signature-policy
@@ -1416,7 +1409,7 @@ _kpod_load() {
_complete_ "$options_with_args" "$boolean_options"
}
-_kpod_login() {
+_podman_login() {
local options_with_args="
--username
-u
@@ -1431,7 +1424,7 @@ _kpod_login() {
_complete_ "$options_with_args" "$boolean_options"
}
-_kpod_logout() {
+_podman_logout() {
local options_with_args="
--authfile
"
@@ -1444,7 +1437,7 @@ _kpod_logout() {
_complete_ "$options_with_args" "$boolean_options"
}
-_kpod_kpod() {
+_podman_podman() {
local options_with_args="
--config -c
--cpu-profile
@@ -1536,7 +1529,7 @@ _cli_bash_autocomplete() {
(( counter++ ))
done
- local completions_func=_kpod_${command}
+ local completions_func=_podman_${command}
declare -F $completions_func >/dev/null && $completions_func
eval "$previous_extglob_setting"