Skip to main content

SET UP SHELL COMPLETIONS

Bash

Generate the completion script and save it to your completions directory:

swamp completions bash > ~/.local/share/bash-completion/completions/swamp

If your distribution uses a different path (e.g., /etc/bash_completion.d/), adjust accordingly.

Zsh

Generate the completion script and save it to a directory in your $fpath:

swamp completions zsh > ~/.zfunc/_swamp

If ~/.zfunc is not already in your fpath, add this to your ~/.zshrc before compinit:

fpath=(~/.zfunc $fpath)
autoload -Uz compinit && compinit

Fish

Generate the completion script and save it to the fish completions directory:

swamp completions fish > ~/.config/fish/completions/swamp.fish

Reload your shell

After saving the completion script, open a new shell session or reload the current one:

# bash
source ~/.bashrc

# zsh
source ~/.zshrc

# fish (completions are loaded automatically)

Type swamp and press Tab to verify completions are working.