Shell Completion#
DFM CLI supports tab completion for bash, zsh, and fish. The completion command group manages completion setup.
Quick Setup#
The easiest way to enable completion is to let DFM auto-detect your shell and configure it:
# Auto-detect shell and configure completion
dfm completion setup
# Configure for a specific shell
dfm completion setup --shell zsh
# Force setup even if completion is already configured
dfm completion setup --force
After running setup, restart your shell or “source” your *rc file to activate completion:
source ~/.zshrc # zsh
source ~/.bashrc # bash
Manual Setup#
If you prefer to manage the completion script yourself:
# Generate and save a completion script
dfm completion generate --shell zsh --output ~/.dfm-complete.zsh
# Then add to your shell config:
echo "source ~/.dfm-complete.zsh" >> ~/.zshrc
Checking Completion Status#
# Check status for all supported shells
dfm completion status
# Check status for a specific shell
dfm completion status --shell zsh
# Show detailed information about completion support
dfm completion info