Skip to content

Release Notes

brush-v0.3.0

chore: Release package brush version 0.3.0

brush v0.3.0

🚀 Release Notes

This is a major release, containing architectural improvements and compatibility-focused features and fixes. A big thanks to all of the contributors over the last few months, including issue filers, question-askers, and code contributors 🙏.

Based on user-filed issues (thank you!), targeted work went into improving compatibility with popular tools like fzf and neofetch.

Additionally, a significant amount of work went into refactoring and improving usability of the public API surface within the crate-based libraries that make up brush's core. These come with breaking changes for programmatic clients, but we're confident they will come with significant benefit.

The following summary covers the most notable changes and the full change details are below.

✅ Features and Improvements

Builtins

  • The fc builtin received its initial implementation!
  • bind implementation received support for binding key sequences to readline functions (e.g., "\C-a":beginning-of-line).
  • trap now fully implements the EXIT trap.

Standard variables

  • Basic support for use of BASH_XTRACEFD was added. A new command-line parameter to brush (--inherit-fd) enables allow-listing inherited file descriptors for use within the shell.

Control flow

  • Support for an undocumented C-like syntax for arithmetic for loops has been implemented for improved compatibility.

🪳 Notable bug fixes

  • Fixes for quote handling of \' in double-quoted word contexts.
  • Targeted fixes to history importing make it more robust against non-UTF8 compatible text.
  • Fixes for parsing of here-documents in quoted command substitutions.
  • Fixes for nuanced quote removal in parameter expressions with replacements (e.g., "${var:+'x'}").
  • Fixes for command substitution expansions resulting in spawning processes with large volumes of output (e.g., $(emit-a-lot-of-text)).
  • Updates to the open file table made by commandless exec (e.g., exec 2>/dev/null) are now reflected immediately, even when in a loop context.

🚧 API Changes

Changes in this section pertain to programmatic clients of the brush-core, brush-parser, and brush-interactive crates. They do not apply to application-level shell users.

brush-builtins

All shell builtins have been moved into a new dedicated brush-builtins crate. With this move, significant refactoring was done to ensure that these builtins are all implementable using public APIs exposed by brush-core. In doing so, this also significantly advanced the richness of the latter APIs.

Important

Programmatic clients of the brush-core crate will find that a constructed Shell is not automatically populated with the usual set of builtins. New optional APIs exist in the brush-builtins crate to retrieve default builtins and in brush-core to register them with a Shell instance.

Parsing and AST

As an important step on our journey to evolve brush's parsers, @lu_zero has made contributions that start enriching our parsed Abstract Syntax Trees (ASTs) with links back to the source text. As part of this work, a new SourceLocation trait was introduced and implemented for many AST node types. Work will continue in the coming releases.

API Ergonomics

To improve ergonomics, we've introduce builder-based construction utilities to key structures like brush_core::Shell. We will continue to expand on this adoption over time to simplify the work of constructing these values.

Note that the signature of Shell::new() has changed and may require adjustment in callers.

Error handling

As preparatory work for future improvements, we've overhauled the core error types and execution result types in brush-core:

  • Error has been renamed to ErrorKind, with a new wrapping Error struct type that can carry additional context. This will be used in the future for improved diagnostics.

  • Clients of brush-core can now provide their own custom error formatter to render a displayable string from an Error value. This will be used by some of our frontends for fancier diagnostics in the future. It also decouples error formatting from writing.

  • Multiple overlapping result types across the core interpreter, command utilities, and builtins have been consolidated into a coherent set of ExecutionResult, ExecutionExitCode, and ExecutionControlFlow types. Along the way a handful of bugs for edge cases were identified and resolved as part of the streamlining.

Details

  • build(deps): bump the github-actions group with 6 updates by @dependabot[bot] in #669
  • build(deps): bump procfs from 0.17.0 to 0.18.0 in the cargo group across 1 directory by @dependabot[bot] in #671
  • build(deps): bump the github-actions group with 5 updates by @dependabot[bot] in #675
  • Add a ShellBuilder by @lu-zero in #651
  • build(deps): bump the cargo group with 4 updates by @dependabot[bot] in #676
  • fix: clean cache in cd pipeline by @reubeno in #679
  • ci: run static code checks on linux + macOS too by @reubeno in #678
  • build(deps): bump serde from 1.0.221 to 1.0.223 in the cargo group by @dependabot[bot] in #680
  • build(deps): bump the github-actions group with 5 updates by @dependabot[bot] in #681
  • build(deps): bump the github-actions group with 2 updates by @dependabot[bot] in #683
  • build(deps): bump the cargo group with 5 updates by @dependabot[bot] in #684
  • chore: fix build error with cargo nightly by @reubeno in #687
  • build(deps): bump the github-actions group with 4 updates by @dependabot[bot] in #685
  • build(deps): bump the cargo group with 3 updates by @dependabot[bot] in #686
  • refactor: use Shell builder pattern in more code by @reubeno in #688
  • refactor: update Shell::new() to take creation options as owned by @reubeno in #689
  • ci: fix benchmark execution by @reubeno in #691
  • refactor: move builtins into their own crate by @reubeno in #690
  • refactor: Shell struct API improvements by @reubeno in #692
  • chore(msrv)!: upgrade MSRV to 1.87.0 by @reubeno in #693
  • refactor: os_pipe::pipe() -> std::io::pipe() by @reubeno in #695
  • chore: update dependencies by @reubeno in #696
  • build(deps): bump the github-actions group with 6 updates by @dependabot[bot] in #697
  • build(deps): bump bon from 3.7.2 to 3.8.0 in the cargo group by @dependabot[bot] in #698
  • build(deps): bump the github-actions group with 4 updates by @dependabot[bot] in #707
  • build(deps): bump the cargo group with 5 updates by @dependabot[bot] in #708
  • fix: workaround error on nightly by @reubeno in #711
  • fix: don't fail importing unreadable history lines by @reubeno in #710
  • refactor: extract script + function call stacks to their own modules by @reubeno in #709
  • docs: first draft of an AI policy in CONTRIBUTING.md by @reubeno in #694
  • build(deps): bump the github-actions group with 3 updates by @dependabot[bot] in #712
  • build(deps): bump the cargo group with 8 updates by @dependabot[bot] in #713
  • fix: tokenizer handling of here docs in quoted command substitutions by @reubeno in #716
  • build(deps): bump the github-actions group with 5 updates by @dependabot[bot] in #718
  • build(deps): bump the cargo group with 2 updates by @dependabot[bot] in #717
  • docs: add an initial AGENTS.md file by @reubeno in #714
  • refactor: error/result type overhaul by @reubeno in #720
  • feat: enable custom error formatting by @reubeno in #722
  • fix: address lint errors from stable + nightly by @reubeno in #723
  • chore: add instructions to guide advisory-only copilot code reviews by @reubeno in #721
  • ci: add cooldown settings for dependabot by @reubeno in #724
  • fix: add missing license symlink by @reubeno in #725
  • fix: add missing cfg conditions on builtin registrations by @reubeno in #726
  • Refactor SourcePosition to use Arc by @lu-zero in #727
  • Introduce source location by @lu-zero in #728
  • fix: correct read variable update behavior on empty input by @reubeno in #729
  • fix: address race conditions in basic input tests by @reubeno in #730
  • ci: upgrade bash-completion by @reubeno in #731
  • fix: do not pass along exported-but-unset vars by @reubeno in #732
  • fix: comment unsafe blocks + better harden 1 block by @reubeno in #733
  • ci: update cd workflow runners by @reubeno in #734
  • test: add not-yet-passing tests for set -u and set -e by @reubeno in #736
  • refactor: move more platform-specific code under sys by @reubeno in #735
  • feat: implement fc builtin by @reubeno in #739
  • feat(bind): extend key binding support by @reubeno in #740
  • docs: add fzf demo tape by @reubeno in #741
  • docs: update readme by @reubeno in #742
  • feat: implement alternate arithmetic for syntax by @reubeno in #744
  • fix(builtins): suppress error when type -p sees no command by @reubeno in #745
  • feat: implement BASH_XTRACEFD by @reubeno in #747
  • fix: command substitutions with large output by @reubeno in #748
  • feat: revisit how ExecutionParameters layer open files atop the Shell by @reubeno in #749
  • feat: basic support for trap EXIT by @reubeno in #750
  • fix: correct handling of expansion in parameter exprs with replacements by @reubeno in #751
  • test: add new command substitution test case by @reubeno in #752
  • build(deps): bump the github-actions group with 4 updates by @dependabot[bot] in #754
  • build(deps): bump the cargo group with 3 updates by @dependabot[bot] in #755
  • feat: implement opt-in fd inheritance from host env by @reubeno in #753
  • fix: correct expansion behavior in prompts by @reubeno in #756
  • chore: update dependencies by @reubeno in #757
  • chore: add brush crate + docs publishing by @reubeno in #760
  • fix: escaping and pipeline parse issues by @reubeno in #762
  • chore: prep release by @reubeno in #763
  • fix: correct changelog and versions by @reubeno in #764

Full Changelog: brush-shell-v0.2.23...brush-shell-v0.3.0

brush-parser-v0.3.0

chore: Release package brush-parser version 0.3.0

brush-interactive-v0.3.0

chore: Release package brush-interactive version 0.3.0

brush-core-v0.4.0

chore: Release package brush-core version 0.4.0

brush-builtins-v0.1.0

chore: Release package brush-builtins version 0.1.0

brush v0.2.22

🚀 Release Notes

This release contains a few focused changes and dependency upgrades.

Notable changes:

  • Added initial (optional) miette integration for improved error messages. (Thanks to @lu-zero for making this happen!)
  • Resolved some warnings and errors with the experimental Windows build of brush. (Thanks to @twz123 for identifying issues with the homedir crate!)
  • Excluded from history commands executed by bind bindings.

🗒️ Details

  • fix: exclude bind-bound commands from history by @reubeno in #650
  • build(deps): bump the cargo group with 4 updates by @dependabot[bot] in #654
  • build(deps): bump the github-actions group with 5 updates by @dependabot[bot] in #655
  • Add minimal miette support by @lu-zero in #648
  • fix(cmdline): improve error handling for unknown cmdline options by @reubeno in #656
  • docs: update readme by @reubeno in #657
  • build(deps): bump the github-actions group with 7 updates by @dependabot[bot] in #658
  • build(deps): bump the cargo group with 4 updates by @dependabot[bot] in #659
  • chore: additional clippy fixes by @reubeno in #661
  • chore: downgrade homedir by @reubeno in #662
  • chore: address warnings on windows targets by @reubeno in #663
  • build(deps): bump tracing-subscriber from 0.3.19 to 0.3.20 in the cargo group by @dependabot[bot] in #664
  • chore: prepare release by @reubeno in #665

Full Changelog: brush-shell-v0.2.21...brush-shell-v0.2.22

brush-parser-v0.2.20

chore: Release package brush-parser version 0.2.20

brush-interactive-v0.2.22

chore: Release package brush-interactive version 0.2.22