nettee / nettee/worktree-kit

Automatically install shell tab completion after install

Open
#21 0 comments 0 reactions 0 assignees View on GitHub

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.sh installs the wtk binary and verifies wtk --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 _wtk to an appropriate user-writable directory in fpath.
  • bash: write wtk completion to a user-writable bash completion directory when available.
  • fish: write wtk.fish to ~/.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.sh attempts 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.