Skip to content

Conversation

@ansonhoyt
Copy link

Output help and version text to STDERR instead of STDOUT.

The shell wrapper evals STDOUT on exit 0, so try --version was
running eval "try 1.7.1" which launched the TUI with "1.7.1" as
the search term. Similarly, try --help caused bash syntax errors.

Alternatives considered:

  • Exit non-zero for help/version (implies error, misleading)
  • Output no-op shell command first (more complex)
  • Change wrapper to detect these flags (adds logic to shell function)

STDERR is the common pattern for tools with shell integration (mise,
direnv, etc.) and keeps the fix minimal.

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Output help and version text to STDERR instead of STDOUT.

The shell wrapper evals STDOUT on exit 0, so `try --version` was
running `eval "try 1.7.1"` which launched the TUI with "1.7.1" as
the search term. Similarly, `try --help` caused bash syntax errors.

Alternatives considered:
- Exit non-zero for help/version (implies error, misleading)
- Output no-op shell command first (more complex)
- Change wrapper to detect these flags (adds logic to shell function)

STDERR is the common pattern for tools with shell integration (mise,
direnv, etc.) and keeps the fix minimal.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 17, 2026 03:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where try --help and try --version were causing the shell wrapper to eval their output, resulting in unintended behavior (launching the TUI with "1.7.1" as search term or bash syntax errors).

Changes:

  • Changed help text output from STDOUT to STDERR
  • Changed version text output from STDERR to STDERR

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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