Skip to content

feat(term): add --list metadata, JSON format, and -n ranges - #65

Merged
NaNIsaac merged 4 commits into
mainfrom
feat/term-list
Nov 15, 2026
Merged

NaNIsaac merged 4 commits into
mainfrom
feat/term-list

Conversation

@NaNIsaac

Copy link
Copy Markdown
Owner

What changed

  • Added -n range support (-n 3-5 and reversed -n 5-3) to pick commands N..M back with output, oldest first, while keeping -n 5 and -i behavior unchanged and rejecting malformed or unreachable ranges clearly.
  • Added time (HH:MM when today, YYYY-MM-DD HH:MM otherwise), exit code, and shortened cwd to cdg term --list rows, keeping indices aligned with what -i picks under the same filters across list and output renderers.
  • Added --list --format json outputting {index, time, exit_code, cwd, command} rows without copying to the clipboard, supporting -n ranges as well.
  • Added unit and CLI tests covering ranges, metadata, filter-aligned indices, JSON list rows, and clipboard suppression; updated README.md, README.ko.md, and site/ docs.

Why

Lets users scan captured commands with timestamps, exit codes, and directories, then pull either one entry with -i or a slice with -n A-B (or consume list rows via --format json).

Tests

  • uv run --with pytest --with pywinpty pytest -q -p no:cacheprovider: 328 passed, 10 skipped
  • uvx ruff@0.17.1 check . and uvx ruff@0.17.1 format --check .: passed
  • conventions.py check .: 0 findings

Backlog: CDG-TERM-LIST

@NaNIsaac
NaNIsaac merged commit 117d9d6 into main Nov 15, 2026
18 checks passed
@NaNIsaac
NaNIsaac deleted the feat/term-list branch November 15, 2026 23:52
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