Skip to content

feat: add one-time shell integration hint for new users#81

Merged
avihut merged 1 commit intomasterfrom
daft-83/shell-integration-hint
Jan 24, 2026
Merged

feat: add one-time shell integration hint for new users#81
avihut merged 1 commit intomasterfrom
daft-83/shell-integration-hint

Conversation

@avihut
Copy link
Owner

@avihut avihut commented Jan 24, 2026

Summary

  • Adds a one-time hint system that notifies users about shell integration when they run worktree commands without the shell wrapper active
  • Hint is shown after successful worktree creation (clone, init, checkout, checkout-branch)
  • Tracks which hints have been shown in ~/.config/daft/hints.json
  • Can be suppressed via DAFT_NO_HINTS=1 environment variable

Problem

After installing daft from Homebrew, users may miss the shell integration setup instructions. Without shell integration, commands like git worktree-checkout-branch work but don't auto-cd into the new worktree - leaving users in their original directory wondering why.

Solution

After successful worktree operations, if the shell wrapper isn't active (DAFT_SHELL_WRAPPER env var not set), show a helpful one-time hint:

hint: Enable shell integration to auto-cd into new worktrees:
  eval "$(daft shell-init bash)"   # Add to ~/.bashrc or ~/.zshrc
  daft shell-init fish | source    # Add to ~/.config/fish/config.fish
Run 'daft shell-init --help' for more options.
To suppress hints: export DAFT_NO_HINTS=1

Test plan

  • Unit tests for hint state management (save/load/mark shown)
  • All existing tests pass
  • Clippy passes with no warnings
  • Code is properly formatted

🤖 Generated with Claude Code

When shell integration is not configured, show a helpful hint after
worktree creation commands explaining how to enable auto-cd into new
worktrees. The hint is only shown once (tracked in ~/.config/daft/hints.json)
and can be suppressed via DAFT_NO_HINTS=1.

This improves the new user experience by making shell integration
discoverable without requiring users to read documentation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@avihut avihut self-assigned this Jan 24, 2026
@avihut avihut added the enhancement New feature or request label Jan 24, 2026
@avihut avihut merged commit b56bf2f into master Jan 24, 2026
4 checks passed
@avihut avihut deleted the daft-83/shell-integration-hint branch January 24, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant