Files
devvm/testdata/script/version.txtar
T
w3cjandClaude Opus 5.5 6dd2bd730f feat(cli): version, help and shell completion
- devvm --version (and a hidden devvm version) prints the version alone:
  the one release builds set with -ldflags -X .../internal/cli.version,
  else Go's build info without the v, else (devel). No -v shorthand.
- devvm help [COMMAND], --help and -h stay Cobra's.
- devvm completion bash|zsh|fish prints Cobra's script (no powershell).
  Completion offers image names after the +-joined parts given (base,
  the toolchains, the user's layers, the agents), shared tools for
  remove, backend names for --backend, all/none for --ports, and never
  file names.
- Tests: version.txtar, completion.txtar, help cases in root.txtar;
  TestJoined, TestVersionFromRelease, TestVersionFlagHasNoShorthand;
  more exit codes in TestExecuteExitCodes; docgen tests know the
  completion page and keep version and __complete out.
- Docs: commands.md "devvm itself" and "Shell completion"; the CLI
  reference regenerated (devvm_completion.md, --version on devvm.md).
- Converted: cli.bats "doctor: all there; --version prints VERSION"
  (its --version half; doctor waits for doctor). No messages added.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 15:52:27 -06:00

19 lines
408 B
Plaintext

# devvm --version prints the version alone, and devvm version the same.
exec devvm --version
stdout '^(\(devel\)|[0-9]\S*)$'
! stdout '\n.'
! stderr .
cp stdout version.txt
exec devvm version
cmp stdout version.txt
! stderr .
# Neither reaches up, whatever else is given.
exec devvm --version node
cmp stdout version.txt
! stub_calls
# There's no -v.
! exec devvm -v
stderr 'unknown shorthand flag: ''v'''