Skip to content

Conversation

@max-sixty
Copy link
Owner

Summary

  • Deprecated args like --no-background no longer appear in shell completions when typing --<TAB>
  • Add DEPRECATED_ARGS constant and filter completions post-generation
  • Add test covering all three commands with --no-background (wt remove, wt hook post-start, wt hook post-switch)

Context

The completion system shows all hidden args when completing -- (when all candidates are hidden, clap_complete shows them all). This meant deprecated args appeared alongside regular hidden args like --squash. Now deprecated args are filtered out while other hidden toggle flags still appear when explicitly requested.

Test plan

  • cargo test --test integration completion - all 40 completion tests pass
  • New test test_complete_excludes_deprecated_args verifies --no-background doesn't appear for bash/zsh/fish

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

Deprecated args like --no-background were appearing in shell completions
when typing `--<TAB>`. This happened because the completion system shows
all hidden args when completing `--` (when all candidates are hidden,
clap_complete shows them all).

Add DEPRECATED_ARGS constant listing args that should never appear in
completions, and filter them from completion output. Unlike other hidden
args (e.g., --squash which is a valid but hidden toggle), deprecated args
should remain hidden even when explicitly requesting option completions.

Co-Authored-By: Claude <[email protected]>
@max-sixty max-sixty merged commit c0f48f5 into main Jan 10, 2026
19 checks passed
@max-sixty max-sixty deleted the foreground branch January 10, 2026 01:55
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.

2 participants