# shell completion Getting tab completions for pdftl in your shell ## Details To set up basic tab completion for pdftl: Bash: ``` $ source <(pdftl --completion bash) ``` Zsh: ``` % source <(pdftl --completion zsh) ``` Powershell: ``` PS > pdftl --completion powershell | Out-String | Invoke-Expression ``` The first time you use completion, a cache file is generated to speed up future runs, which means the first run might feel a bit slow. Notes: - ensure that pdftl is in your PATH if you want to use completion. - `pdftk --completion` will attempt to guess your shell and output appropriate code for you to source from the shell. It might fail, or be wrong. ## Examples > output bash completion code. This must be sourced from bash. ``` pdftl --completion bash ``` > output zsh completion code. This must be sourced from zsh. ``` pdftl --completion zsh ``` > output powershell completion code. This must be sourced from powershell. ``` pdftl --completion powershell ``` > attempt to guess your shell and output appropriate completion code. ``` pdftl --completion ``` *Source: pdftl.cli.completion_setup* *Read online: [https://pdftl.readthedocs.io/en/latest/general/shell_completion.html](https://pdftl.readthedocs.io/en/latest/general/shell_completion.html)* *Type: HelpTopic*