Shell Autocompletion
Ahoy supports tab completion in both Zsh and Bash, completing command names and aliases from your .ahoy.yml.
There’s a dedicated plugin at ahoy-cli/zsh-ahoy that works with all major Zsh plugin managers.
- Visit the ahoy-cli/zsh-ahoy repository and follow the installation instructions for your plugin manager (Oh My Zsh, Antigen, zinit, or manual).
- Reload your shell or open a new terminal.
- Type
ahoy(with a space) and press Tab - you should see your commands listed.
Step 1: Make sure bash-completion is installed:
brew install bash-completionsudo apt install bash-completionStep 2: Generate the completion script and install it:
mkdir -p ~/.bash_completion.dahoy --generate-bash-completion > ~/.bash_completion.d/ahoyecho '. ~/.bash_completion.d/ahoy' >> ~/.bashrcStep 3: Reload your configuration:
source ~/.bashrcTesting your setup
Section titled “Testing your setup”Open a new terminal, type ahoy and press Tab. You should see a list of your available commands. Aliases are completed alongside primary command names.