Skip to content

docs(global_cli): clarify --help for vp env default/pin/use/exec#1664

Open
Boshen wants to merge 3 commits into
mainfrom
docs/vp-env-help-949
Open

docs(global_cli): clarify --help for vp env default/pin/use/exec#1664
Boshen wants to merge 3 commits into
mainfrom
docs/vp-env-help-949

Conversation

@Boshen
Copy link
Copy Markdown
Member

@Boshen Boshen commented May 22, 2026

Summary

Closes #949.

Adds Examples: blocks (via clap after_help) to the four vp env subcommands flagged in the issue, so the intended invocation modes are visible directly from --help:

  • vp env default — show vs. set (with/without <version>)
  • vp env pin — show / pin / range / --unpin
  • vp env use — default / override <version> / --unset
  • vp env exec — explicit --node <version> vs. shim mode

Also tightens per-argument doc comments ("If not provided" → "If omitted", missing period).

No behavior changes. The clap auto-generated Usage: line is unchanged.

The command-env-use snap was regenerated to capture the new --help output.

🤖 Generated with Claude Code

…949)

Adds `Examples:` sections via clap `after_help` so users can see the
intended invocation modes (with/without `<version>`, `--unset`, shim
mode for `exec`) directly from `--help`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 22, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 9ec78a2
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a111ff954fd310008ba5b63

Boshen and others added 2 commits May 23, 2026 10:28
Splits the long `#[command(visible_alias = "run", after_help = "...")]`
attribute across multiple lines to satisfy `cargo fmt --check`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Switch from `after_help` to `after_long_help` so `-h` stays compact
and examples only render with `--help`. Also trim each block to the
non-obvious cases (drop examples already implied by the arg doc).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

Docs for vp commands sometimes unclear

1 participant