summaryrefslogtreecommitdiff
path: root/completions
diff options
context:
space:
mode:
Diffstat (limited to 'completions')
-rw-r--r--completions/bash/podman1
-rw-r--r--completions/zsh/_podman20
2 files changed, 8 insertions, 13 deletions
diff --git a/completions/bash/podman b/completions/bash/podman
index 40be0018b..c23d156bc 100644
--- a/completions/bash/podman
+++ b/completions/bash/podman
@@ -2672,6 +2672,7 @@ _podman_play_kube() {
--quiet
-q
--tls-verify
+ --seccomp-profile-root
"
case "$cur" in
diff --git a/completions/zsh/_podman b/completions/zsh/_podman
index 228498066..067eebbbb 100644
--- a/completions/zsh/_podman
+++ b/completions/zsh/_podman
@@ -47,6 +47,7 @@ _read_podman_flags() {
# The result will be, e.g. '-f,--foo=string Description of Option'
_call_program podman podman "$@" --help |\
sed -n -e '0,/^Flags:/d' -e '/^$/q;p' |\
+ grep '^ \+-' |\
sed -e 's/^ *//' -e 's/^\(-.,\) --/\1--/' |\
sed -e 's/^\(-[^ ]\+\) \([^ ]\+\) /\1=\2 /' |\
while read flags desc;do
@@ -110,20 +111,13 @@ _podman_find_helper() {
elif expr "$desc" : ".*[Pp]ath" >/dev/null; then
optval="path"
helper=_files
- elif [ "$flags" = "--cgroup-manager" ]; then
- optval="cgroup manager"
- helper="(cgroupfs systemd)"
- elif [ "$flags" = "--log-level" ]; then
- optval="log level"
- # 'Log messages above specified level: debug, ... (default "...")'
- # Strip off the description and all 'default' strings
- desc=${desc/Log*:/} # debug, info, ... (default "...")
- desc=${(S)desc//\(*\)/} # debug, info, ... or panic
- desc=${desc//,/} # debug info ... or panic
- desc=${desc// or / } # debug info ... panic
- desc=${desc// / } # collapse multiple spaces
+ # For messages like 'restart policy ("always"|"no"|"on-failure")
+ elif optlist=$(expr "$desc" : '.*(\(\"[^\\)]\+|[^\\)]\+\"\))' 2>/dev/null); then
+ optval=${${flags##--}//-/ } # "--log-level" => "log level"
+ optlist=${optlist//\"/} # "a"|"b"|"c" => a|b|c
+ optlist=${optlist//\|/ } # a|b|c => a b c
# FIXME: how to present values _in order_, not sorted alphabetically?
- helper="($desc)"
+ helper="($optlist)"
fi
echo "$optval:$helper"
}