⌨️ Completion
crestic completion <shell>Generate shell completion scripts for bash, zsh, fish, and PowerShell.
Supported Shells
- bash
- zsh
- fish
- powershell
Bash
Load Completions for Current Session
source <(crestic completion bash)Load Completions Permanently
Linux
crestic completion bash > /etc/bash_completion.d/cresticmacOS
crestic completion bash > $(brew --prefix)/etc/bash_completion.d/cresticNote: If using Homebrew, the completions directory might be:
/opt/homebrew/etc/bash_completion.d/(Apple Silicon)/usr/local/etc/bash_completion.d/(Intel)
After installation, restart your terminal or run:
source $(brew --prefix)/etc/bash_completion.d/cresticZsh
Enable Shell Completion (if not already enabled)
If shell completion is not already enabled in your environment, you will need to enable it. Execute the following once:
echo "autoload -U compinit; compinit" >> ~/.zshrcThen restart your terminal or run:
source ~/.zshrcLoad Completions for Current Session
source <(crestic completion zsh)Load Completions Permanently
crestic completion zsh > "${fpath[1]}/_crestic"Note: ${fpath[1]} is typically ~/.zsh/completion/ or /usr/local/share/zsh/site-functions/
If the directory doesn't exist, create it first:
mkdir -p ~/.zsh/completion
crestic completion zsh > ~/.zsh/completion/_cresticThen add to your ~/.zshrc:
fpath=(~/.zsh/completion $fpath)You will need to start a new shell for this setup to take effect.
Fish
Load Completions for Current Session
crestic completion fish | sourceLoad Completions Permanently
crestic completion fish > ~/.config/fish/completions/crestic.fishNote: If the directory doesn't exist, create it first:
mkdir -p ~/.config/fish/completions
crestic completion fish > ~/.config/fish/completions/crestic.fishFish will automatically load completions from this directory.
PowerShell
Load Completions for Current Session
crestic completion powershell | Out-String | Invoke-ExpressionLoad Completions Permanently
-
Generate the completion script:
crestic completion powershell > crestic.ps1 -
Source this file from your PowerShell profile:
# Find your profile location $PROFILE # Add to profile (if it exists) . $HOME\crestic.ps1 # Or create profile and add if (!(Test-Path -Path $PROFILE)) { New-Item -ItemType File -Path $PROFILE -Force } Add-Content -Path $PROFILE -Value ". $HOME\crestic.ps1" -
Reload your profile:
. $PROFILE
See Also
- CLI Commands - All available commands
- Configuration Guide - Configuration reference