///
Fabric provides robust shell completion scripts to enhance your command-line experience. These scripts enable tab completion for `fabric` commands, flags, and options, significantly speeding up your w
164 views
~164 views from guests
Guest views are estimated from total page views. These include anonymous visitors and users who weren't logged in when they viewed the page.
Fabric provides robust shell completion scripts to enhance your command-line experience. These scripts enable tab completion for fabric commands, flags, and options, significantly speeding up your workflow and reducing typing errors when interacting with the CLI Usage Guide.
You can set up shell completions using a quick one-line installer or by manually configuring your shell.
The easiest way to install shell completions is by using the provided one-liner script. This method fetches the latest completion scripts directly from the Fabric repository and integrates them into your system without needing to clone the repository.
If you prefer to install completions manually, or if the quick installer doesn't meet your needs, you can follow the specific instructions for your shell below. These instructions assume you have access to the completions directory from the Fabric repository (e.g., if you've cloned the repository as part of your Getting Started process).
To enable shell completions for Zsh:
Create a completions directory (if it doesn't already exist) and copy the _fabric completion file into it. Replace /path/to/fabric with the actual path to your cloned Fabric repository, or where you've obtained the completions directory.
Add the directory to your $fpath in your ~/.zshrc file. This line must be added before autoload -Uz compinit && compinit.
Reload your Zsh configuration by opening a new terminal session or running source ~/.zshrc.
To enable shell completions for Bash:
Source the completion script in your ~/.bashrc file. Replace /path/to/fabric with the actual path to your cloned Fabric repository.
Alternatively, you can copy the completion script to a system-wide Bash completion directory, which may require root privileges:
Reload your Bash configuration by opening a new terminal session or running source ~/.bashrc.
To enable shell completions for Fish:
Create a completions directory (if it doesn't already exist) within your Fish configuration and copy the fabric.fish completion file into it. Replace /path/to/fabric with the actual path to your cloned Fabric repository.
Reload your Fish configuration by opening a new terminal session or running source ~/.config/fish/config.fish.
Once configured, you can type fabric followed by a space and then press the Tab key to see available commands and options.