Conversation
Add completion properties to CLI arg definitions for context-aware shell completion: file completion for config/env-file args, directory completion for dir/output args, and suppressed file fallback for workspace-id/profile args. Existing z.enum() args (e.g., role) already auto-complete via politty's built-in enum detection. Add comprehensive completion tests covering subcommand/option name completion (regression guard) and new completion property verification (file, directory, none, enum directives).
🦋 Changeset detectedLatest commit: f602e81 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
This comment has been minimized.
This comment has been minimized.
|
It can be handled as a separate task, but I'd like to restrict |
I think adding something like |
…0.4.2 Restrict --env-file and --env-file-if-exists completion to .env files using politty's new matcher glob pattern support. Also fix type error in options.test.ts by using SubCommandValue from politty.
Fix truncated pipe output when sourcing completion scripts via eval.
…tion # Conflicts: # packages/sdk/src/cli/commands/generate/service.ts # packages/sdk/src/cli/commands/tailordb/migrate/generate.ts
Code Metrics Report (packages/sdk)
Details | | main (669693d) | #646 (36c85ec) | +/- |
|--------------------|----------------|----------------|-------|
+ | Coverage | 50.2% | 50.3% | +0.0% |
| Files | 258 | 258 | 0 |
| Lines | 8672 | 8673 | +1 |
+ | Covered | 4362 | 4363 | +1 |
+ | Code to Test Ratio | 1:0.4 | 1:0.4 | +0.0 |
| Code | 50113 | 50233 | +120 |
+ | Test | 20169 | 20282 | +113 |Code coverage of files in pull request scope (12.7% → 13.0%)
SDK Configure Bundle Size
Runtime Performance
Type Performance (instantiations)
Reported by octocov |
|
This PR is ready to merge once the |
Upgrade politty to v0.4.3 and add
completionproperties to CLI arg definitions for context-aware shell completion.Main Changes
completionproperties to CLI args:file--env-filematcher: [".env.*", ".env"]file--env-file-if-existsmatcher: [".env.*", ".env"]file--configextensions: ["ts"]directory--dirdirectory--outputnone--workspace-idnone--profileconfigArgto eliminate duplication across config-accepting commandsHow to verify
Source the completion script in your shell:
Then try:
Notes
z.enum()args (e.g.,--role) auto-complete via politty's built-in enum detection without explicitcompletionproperty