Fix CLI filter arguments #479

Merged
barrettruth merged 1 commit from fix/cli-filter-args into main 2026-05-23 01:24:23 +00:00
Owner

Problem

The CLI documented positional filters for delta task list and delta export, but Commander rejected them because the commands did not declare [filters...]. While verifying that fix, the advertised --server global flag was also not applied to client construction, which made local CLI smoke tests hit the configured/default server instead of the requested one.

Solution

  • Declare positional filter arguments for task list and export.
  • Share task-list execution between delta, delta task, and delta task list instead of reparsing argv through a subcommand.
  • Wire the global --server option into CLI config with flag precedence over DELTA_SERVER.
  • Clarify filter/default behavior in CLI help and the manpage.
  • Add CLI-level regression tests for filters, default task list paths, export filters, and --server precedence.

Verification

  • nix develop --command pnpm exec biome check tests/cli/program.test.ts cli/src/task.ts cli/src/program.ts cli/src/help.ts cli/src/export.ts cli/src/lib/config.ts cli/man/delta.1.md
  • nix develop --command pnpm exec tsc --noEmit
  • nix develop --command pnpm vitest run tests/cli/program.test.ts --reporter=verbose
  • nix develop --command pnpm --dir cli run build:man
  • nix develop --command pnpm --dir cli run build:npm
  • Built CLI smoke against a local HTTP stub for explicit task filters, bare defaults, export filters, and --server precedence
  • nix develop --command just ci

Linked issue

None.

## Problem The CLI documented positional filters for `delta task list` and `delta export`, but Commander rejected them because the commands did not declare `[filters...]`. While verifying that fix, the advertised `--server` global flag was also not applied to client construction, which made local CLI smoke tests hit the configured/default server instead of the requested one. ## Solution - Declare positional filter arguments for task list and export. - Share task-list execution between `delta`, `delta task`, and `delta task list` instead of reparsing argv through a subcommand. - Wire the global `--server` option into CLI config with flag precedence over `DELTA_SERVER`. - Clarify filter/default behavior in CLI help and the manpage. - Add CLI-level regression tests for filters, default task list paths, export filters, and `--server` precedence. ## Verification - `nix develop --command pnpm exec biome check tests/cli/program.test.ts cli/src/task.ts cli/src/program.ts cli/src/help.ts cli/src/export.ts cli/src/lib/config.ts cli/man/delta.1.md` - `nix develop --command pnpm exec tsc --noEmit` - `nix develop --command pnpm vitest run tests/cli/program.test.ts --reporter=verbose` - `nix develop --command pnpm --dir cli run build:man` - `nix develop --command pnpm --dir cli run build:npm` - Built CLI smoke against a local HTTP stub for explicit task filters, bare defaults, export filters, and `--server` precedence - `nix develop --command just ci` ## Linked issue None.
fix(cli): accept filters on task and export commands
All checks were successful
quality / Lint (pull_request) Successful in 27s
quality / Test (pull_request) Successful in 29s
quality / Build (pull_request) Successful in 51s
72a40fb8be
barrettruth referenced this pull request from a commit 2026-05-23 01:24:23 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/delta!479
No description provided.