grokkit/docs/user-guide/completion.md

43 lines
908 B
Markdown
Raw Normal View History

# Completion Guide
The `completion` command generates shell completion scripts for Grokkit, making it faster and easier to use the CLI by providing tab-completion for commands and flags.
### Supported Shells
- **Bash**
- **Zsh**
- **Fish**
- **PowerShell**
### Installation
To enable completions, you need to generate the script for your shell and source it.
#### Bash
```bash
grokkit completion bash | sudo tee /etc/bash_completion.d/grokkit
```
#### Zsh (oh-my-zsh)
```zsh
grokkit completion zsh > ~/.oh-my-zsh/completions/_grokkit
```
#### Fish
```fish
grokkit completion fish > ~/.config/fish/completions/grokkit.fish
```
#### PowerShell
```powershell
grokkit completion powershell | Out-String | Invoke-Expression
```
### Usage
Once installed, you can simply type `grokkit ` followed by `Tab` to see available commands, or `grokkit <command> --` followed by `Tab` to see available flags.