Skip to content

feat: add hint for explicit path invocation with shell integration#721

Merged
max-sixty merged 1 commit intomainfrom
warning
Jan 18, 2026
Merged

feat: add hint for explicit path invocation with shell integration#721
max-sixty merged 1 commit intomainfrom
warning

Conversation

@max-sixty
Copy link
Owner

Summary

When users run wt via an explicit path (like ./target/debug/wt) but shell integration is configured, the warning now includes a helpful hint showing how to change directory using the shell-wrapped command.

Before:

▲ Cannot change directory — ran ../../debug/wt; shell integration wraps wt

After:

▲ Cannot change directory — ran ../../debug/wt; shell integration wraps wt
↳ To change directory, run wt switch <branch>

This hint only appears when shell integration IS configured (so the suggested command would actually work). For cases where shell integration is not installed, the existing install hint is shown instead.

Test plan

  • Unit tests for new explicit_path_hint() function
  • Updated snapshot test for switch with explicit path
  • All switch, merge, and remove integration tests pass

This was written by Claude Code on behalf of max-sixty

When users run wt via an explicit path (like ./target/debug/wt) but
shell integration is configured, the warning now includes a helpful
hint showing how to change directory using the shell-wrapped command.

Before:
  ▲ Cannot change directory — ran ../../debug/wt; shell integration wraps wt

After:
  ▲ Cannot change directory — ran ../../debug/wt; shell integration wraps wt
  ↳ To change directory, run wt switch <branch>

This hint only appears when shell integration IS configured (so the
suggested command would actually work). For cases where shell
integration is not installed, the existing install hint is shown.

Co-Authored-By: Claude <noreply@anthropic.com>
@max-sixty max-sixty merged commit 6874e98 into main Jan 18, 2026
21 checks passed
@max-sixty max-sixty deleted the warning branch January 18, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant