github.com/containers/podman/v5@v5.1.0-rc1/docs/source/markdown/podman-completion.1.md (about) 1 % podman-completion 1 2 3 ## NAME 4 podman\-completion - Generate shell completion scripts 5 6 ## SYNOPSIS 7 **podman completion** [*options*] *bash* | *zsh* | *fish* | *powershell* 8 9 ## DESCRIPTION 10 **podman completion** generates shell completion scripts for a variety of shells. Supported shells are *bash*, *zsh*, *fish* and *powershell*. 11 12 These script are used by the shell to provide suggestions and complete commands when the command is typed and `[TAB]` is pressed. 13 14 Usually these scripts are automatically installed via the package manager. 15 16 ## OPTIONS 17 #### **--file**, **-f**=*file* 18 19 Write the generated output to a file. 20 21 #### **--no-desc** 22 23 Do not provide description in the completions.\ 24 The default is **false**. 25 26 ## Installation 27 28 ### BASH 29 `bash-completion` has to be installed on the system. 30 31 To load the completion script into the current session run: 32 ``` 33 source <(podman completion bash) 34 ``` 35 36 To make it available for all bash sessions run: 37 ``` 38 podman completion -f /etc/bash_completion.d/podman bash 39 ``` 40 41 42 ### ZSH 43 Shell completion needs to be already enabled in the environment. The following can be executed: 44 ``` 45 echo "autoload -U compinit; compinit" >> ~/.zshrc 46 ``` 47 48 To make it available for all zsh sessions run: 49 ``` 50 podman completion -f "${fpath[1]}/_podman" zsh 51 ``` 52 53 Once the shell is reloaded the auto-completion works. 54 55 56 ### FISH 57 To load the completion script into the current session run: 58 ``` 59 podman completion fish | source 60 ``` 61 62 To make it available for all fish sessions run: 63 ``` 64 podman completion -f ~/.config/fish/completions/podman.fish fish 65 ``` 66 67 ### POWERSHELL 68 To load the completion script into the current session run: 69 ``` 70 podman.exe completion powershell | Out-String | Invoke-Expression 71 ``` 72 73 To make it available in all powershell sessions that a user has, write the 74 completion output to a file and source that to the user's powershell profile. 75 More information about profiles is available with **Get-Help about_Profiles**. 76 77 ## SEE ALSO 78 **[podman(1)](podman.1.md)**, **zsh(1)**, **fish(1)**, **powershell(1)**