devsync autocomplete
Install shell autocomplete for devsync commands and flags.
Synopsis
Section titled “Synopsis”devsync autocomplete bashdevsync autocomplete zshdevsync autocomplete powershellDescription
Section titled “Description”devsync autocomplete prints a shell-specific completion script to stdout. Evaluating this script in your shell’s rc file gives you tab-completion for all devsync commands, subcommands, and flags.
Completion is handled by an internal devsync __complete subcommand that is invoked by the shell on each tab press. You do not need to call __complete directly.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
bash | Output a Bash completion script. |
zsh | Output a Zsh completion script. |
powershell | Output a PowerShell completion script. |
Add the following line to your ~/.bashrc:
eval "$(devsync autocomplete bash)"Then reload your shell:
source ~/.bashrcAdd the following line to your ~/.zshrc:
eval "$(devsync autocomplete zsh)"Then reload your shell:
source ~/.zshrcAdd the following line to your PowerShell profile ($PROFILE):
Invoke-Expression (devsync autocomplete powershell | Out-String)Then reload your profile:
. $PROFILEWhat gets completed
Section titled “What gets completed”Once installed, pressing Tab completes:
- Top-level commands:
init,track,untrack,status,push,pull,doctor,cd,profile,autocomplete - Subcommands:
profile list,profile use - Flags and their values for every command
Examples
Section titled “Examples”# Print the Bash completion script (for inspection)devsync autocomplete bash
# Pipe to a file for manual sourcingdevsync autocomplete zsh > ~/.zsh/completions/_devsync