TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/tree-sitter/tree-sitter/llms.txt
Use this file to discover all available pages before exploring further.
complete command generates a completion script for your shell. This enables autocompletion for the tree-sitter CLI.
comp
Options
The shell for which to generate the completion script.Supported values:
bashelvishfishpowershell(orpower-shell)zshnushell
Installation by Shell
Bash
Add to your~/.bashrc:
Zsh
Add to your~/.zshrc:
fpath:
~/.zshrc before compinit:
Fish
Save to the Fish completions directory:PowerShell
Add to your PowerShell profile:Elvish
Add to your~/.elvish/rc.elv:
Nushell
Add to your Nushell config:config.nu:
Examples
Generate Bash Completions
Generate Zsh Completions
Generate Fish Completions
Save to File
Features
Once installed, you can:-
Tab-complete command names:
-
Tab-complete option names:
-
See available options:
Troubleshooting
Completions Not Working
-
Verify the completion script was loaded:
-
Restart your shell or source your config:
-
Check file permissions:
Wrong Completions
If completions are outdated:- Regenerate the completion script
- Restart your shell
- Clear any completion cache if applicable