Enable shell autocomplete
Install the bash, zsh, fish, or PowerShell completion script for Dotweave.
Tab completion proposes commands, flags, and — for dotweave track — filesystem paths. This guide wires the generated completion script into bash, zsh, fish, or PowerShell, one shell at a time. It assumes dotweave is already on your PATH, because the script calls the binary by name every time you press Tab.
1. Print the completion script
dotweave autocomplete <shell> prints a script to stdout and installs nothing. Run it once to read what you are about to load:
dotweave autocomplete bash
The accepted shells are bash, zsh, fish, and powershell. The bash script ends by registering completion with complete -o default -o nospace, so a directory candidate can be extended without an unwanted trailing space. The zsh script goes further and installs a precmd hook that re-registers the completion on every prompt, which keeps a later compinit from silently replacing it.
Completion covers commands and flags. Single-letter flag aliases such as -y are left out of the output on purpose, so only the long forms are proposed.
2. Load it from your shell profile
Each shell evaluates the script from its startup file, so every new session has completion ready.
For bash, add this line to ~/.bashrc:
eval "$(dotweave autocomplete bash)"
For zsh, add this line to ~/.zshrc:
eval "$(dotweave autocomplete zsh)"
For fish, add this line to ~/.config/fish/config.fish:
dotweave autocomplete fish | source
For PowerShell, add this line to the file named by $PROFILE:
dotweave autocomplete powershell | Out-String | Invoke-Expression
PowerShell needs Out-String because the script spans several lines. Piping those lines straight into Invoke-Expression evaluates them one at a time and fails on the first unclosed block.
Check the result
Open a new shell so the startup file runs, then type dotweave pu and press Tab. The shell offers pull and push.
Read dotweave autocomplete for the subcommand surface, or dotweave track for the command whose path completion this turns on.