Brush (Bo(u)rn(e) RUsty SHell) a POSIX and Bash-Compatible Shell in Rust
a year ago
- #shell
- #rust
- #bash-compatible
- brush是用Rust实现的兼容POSIX和bash的shell
- 支持Linux、macOS系统,Windows可通过WSL实验性运行
- 已具备交互使用功能,但暂不建议用于生产环境
- 支持多数sh和bash脚本,已知限制在issue中跟踪记录
- 欢迎贡献代码与反馈,项目采用MIT许可证
- 安装方式:`cargo install --locked brush-shell` 或克隆仓库
- Nix和Arch Linux用户有专属安装方法
- 可通过`~/.brushrc`自定义配置,默认会处理`.bashrc`
- 已知缺失部分`set`/`shopt`选项功能及未实现特性
- 已通过550+测试用例对比其他shell的输出与退出码
- 依赖`reedline`、`clap`、`fancy-regex`、`tokio`和`nix`等库
- 使用`pprof-rs`、`criterion.rs`和`bash-completion`进行测试支持
- 设计灵感来自`nushell`、`rusty_bash`和`mvdan/sh`等shell