Skip to content

docs(step push): drop redundant (e.g., main) example - #3110

Merged
max-sixty merged 3 commits into
mainfrom
docs/sweep-help-eg-examples
Jun 18, 2026
Merged

max-sixty merged 3 commits into
mainfrom
docs/sweep-help-eg-examples

Conversation

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #3096, per maintainer request. Swept every (e.g., ...) parenthetical in the CLI help surface (src/cli/mod.rs, src/cli/step.rs, src/cli/config.rs) and dropped the one that matched the same shape as the feature-fix example removed in #3096 — a generic placeholder name that restates the surrounding phrase without clarifying it.

Removed

src/cli/step.rs:180 — wt step push long help opener:

Before: "Updates the local target branch (e.g., main) to include current commits."

After: "Updates the local target branch to include current commits."

The example block right below already shows both the default-target case (wt step push # Fast-forward main to current branch) and the override case (wt step push develop # Fast-forward develop instead), so the inline main example is doubly redundant. "Target branch" is self-explanatory; main adds no information.

Kept (and why)

Every other (e.g., ...) in CLI help text was preserved as a useful clarification. The kept instances fall into three categories:

  1. Specific named tools / mechanisms — anchor an abstract phrase to a real, named thing the reader can recognize.

    • mod.rs:373 — "hooks handle navigation (e.g., tmux workflows)"
    • mod.rs:387 — "tool integration (e.g., Claude Code WorktreeCreate hooks)"
    • mod.rs:569 — "Switching to a remote branch (e.g., wt switch feature when only origin/feature exists)" (already noted in docs(switch): refine wt switch --help text #3096)
    • mod.rs:767 — "no number is available (e.g. branch workflows without a PR/MR)"
    • mod.rs:962 — "review is required (e.g. branch protection)"
    • mod.rs:1446 — "output budget is tight (e.g., Unix socket paths capped at 107 bytes)"
    • step.rs:644 — "at each other's expected locations (e.g., alpha at repo.beta and beta at repo.alpha)"
  2. Concrete git/config refs that ground abstract terms — name the actual git ref or value the reader will see.

    • mod.rs:1029 — "its upstream (e.g., origin/main) when strictly ahead"
    • mod.rs:1567 — "references the key conditionally (e.g. {% if override %}…{% endif %})"
    • config.rs:781 — "checks its HEAD (e.g., origin/HEAD)"
    • config.rs:883 — "Path to one hook log (e.g. the post-start server hook for the current branch)"
  3. Table rows and TOML comments illustrating value format — show what a field's value actually looks like; the canonical examples convention in .claude/skills/writing-user-outputs.

    • mod.rs:884 ("!?↓"), mod.rs:919 ("origin"), mod.rs:1378 (pre-start, pre-merge), mod.rs:1405 (TOML rebase config), mod.rs:1436 (myproject.malleable-opah), mod.rs:1665–1671 (template variable resolutions), mod.rs:1826 (TOML excludes), mod.rs:2138 (powershell)
    • config.rs:834 (wt hook pre-merge --yes), config.rs:835 (pre-merge user:lint)

Testing

  • cargo test --test integration test_docs_are_in_sync — passes.
  • cargo test --test integration test_help — passes (no help snapshot covers wt step push --help long help; the change is only visible at runtime).
  • cargo build — clean.
  • Ran wt step push --help locally to verify the rendered output reads cleanly.

Notes for review

worktrunk-bot and others added 2 commits June 17, 2026 17:59
PR #3108 dropped the per-variant doc comments on `SwitchFormat` and
regenerated mirrors for the four `--format` flags it called out, but
`wt step eval --format` shares the same enum and its rendering also
flipped from the verbose `Possible values:` block to the terse
`[possible values: text, json]` form. Its mirrors weren't picked up
in #3108's regen, so `cargo test --test integration test_docs_are_in_sync`
fails on current main.

Test-driven mirror regeneration only — no behavior or source change.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Follow-up to #3096 — same shape as the (e.g., feature-fix) removed
there. "Target branch" is self-explanatory and the example block right
below already shows both the default-target case
(`wt step push  # Fast-forward main to current branch`) and the
override case (`wt step push develop  # Fast-forward develop instead`),
so the inline `main` example is doubly redundant.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Base automatically changed from docs/step-eval-format-mirror to main June 17, 2026 18:53
@max-sixty
max-sixty merged commit 2238540 into main Jun 18, 2026
34 checks passed
@max-sixty
max-sixty deleted the docs/sweep-help-eg-examples branch June 18, 2026 06:46
@max-sixty max-sixty mentioned this pull request Jun 18, 2026
max-sixty added a commit that referenced this pull request Jun 18, 2026
Release v0.60.0 (minor bump from 0.59.0).

Minor because semver-checks flagged a breaking library-API change and
five new features landed since v0.59.0. The data-loss surface review (4
independent finders) cleared the one change that touches it (relocating
dirty linked worktrees, #3104).

### Improved
- Package installs now complete branch/worktree names via dynamic
registration (#3105, thanks @bendrucker)
- `wt step relocate` moves dirty linked worktrees (#3104, thanks
@lunaynx for reporting)
- `--dry-run` previews print to stdout (#3085)
- Picker gutter distinguishes local (`/`) and remote (`|`) branches
(#3115)
- `wt list --format=json` gains structured `repo`/`ci.repo` metadata
(#3021, thanks @jeremy0dell)
- `wt step eval --format=json` (#3106)
- `--format=claude-code` rejected on `wt list` / `wt config state get`
(#3116)

### Fixed
- `cargo install worktrunk` builds from crates.io again (#3124, fixes
#3123, thanks @kerrickstaley for reporting)
- Tab-completion works in repos with no commits (#3097, closes #3094)
- `wt config state get ci-status --format=json` honors
`[forge].platform` (#3120)

### Documentation
- `wt list --help` example tables fit the terminal (#3125)
- `/wt-switch-create` cross-repo handling reworked (#3118)
- Help-text and web-doc refinements (#3096, #3108, #3110, #3112, #3126)

Full notes in `CHANGELOG.md`.

> _This was written by Claude Code on behalf of max_
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
worktrunk 0.60.0

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>## Release Notes

### Improved

- **Package installs complete branch and worktree names**: A plain `brew install worktrunk` (or other package install) now tab-completes branch and worktree names, not just subcommands and flags. `wt config shell completions <shell>` emits a dynamic registration that calls the binary at completion time (the maintained `clap_complete::env` path), matching what `gh`, `rustup`, and `kubectl` ship. ([#3105](max-sixty/worktrunk#3105), thanks @bendrucker)

- **`wt step relocate` moves dirty linked worktrees**: Relocating a linked worktree with uncommitted or untracked changes no longer skips it. `git worktree move` carries those files along, so the dirty-skip was a worktrunk policy rather than a git limitation. The main worktree still skips when dirty (without `--commit`), since its relocation falls back to `git checkout`, which refuses to switch over a dirty tree. ([#3104](max-sixty/worktrunk#3104), thanks @lunaynx for reporting)

- **`--dry-run` previews print to stdout**: `wt hook <type>`, `wt step relocate`, `wt step prune`, `wt step copy-ignored`, and `wt config shell install`/`uninstall` now send their `--dry-run` preview to stdout (the command's answer) while narration stays on stderr. This matches `wt list`, `git clean -n`, and `terraform plan`, and keeps previews pageable and pipeable. (Breaking: scripts reading these previews from stderr should now read stdout) ([#3085](max-sixty/worktrunk#3085))

- **Picker gutter distinguishes local and remote branches**: With `--branches` and `--remotes`, the `wt switch` picker marks each row's kind in the gutter: `/` for a local branch without a worktree and `|` for a remote branch, alongside the existing `@`/`^`/`+` worktree glyphs. ([#3115](max-sixty/worktrunk#3115))

- **`wt list --format=json` gains structured `repo` metadata**: JSON output adds `repo` (the local checkout's primary remote) and `ci.repo` (the repository `ci.url` targets, which differs for fork PRs) objects carrying `host`/`owner`/`name`/`provider`; the existing `repo_url` and `ci.repo_url` strings remain. The provider honors the configured `[forge].platform` on hosts that can't be auto-detected. ([#3021](max-sixty/worktrunk#3021), thanks @jeremy0dell)

- **`wt step eval --format=json`**: `wt step eval` gains a structured `{name, template, result}` JSON lane on stdout, the machine-readable analog of its `-v` view. Text mode is unchanged. ([#3106](max-sixty/worktrunk#3106))

- **`--format=claude-code` rejected where it never applied**: `wt list` and `wt config state get` accepted `--format=claude-code` silently and treated it as `table`; the value only ever meant anything on `wt list statusline`. Both now fail fast with `invalid value 'claude-code'`. (Breaking: `wt list --format=claude-code` and `wt config state get --format=claude-code` now error) ([#3116](max-sixty/worktrunk#3116))

### Fixed

- **`cargo install worktrunk` builds from crates.io**: Installing from crates.io failed to compile with `environment variable VERGEN_GIT_DESCRIBE not defined at compile time`, because the package archive has no `.git` for the build script to read. The version lookup now falls back to the cargo package version when git-describe is unavailable. ([#3124](max-sixty/worktrunk#3124), fixes [#3123](max-sixty/worktrunk#3123), thanks @kerrickstaley for reporting)

- **Tab-completion works in repos with no commits**: `wt switch <TAB>` and `wt remove <TAB>` returned nothing on a fresh `git init` repo, because the unborn default branch has no entry under `refs/heads/`. Completion now also draws on worktree branches, so the unborn `main` (and any `wt switch --create` branch on an empty repo) completes. ([#3097](max-sixty/worktrunk#3097), closes [#3094](max-sixty/worktrunk#3094))

- **`wt config state get ci-status --format=json` honors `[forge].platform`**: On a self-hosted host the parser can't recognize (Gitea, Azure DevOps, GitHub Enterprise on a generic domain), this path reported `provider: "unknown"` while `wt list --format=json` reported the configured provider. All structured-output paths now route the `[forge].platform` override through one accessor, so they stay consistent. ([#3120](max-sixty/worktrunk#3120))

### Documentation

- **`wt list --help` example tables fit the terminal**: The captured `wt list` example tables in `--help` chop to terminal width with a dimmed ellipsis (matching real `wt list`) instead of word-wrapping and shearing their columns; hand-authored command examples still wrap. ([#3125](max-sixty/worktrunk#3125))

- **`/wt-switch-create` cross-repo handling reworked**: The Claude Code plugin command's skill reworks how it creates and enters a worktree in another repo, built around what the harness actually does (`EnterWorktree` re-roots within the current repo; a `cd` reaches another repo when it's in `additionalDirectories`). The procedure dropped from five steps to three. ([#3118](max-sixty/worktrunk#3118))

- **Help-text and docs refinements**: `--format` help renders its values inline (`[possible values: table, json]`) instead of an expanded block; `wt switch` and `wt step push` help got smaller clarifications; and web-doc terminal blocks no longer wrap command-only lines. ([#3096](max-sixty/worktrunk#3096), [#3108](max-sixty/worktrunk#3108), [#3110](max-sixty/worktrunk#3110), [#3112](max-sixty/worktrunk#3112), [#3126](max-sixty/worktrunk#3126))

## Install worktrunk 0.60.0

### Install prebuilt binaries via shell script

```sh
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/max-sixty/worktrunk/releases/download/v0.60.0/worktrunk-installer.sh | sh && wt config shell install
```

### Install prebuilt binaries via powershell script

```sh
powershell -ExecutionPolicy Bypass -c "irm https://github.com/max-sixty/worktrunk/releases/download/v0.60.0/worktrunk-installer.ps1 | iex"; git-wt config shell install
```

### Install prebuilt binaries via Homebrew

```sh
brew install worktrunk && wt config shell install
```

## Download worktrunk 0.60.0

|  File  | Platform | Checksum |
|--------|----------|----------|
| [worktrunk-aarch64-apple-darwin.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.60.0/worktrunk-aarch64-apple-darwin.tar.xz) | Apple Silicon macOS | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.60.0/worktrunk-aarch64-apple-darwin.tar.xz.sha256) |
| [worktrunk-x86_64-apple-darwin.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.60.0/worktrunk-x86_64-apple-darwin.tar.xz) | Intel macOS | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.60.0/worktrunk-x86_64-apple-darwin.tar.xz.sha256) |
| [worktrunk-x86_64-pc-windows-msvc.zip](https://github.com/max-sixty/worktrunk/releases/download/v0.60.0/worktrunk-x86_64-pc-windows-msvc.zip) | x64 Windows | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.60.0/worktrunk-x86_64-pc-windows-msvc.zip.sha256) |
| [worktrunk-aarch64-unknown-linux-musl.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.60.0/worktrunk-aarch64-unknown-linux-musl.tar.xz) | ARM64 MUSL Linux | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.60.0/worktrunk-aarch64-unknown-linux-musl.tar.xz.sha256) |
| [worktrunk-x86_64-unknown-linux-musl.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.60.0/worktrunk-x86_64-unknown-linux-musl.tar.xz) | x64 MUSL Linux | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.60.0/worktrunk-x86_64-unknown-linux-musl.tar.xz.sha256) |



### Install via Cargo

```sh
cargo install worktrunk && wt config shell install
```

### Install via Winget (Windows)

```sh
winget install max-sixty.worktrunk && git-wt config shell install
```

### Install via AUR (Arch Linux)

```sh
paru worktrunk-bin && wt config shell install
```
</pre>
  <p>View the full release notes at <a href="https://github.com/max-sixty/worktrunk/releases/tag/v0.60.0">https://github.com/max-sixty/worktrunk/releases/tag/v0.60.0</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!11933
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.

2 participants