惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
J
Java Code Geeks
V
V2EX
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Hugging Face - Blog
Hugging Face - Blog
F
Fortinet All Blogs
aimingoo的专栏
aimingoo的专栏
B
Blog
A
About on SuperTechFans
有赞技术团队
有赞技术团队
月光博客
月光博客
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
腾讯CDC
美团技术团队
大猫的无限游戏
大猫的无限游戏
爱范儿
爱范儿
N
Netflix TechBlog - Medium
C
Check Point Blog
Recent Announcements
Recent Announcements
博客园 - Franky
博客园 - 叶小钗
T
Tailwind CSS Blog

Help Net Security

ChatGPT advanced account security adds passkeys and hardware keys Week in review: High-severity LPE vulnerability in the Linux kernel, cPanel 0-day exploited for months Automating Pentest Delivery: A Step-by-Step Guide - PlexTrac Open-source privacy proxy masks PII before prompts reach external AI services Shadow AI risks deepen as 31% of users get no employer training Identity is the control plane for distributed infrastructure AI traffic is getting bigger, louder, and less predictable New infosec products of the month: April 2026 cPanel zero-day exploited for months before patch release (CVE-2026-41940) Cisco releases open-source toolkit for verifying AI model lineage Met Police face criticism for using AI to spy on their own officers Nine-year-old Linux kernel flaw enables reliable local privilege escalation (CVE-2026-31431) Hacker with a special interest in breaching sports institutions ends behind bars - Help Net Security IP Fabric MCP server adds governance and control to enterprise AIOps workflows - Help Net Security Aqua Compass MCP server enables real-time investigation and containment of runtime threats - Help Net Security Google brings instant email verification to Android, no OTP needed - Help Net Security If cyber espionage via HDMI worries you, NCSC built a device to stop it - Help Net Security Apple fixes iPhone bug that let FBI retrieve deleted Signal messages(CVE-2026-28950) - Help Net Security GopherWhisper APT group hides command and control traffic in Slack and Discord - Help Net Security OpenAI tackles a bad habit people have when interacting with AI - Help Net Security A year in, Zoom's CISO reflects on balancing security and business - Help Net Security Scenario: Open-source framework for automated AI app red-teaming - Help Net Security GDPR works, but only where someone enforces it - Help Net Security Ransomware, fraud, and lawsuits drive cyber insurance claims to new peaks - Help Net Security Google’s Workspace Intelligence promises privacy while running on your data - Help Net Security Cyberattack on French government agency triggers phishing alert - Help Net Security Claude Mythos finds 271 Firefox flaws, Mozilla believes zero-days are numbered - Help Net Security Prove Identity Platform connects verification, authentication, and fraud prevention - Help Net Security New Mirai variants target routers and DVRs in parallel campaigns - Help Net Security Acronis GenAI Protection gives MSPs control over AI usage and data risks - Help Net Security
Brush shell 0.4.0 tightens script safety, widens platform...
Sinisa Marko · 2026-05-04 · via Help Net Security

Rust-based alternatives to traditional Unix shells continue to attract users who want bash compatibility alongside built-in features like syntax highlighting and history-based suggestions. Brush, a bash- and POSIX-compatible shell written in Rust, sits in that group, and version 0.4.0 brings more than 200 merged pull requests representing several months of development.

Brush shell

Bash features filled in

The release closes several long-standing gaps in bash compatibility. Brush now implements set -e (errexit) and pipefail with the same exemption rules bash has accumulated over the years. The set -u (nounset) option errors on unset variable references, including the interaction with ${#arr[i]}. The failglob option treats no-match globs as errors, and the ERR trap is implemented alongside earlier EXIT trap work. Coprocess support via coproc covers both parsing and execution. A new --noglob/-f command-line flag has been added, and unknown command-line options now exit with code 2 to match bash.

Arithmetic handling received attention across high-radix literals, overflow and underflow behavior, the legacy $[expr] syntax, the |= and ^= assignment operators, nested array indices, and infinite-recursion detection. Heredocs are more reliable inside command substitutions and quoted contexts. Builtins including caller, read, mapfile -O, getopts, compgen -A, and printf %q saw fixes or expansions. The maintainer warns that scripts which ran cleanly under v0.3.0 may now exit with errors that bash would also have produced, and treats this as intended behavior.

Platform reach widens

Using brush as a login shell on macOS works after a fix for a startup hang in that scenario. Windows path handling was overhauled, /dev/null emulation was added, and CI now exercises the Windows test suite. FreeBSD builds again, Android and 32-bit targets compile cleanly, and wasm32-wasip2 smoke tests run in CI. Windows support remains experimental.

Interactive features

An opt-in TOML configuration file at ~/.config/brush/config.toml allows brush-specific settings outside shell scripts. Zsh-style preexec and precmd hooks are available behind an experimental flag, useful for prompt frameworks and timing tools. Terminal integration with semantic prompt and command marking can be enabled the same way.

Readline macro support was added with follow-up work to handle real-world inputrc forms, improving compatibility with starship, atuin, and fzf. Completion fixes cover filename escaping, . and .. entries, the mark-directories setting, and COMP_KEY/COMP_TYPE population.

API changes for embedders

The Shell type is now generic over a ShellExtensions parameter, providing a hook for embedders to add custom builtins and variable behavior without forking. Shell fields are private, and serde features are available on both brush-parser and brush-core for AST and shell-state serialization. Scaffolding for a future winnow-based parser has been added, with the existing PEG parser remaining the production code path.

The minimum supported Rust version moves to 1.88. An opt-in build flag bundles coreutils builtins into a single binary, useful for containers, embedded scenarios, and Windows. Brush is distributed under the MIT license through crates.io, Homebrew, Arch Linux’s extra repository, and Nix.

Brush 0.4.0 is available for free on GitHub.

Must read:

Subscribe to the Help Net Security ad-free monthly newsletter to stay informed on the essential open-source cybersecurity tools. Subscribe here!