Releases: smorin/toggle
Releases · smorin/toggle
v0.2.3 — togl binary alias
Added
toglbinary alias —cargo install toglnow installs bothtoggleandtogl. Same behavior under either name;--help,--version, completions, and the man page each self-identify by the invoked name.
$ togl --help
Usage: togl [OPTIONS] [PATHS]...
$ toggle --help
Usage: toggle [OPTIONS] [PATHS]...Fixed
--helpand--versionnow exit with code0instead of1. Pre-existing bug where clap's display-only errors were classified as Usage failures.
v0.2.2 — published to crates.io as togl
Changed
- Crate renamed
toggle→toglfor crates.io (togglewas already taken). The installed binary is stilltoggle.
Install
cargo install toglThis release contains no functional changes from v0.2.1 — only the crate metadata changed so the package could be published.
v0.2.1 — shell completions and man page
Added
--completions <SHELL>— emits a shell completion script to stdout. Supportsbash,zsh,fish,powershell,elvish.toggle --completions bash > /etc/bash_completion.d/toggle--man— emits a roff-formatted man page to stdout.toggle --man > toggle.1 && man ./toggle.1
Fixed
repositoryfield inCargo.tomlnow points at the real GitHub URL.
Changed
- Path argument is now optional so
--completionsand--mancan run without targets.
See CHANGELOG.md for full history.
v0.2.0 — section variants and scan enhancements
Highlights
PRD §0.13 (Section Variants) and §0.14 (Scan Enhancements) — bundled as four slices on main.
group:variant section markers (PRD §0.13)
- New ID syntax:
# toggle:start ID=db:postgresgroups variants underdb. -S groupflips a 2-variant pair (active ↔ commented).-S group:variantactivates one variant, comments every sibling.-S group --force on|offapplies the same state to every variant of the group.- Errors when
-S grouptargets a 3+ variant group without a:variantqualifier.
--pair validation flag (PRD §0.13.4)
- Pre-execution guard that errors when the targeted group does not contain exactly 2 variants.
- No file mutations occur on failure.
Variant-aware --scan (PRD §0.14.1–§0.14.2, §0.14.4)
- Per-file table now includes a
TYPEcolumn (solo/pair/group). --scan -Rrecursive summary aggregates per group across files.--scan -S <group>shows the detailed variant-by-variant view with file refs.--scan --jsonemits a nested{ sections: [...] }tree with variants grouped under their parent.
--scan --check validation (PRD §0.14.3)
- Reports unclosed
toggle:startmarkers, duplicate IDs in a single file, cross-file variant gaps, and (with--pair) pair-mismatches. - Exits non-zero on any error finding; warnings do not fail the run.
Repo cleanup
- Removed the unrunnable task-master npm scaffolding (
package.json,scripts/dev.js, etc.) which closed 17 Dependabot alerts in unused npm transitives.
Stats
- 22 commits since v0.1.0 (P01–P04 + repo cleanup)
- Tests: 7 doc + 90 unit + 111 integration = 208 passing
clippy -D warningsclean
Compatibility
Existing solo-section workflows are unchanged. The TYPE column and nested JSON shape are new — any tooling that parsed the old flat --scan --json array will need to read .sections[] instead.