Automatically install shell tab completion after install
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2
- Forks
- 0
- Avg merge
- 28m
- Merged PRs (30d)
- 1
Description
Summary
The installer currently prints shell completion setup guidance, but users still need to manually run the appropriate wtk completion <shell> command and place the generated script in the right location. It would be nicer if installing wtk also enabled tab completion automatically when possible.
Current behavior
scripts/install.shinstalls thewtkbinary and verifieswtk --version.- After installation, it prints completion setup guidance.
- Users must manually configure completion for bash, zsh, fish, or PowerShell.
Proposed behavior
After a successful install, the installer should detect the user's shell and install/update the matching completion script automatically when it can do so safely.
Potential behavior:
- zsh: write
_wtkto an appropriate user-writable directory infpath. - bash: write
wtkcompletion to a user-writable bash completion directory when available. - fish: write
wtk.fishto~/.config/fish/completions/. - PowerShell: document or support profile integration if feasible.
- Keep printing manual setup instructions when automatic installation is unsupported or unsafe.
- Provide an opt-out environment variable, e.g.
WTK_SKIP_COMPLETION_INSTALL=1, for users who do not want installer-side shell configuration.
Acceptance criteria
scripts/install.shattempts completion installation only after the binary is installed and verified.- The installer does not require elevated privileges for completion setup.
- Unsupported shells or non-writable completion directories produce clear guidance instead of pretending setup succeeded.
- Existing manual
wtk completion <shell>behavior remains available. - Installer tests cover successful auto-install, opt-out, and unsupported/unsafe cases.
Notes
This should make the one-click install feel complete: after installation, users can immediately use tab completion in a supported shell without extra setup.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with scripts/install.sh and the existing wtk completion <shell> behavior to understand the installation flow and supported shells. Define safe user-writable completion locations and the opt-out path before adding installer tests. Done means verified installs can configure supported shells without elevated privileges, while unsupported or unsafe cases retain clear manual guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, shell
- Domain
- cli, developer-experience
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100