Hello ports@,

Please find attached a new port for Brush 0.4.0:

shells/brush

Brush (Bourne RUsty SHell) is a Bash- and POSIX-compatible shell
implemented in Rust:

https://github.com/reubeno/brush

The port targets the upstream brush-shell-v0.4.0 release.

Brush aims to run existing shell scripts and Bash configuration with as
few changes as possible. It implements a large subset of Bash and POSIX
shell behavior and also provides an interactive shell with syntax
highlighting, history, auto-suggestions and programmable completion.
Upstream validates it against Bash with a large compatibility test
suite.

The main purpose of this port is also to make Brush usable as an
alternative to GNU Bash for ports that currently depend on shells/bash.

The package installs the executable under both:

bin/brush
bin/bash

with bin/bash being a symlink to brush. It conflicts with shells/bash
and declares:

@pkgpath shells/bash

so the package tools can treat Brush as a provider of that package path.
This means ports which invoke bash by name can be tested with Brush
without modifying their scripts; only the package dependency needs to
be changed from shells/bash to shells/brush.

The port builds the brush-shell workspace package, which is upstream's
default member and the package recommended for normal installation.
The optional experimental feature set, including the embedded uutils
coreutils builtins, is intentionally left disabled.

There is one OpenBSD-specific source patch. brush-core normally uses
nix::sys::wait::waitid(), but that API is not exposed by the nix crate
on OpenBSD. The patch uses Brush's existing direct waitid()
implementation, currently used for macOS, on OpenBSD as well. A similar
portability problem has also been reported on NetBSD.

The package registers both brush and bash in /etc/shells.

Brush is not yet a complete replacement for Bash. Some functionality,
including select, wait -n, disown and logout, is still missing, signal
trap support remains incomplete, and there are known compatibility edge
cases. The pkg description therefore explicitly warns against replacing
shells/bash globally without first testing the affected scripts.

The port uses the standard devel/cargo infrastructure and the complete
Cargo.lock dependency set from upstream.

Thank you for your time and consideration.

Best regards,
David.

Attachment: brush.tar.gz
Description: application/gzip

Reply via email to