summaryrefslogtreecommitdiff
path: root/hack
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-13 16:46:51 +0100
committerGitHub <noreply@github.com>2020-11-13 16:46:51 +0100
commit2993e97dec9d998d2eca7c5aee918b1429596a85 (patch)
tree9bdb3b5c766d913a8d1980ad017276e1f1a51b7c /hack
parent6d9d9fee30b5982858d51a666f0c335ba47323a0 (diff)
parentae3816614de1c2a0c9ab9cd05afebc5b1dda6429 (diff)
downloadpodman-2993e97dec9d998d2eca7c5aee918b1429596a85.tar.gz
podman-2993e97dec9d998d2eca7c5aee918b1429596a85.tar.bz2
podman-2993e97dec9d998d2eca7c5aee918b1429596a85.zip
Merge pull request #6442 from Luap99/podman-autocomplete
Shell completion
Diffstat (limited to 'hack')
-rwxr-xr-xhack/podman-commands.sh6
-rwxr-xr-xhack/xref-helpmsgs-manpages3
2 files changed, 9 insertions, 0 deletions
diff --git a/hack/podman-commands.sh b/hack/podman-commands.sh
index fd4ff2501..0455287d4 100755
--- a/hack/podman-commands.sh
+++ b/hack/podman-commands.sh
@@ -25,6 +25,12 @@ function podman_commands() {
$PODMAN help "$@" |\
awk '/^Available Commands:/{ok=1;next}/^Options:/{ok=0}ok { print $1 }' |\
grep .
+
+ # Special case: podman-completion is a hidden command
+ # it does not show in podman help so add it here
+ if [[ -z "$@" ]]; then
+ echo "completion"
+ fi
}
# Read a list of subcommands from a command's metadoc
diff --git a/hack/xref-helpmsgs-manpages b/hack/xref-helpmsgs-manpages
index c5447c5d6..55c8b6582 100755
--- a/hack/xref-helpmsgs-manpages
+++ b/hack/xref-helpmsgs-manpages
@@ -181,6 +181,9 @@ sub xref_by_man {
next if $k eq 'varlink';
next if "@subcommand" eq 'system' && $k eq 'service';
+ # Special case: podman completion is a hidden command
+ next if $k eq 'completion';
+
warn "$ME: podman @subcommand: $k in $man, but not --help\n";
++$Errs;
}