# snapdir autocomplete Generate a shell completion script. `autocomplete` writes a completion script for the requested shell to stdout. The script always targets the snapdir binary name. The hidden `completions ` alias remains for back-compat with existing release and asset-generation scripts, and emits byte-identical output, but `autocomplete` is the documented command. ## Usage ```text snapdir autocomplete [OPTIONS] ``` ### Arguments | Argument | Description | | --- | --- | | `` | Target shell: `bash`, `zsh`, `fish`, `powershell`, or `elvish`. | ## Examples Load completions in bash: ```console eval "$(snapdir autocomplete bash)" ``` Load completions in zsh: ```console eval "$(snapdir autocomplete zsh)" ``` Load completions in fish: ```console snapdir autocomplete fish | source ``` Load completions in PowerShell: ```console snapdir autocomplete powershell | Out-String | Invoke-Expression ``` Load completions in Elvish: ```console eval (snapdir autocomplete elvish | slurp) ``` ## See also - [Install](../install.md) - [Command reference overview](overview.md)