Skip to content

devsync autocomplete

Install shell autocomplete for devsync commands and flags.

Terminal window
devsync autocomplete bash
devsync autocomplete zsh
devsync autocomplete powershell

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.

ArgumentDescription
bashOutput a Bash completion script.
zshOutput a Zsh completion script.
powershellOutput a PowerShell completion script.

Add the following line to your ~/.bashrc:

Terminal window
eval "$(devsync autocomplete bash)"

Then reload your shell:

Terminal window
source ~/.bashrc

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
Terminal window
# Print the Bash completion script (for inspection)
devsync autocomplete bash
# Pipe to a file for manual sourcing
devsync autocomplete zsh > ~/.zsh/completions/_devsync