.nh
.TH podman-completion 1
.SH NAME
.PP
podman-completion - Generate shell completion scripts

.SH SYNOPSIS
.PP
\fBpodman completion\fP [\fIoptions\fP]   \fIbash\fP | \fIzsh\fP | \fIfish\fP | \fIpowershell\fP

.SH DESCRIPTION
.PP
\fBpodman completion\fP generates shell completion scripts for a variety of shells. Supported shells are \fIbash\fP, \fIzsh\fP, \fIfish\fP and \fIpowershell\fP\&.

.PP
These script are used by the shell to provide suggestions and complete commands when the command is typed and \fB\fC[TAB]\fR is pressed.

.PP
Usually these scripts are automatically installed via the package manager.

.SH OPTIONS
.SS \fB--file\fP, \fB-f\fP=\fIfile\fP
.PP
Write the generated output to a file.

.SS \fB--no-desc\fP
.PP
Do not provide description in the completions.
.br
The default is \fBfalse\fP\&.

.SH Installation
.SS BASH
.PP
\fB\fCbash-completion\fR has to be installed on the system.

.PP
To load the completion script into the current session run:
.br
\fBsource <(podman completion bash)\fP\&.

.PP
To make it available for all bash sessions run:
.br
\fBpodman completion -f /etc/bash_completion.d/podman bash\fP\&.

.SS ZSH
.PP
Shell completion needs to be already enabled in the environment. The following can be executed:
.br
\fBecho "autoload -U compinit; compinit" >> ~/.zshrc\fP

.PP
To make it available for all zsh sessions run:
.br
\fBpodman completion -f "${fpath[1]}/_podman" zsh\fP

.PP
Once the shell is reloaded the auto-completion should be working.

.SS FISH
.PP
To load the completion script into the current session run:
\fBpodman completion fish | source\fP

.PP
To make it available for all fish sessions run:
\fBpodman completion -f ~/.config/fish/completions/podman.fish fish\fP

.SS POWERSHELL
.PP
To load the completion script into the current session run:
\fBpodman.exe completion powershell | Out-String | Invoke-Expression\fP

.PP
To make it available in all powershell sessions that a user has, write the
completion output to a file and source that to the user's powershell profile.
More information about profiles is available with \fBGet-Help about_Profiles\fP\&.

.SH SEE ALSO
.PP
\fBpodman(1)\fP, \fBzsh(1)\fP, \fBfish(1)\fP, \fBpowershell(1)\fP
