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 aliasgwm s) - interactive worktree picker built on the existing TUI. The fuzzy filter bar opens immediately,Entercommits the highlighted worktree and prints its path on stdout,Esc/Ctrl-C/qcancels with exit code1. Drop-in for the daily flowcd "$(gwm switch)". The bundledgcdshell wrapper routes its no-arg branch throughgwm switchsogcd(no argument) opens the picker. Closes #22.- Extended
[[bootstrap.command]].whenpredicates - the evaluator now recognises four additional keyword atoms alongside the legacyfile_exists::cmd_exists:<binary>(resolves viawhich),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"picksbun installonly when bun is on PATH.bootstrap::evaluate_whenis now part of the public lib surface.gwm doctorrecognises 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. Exposespackages.<system>.gwm(built viarustPlatform.buildRustPackage,Cargo.lock-pinned,vendored-libgit2so no system libgit2 dep), aliased topackages.<system>.default;apps.<system>.gwm(+default) sonix run github:kbrdn1/gwm-cli -- listworks without a clone;devShells.<system>.defaultbundling the Rust toolchain,rust-analyzer,clippy,rustfmt,cargo-watch,cargo-edit, and the libgit2 build deps fornix develop; and a system-agnosticoverlays.defaultso users with a nixpkgs overlay stack can pullgwmin cleanly.flake-utils.eachDefaultSystemcovers Linux + macOS, x86_64 + aarch64. Closes #28.
gwm doctor:is_writable_dirnow uses a random-suffixedtempfile-managed probe file (was a fixed.gwm-doctor-write-probecolliding under concurrent runs and leaking on SIGKILL). Closes #54.gwm doctor:extract_binaryparses shell-quoted run-strings viashell-words(wassplit_whitespace, which sliced through quotes and produced false-positive “binary not on PATH” warnings on configs likerun = "\"my tool\" --flag"). Closes #54.
Changed
Section titled “Changed”gwm cd <pattern>is now exposed as a clapvisible_aliasofgwm pathinstead of a separateCommand::Cdvariant. Same UX, one routing path. The--helplisting showspath … [aliases: cd]. Closes #54.
Refactored
Section titled “Refactored”doctor::Severitycollapsed intoCheckStatus(the two enums were structurally identical). Apub type Severity = CheckStatus;alias is kept so 0.3.0 library callers keep compiling. Closes #54.doctor::runnow hoistsworktree::listonce and passes&[WorktreeInfo]into the two checks that need it (prunable+orphan), saving a libgit2 call pergwm doctorinvocation and unifying the error-handling path. Closes #54.check_when_predicates: counter renamed fromcheckedtorecognisedand 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 loosecontains("gwm cd")which would have passed even ifgwm cdappeared 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) preservedwording; 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-fills0.2.0-rc.1,0.3.0-rc.1,0.3.0-rc.2,0.3.0-rc.3.CHANGELOG.md > Past releasesgains a### Pre-releasessub-index. The corresponding GitHub Release bodies are re-pointed at these files viagh release edit --notes-file(instead of inheriting the fullCHANGELOG.mdas before). CONTRIBUTING.md > Pre-release (from dev)describes the new per-RC notes flow;Stable release (from main)mentions--notes-filefor the body.
Dependencies
Section titled “Dependencies”shell-words1(new, runtime) - POSIX shell tokeniser used by the doctor’sextract_binary.tempfilemoved from[dev-dependencies]to[dependencies]- used at runtime by the doctor’sis_writable_dirwrite-probe.glob0.3(new) - backs theglob_exists:predicate inbootstrap::evaluate_when.dirs5→6(Dependabot bump, #17).