Skip to content

Complete snapshot refs in shell completions#95

Draft
vku2018 wants to merge 1 commit into
qorexdevs:mainfrom
vku2018:codex/complete-snapshot-refs
Draft

Complete snapshot refs in shell completions#95
vku2018 wants to merge 1 commit into
qorexdevs:mainfrom
vku2018:codex/complete-snapshot-refs

Conversation

@vku2018

@vku2018 vku2018 commented Jul 3, 2026

Copy link
Copy Markdown

Closes #94.

Summary

  • add a hidden quicksave __complete-refs helper that quietly prints snapshot numbers, ids, and names for shell completion
  • wire bash, zsh, fish, and PowerShell completions to suggest refs at snapshot-ref argument positions while preserving file fallback elsewhere
  • keep the hidden helper out of the normal subcommand list and cover the helper/completion output with tests

Validation

  • python -m pytest -q tests/test_cli.py::test_completion_bash_lists_subcommands tests/test_cli.py::test_completion_zsh_wires_compdef tests/test_cli.py::test_completion_fish_lists_subcommands tests/test_cli.py::test_completion_powershell_registers_completer tests/test_cli.py::test_complete_refs_prints_snapshot_numbers_ids_and_names tests/test_cli.py::test_complete_refs_outside_project_is_quiet
  • python -m compileall -q quicksave tests
  • git diff --check
  • generated PowerShell completer registers successfully via Invoke-Expression
  • python -m pytest -q -k "not no_color_env_strips_styling" (290 passed, 1 deselected)

Note

  • Full python -m pytest -q on this Windows runner reports one existing platform-sensitive failure in tests/test_cli.py::test_no_color_env_strips_styling; the same test fails when run standalone because captured output does not include ANSI styling before NO_COLOR is set.

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.

complete snapshot refs in the shell completions

2 participants