> ## Documentation Index
> Fetch the complete documentation index at: https://gitquarry.micr.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Shell Completion

> Generate and install gitquarry completions for Bash, Zsh, Fish, and PowerShell.

# Shell Completion

Gitquarry can generate completion scripts for:

* Bash
* Zsh
* Fish
* PowerShell

The command shape is:

```bash theme={null}
gitquarry --generate-completion <shell>
```

## Bash

```bash theme={null}
mkdir -p ~/.local/share/bash-completion/completions
gitquarry --generate-completion bash > ~/.local/share/bash-completion/completions/gitquarry
```

Reload your shell or source the file.

## Zsh

```bash theme={null}
mkdir -p ~/.zsh/completion
gitquarry --generate-completion zsh > ~/.zsh/completion/_gitquarry
```

Make sure that directory is in `fpath`, then restart your shell.

## Fish

```bash theme={null}
mkdir -p ~/.config/fish/completions
gitquarry --generate-completion fish > ~/.config/fish/completions/gitquarry.fish
```

Fish loads it automatically on the next shell start.

## PowerShell

```powershell theme={null}
gitquarry --generate-completion powershell >> $PROFILE
```

Open a new shell session after updating the profile.

## Regenerating After Upgrades

Completion scripts are generated from the CLI's current command surface.

If you upgrade gitquarry and add new commands or flags, regenerate the script for your shell.

## Quick Check

```bash theme={null}
gitquarry --generate-completion bash | head
gitquarry --generate-completion powershell | head
```

If generation fails, that is a CLI-level issue rather than a shell-specific problem.
