Skip to content

Conversation

@vmaerten
Copy link
Member

@vmaerten vmaerten commented Nov 25, 2025

Improve shell completion scripts with missing flags and dynamic experimental feature support

This PR updates all shell completion scripts (Bash, Zsh, Fish, PowerShell) to include missing flags and dynamically detect experimental features.

Problem

Completion scripts were missing many flags:

  • Short forms: -n, -x, -y, -a, -g, -j
  • New flags: --completion, --experiments, --insecure, --nested, --no-status, --sort, --output-group-error-only
  • Experimental flags: --force-all, --download, --offline, --timeout, --clear-cache, --expiry

Coverage before: Bash (~100% via _parse_help), Zsh (34%), Fish (30%), PowerShell (24%)

Changes

All shells:

  • Added dynamic experimental flag detection via task --experiments
  • Flags only appear when experiments are enabled (GENTLE_FORCE, REMOTE_TASKFILES)

  • Bash: Added _task_experiment_flags() function
  • Zsh: Added 18 missing flags, refactored to array-based arguments
  • Fish: Added 22 missing flags
  • PowerShell: Added 26 missing flags + short forms support

Coverage after: 100% for all shells

How it works

Each shell queries task --experiments at runtime and conditionally adds experimental flags based on enabled features.

@vmaerten vmaerten marked this pull request as ready for review November 25, 2025 20:19
Copy link
Member

@andreynering andreynering left a comment

Choose a reason for hiding this comment

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

Good catch!

I haven't tested these, but feel free to merge as soon as you're confident.

@vmaerten
Copy link
Member Author

Tested on each shell. Merging

@vmaerten vmaerten merged commit a085d62 into main Nov 29, 2025
13 checks passed
@vmaerten vmaerten deleted the add-completion branch November 29, 2025 11:17
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.

3 participants