Skip to content
gwmgwmgwmv1.10.0

v0.4.0

Stable cut directly from dev (no RC) after v0.3.0. Bundles three features that were in-flight when 0.3.0 was promoted and the post-0.3.0 cleanup.

  • gwm switch (visible alias gwm s) - interactive worktree picker built on the existing TUI. The fuzzy filter bar opens immediately, Enter commits the highlighted worktree and prints its path on stdout, Esc / Ctrl-C / q cancels with exit code 1. Drop-in for the daily flow cd "$(gwm switch)". The bundled gcd shell wrapper routes its no-arg branch through gwm switch so gcd (no argument) opens the picker. Closes #22.
  • Extended [[bootstrap.command]].when predicates - the evaluator now recognises four additional keyword atoms alongside the legacy file_exists:: cmd_exists:<binary> (resolves via which), env_set:<NAME> (variable defined), env_eq:<NAME>=<value> (variable equals literal), glob_exists:<pattern> (recursive ** glob match under the worktree). Atoms compose with !, &&, || at the conventional precedence (! > && > ||); no parentheses. Example: when = "file_exists:package.json && cmd_exists:bun" picks bun install only when bun is on PATH. bootstrap::evaluate_when is now part of the public lib surface. gwm doctor recognises the new keywords; unknown keywords still default to true. Closes #25.
  • Nix flake (flake.nix, repo root) - declarative install + dev shell for Nix / NixOS users. Exposes packages.<system>.gwm (built via rustPlatform.buildRustPackage, Cargo.lock-pinned, vendored-libgit2 so no system libgit2 dep), aliased to packages.<system>.default; apps.<system>.gwm (+ default) so nix run github:kbrdn1/gwm-cli -- list works without a clone; devShells.<system>.default bundling the Rust toolchain, rust-analyzer, clippy, rustfmt, cargo-watch, cargo-edit, and the libgit2 build deps for nix develop; and a system-agnostic overlays.default so users with a nixpkgs overlay stack can pull gwm in cleanly. flake-utils.eachDefaultSystem covers Linux + macOS, x86_64 + aarch64. Closes #28.
  • gwm doctor: is_writable_dir now uses a random-suffixed tempfile-managed probe file (was a fixed .gwm-doctor-write-probe colliding under concurrent runs and leaking on SIGKILL). Closes #54.
  • gwm doctor: extract_binary parses shell-quoted run-strings via shell-words (was split_whitespace, which sliced through quotes and produced false-positive “binary not on PATH” warnings on configs like run = "\"my tool\" --flag"). Closes #54.
  • gwm cd <pattern> is now exposed as a clap visible_alias of gwm path instead of a separate Command::Cd variant. Same UX, one routing path. The --help listing shows path … [aliases: cd]. Closes #54.
  • doctor::Severity collapsed into CheckStatus (the two enums were structurally identical). A pub type Severity = CheckStatus; alias is kept so 0.3.0 library callers keep compiling. Closes #54.
  • doctor::run now hoists worktree::list once and passes &[WorktreeInfo] into the two checks that need it (prunable + orphan), saving a libgit2 call per gwm doctor invocation and unifying the error-handling path. Closes #54.
  • check_when_predicates: counter renamed from checked to recognised and incremented only after the prefix match, so the variable name accurately tracks what the "N predicate(s) recognised" detail reports. Closes #54.
  • doctor_on_fresh_repo_prints_checks: exit code is now bounded to [0, 1] (was unbounded, a panic / SEGV / exit-2 regression would have passed silently).
  • shell_init_{bash,zsh,fish,powershell}_emits_*: assertions tightened to pin the actual invocation (gwm cd "$@" / gwm cd $argv / gwm cd $Pattern) rather than the loose contains("gwm cd") which would have passed even if gwm cd appeared only in a comment.
  • resolvable_command_binary_is_ok: the loose !contains("sh ") assertion (would have passed on [sh,other] formatting) is replaced with structured parsing of the “not on PATH:” list.
  • README: doctor sample output updated to reflect the post-#47 ✓ N merged gwm-style branch(es) preserved wording; a second block shows the Warning-with-hint case so users see both happy and remediation paths.
  • README: test count refreshed from a stale “81” to the actual 140.
  • New changelogs/pre-releases/ directory holding per-RC notes (one file per RC, covering only the delta vs. the previous RC). Back-fills 0.2.0-rc.1, 0.3.0-rc.1, 0.3.0-rc.2, 0.3.0-rc.3. CHANGELOG.md > Past releases gains a ### Pre-releases sub-index. The corresponding GitHub Release bodies are re-pointed at these files via gh release edit --notes-file (instead of inheriting the full CHANGELOG.md as before).
  • CONTRIBUTING.md > Pre-release (from dev) describes the new per-RC notes flow; Stable release (from main) mentions --notes-file for the body.
  • shell-words 1 (new, runtime) - POSIX shell tokeniser used by the doctor’s extract_binary.
  • tempfile moved from [dev-dependencies] to [dependencies] - used at runtime by the doctor’s is_writable_dir write-probe.
  • glob 0.3 (new) - backs the glob_exists: predicate in bootstrap::evaluate_when.
  • dirs 5 → 6 (Dependabot bump, #17).