You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
**brush** (Bourne Rusty Shell) is a POSIX- and bash-compatible shell implemented in Rust. It's a multi-crate workspace (~60K lines of Rust code) targeting Linux, macOS, and WSL, with experimental Windows and WASM support. The project emphasizes compatibility testing against bash as an oracle.
6
6
7
-
**Key Stats:** Rust 2024 edition, MSRV 1.87.0, 5 main crates, 675+ compatibility test cases, published to crates.io.
7
+
**Key Stats:** Rust 2024 edition, MSRV 1.87.0, 5 main crates, 1400+ compatibility test cases, published to crates.io.
`brush` (**B**o(u)rn(e) **RU**sty **SH**ell) is a [POSIX-](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html) and [bash-](https://www.gnu.org/software/bash/)compatible shell,
42
-
implemented in Rust. At its core is an embeddable shell interpreter published for reuse
43
-
in other Rust projects. It's built and tested on Linux, macOS, and WSL. Native Windows
44
-
support is experimental.
37
+
`brush` (**B**o(u)rn(e) **RU**sty **SH**ell) is a modern [bash-](https://www.gnu.org/software/bash/) and [POSIX-](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html) compatible shell written in Rust. Run your existing scripts and `.bashrc` unchanged -- with syntax highlighting and auto-suggestions built in.
38
+
39
+
## At a glance
40
+
41
+
β Your existing `.bashrc` just worksβaliases, functions, completions, all of it.<br/>
42
+
β¨ Syntax highlighting and auto-suggestions built in and enabled by default.<br/>
43
+
π§ͺ Validated against bash with [~1400 compatibility tests](brush-shell/tests/cases).<br/>
`brush` is functional for interactive use as a daily driver! It executes most `sh` and `bash` scripts we've
51
-
encountered. Known limitations are tracked with filed issues. Out of an abundance of caution,
52
-
we wouldn't recommend using it yet in _production_ scenarios in case it doesn't behave identically
53
-
to your existing stable shell. (If you do find any behavioral differences, though, please report them with an
54
-
issue!)
50
+
> β οΈ **Not everything works yet:**`coproc`, `select`, ERR traps, and some edge cases aren't supported. See the [Compatibility Reference](docs/reference/compatibility.md) for details.
55
51
56
-
Contributions and feedback of all kinds are welcome! For more guidance, please consult our
57
-
[contribution guidelines](CONTRIBUTING.md). For more technical details, please consult the
58
-
[documentation](docs/README.md) in this repo.
52
+
### Quick start:
59
53
60
-
This project was originally borne out of curiosity and a desire to learn. We're doing our best to keep that
61
-
attitude :).
54
+
```console
55
+
$ cargo binstall brush-shell # using cargo-binstall
56
+
$ brew install brush # using Homebrew
57
+
$ pacman -S brush # Arch Linux
58
+
$ cargo install --locked brush-shell # Build from sources
59
+
```
62
60
63
-
<br/>
61
+
`brush` is ready for use as a daily driver. We test every change against `bash` to keep it that way.
62
+
63
+
More detailed installation instructions are available below.
_When you run `brush`, it should look exactly as `bash` does on your system: it processes your `.bashrc` and
72
93
other standard configuration. If you'd like to distinguish the look of `brush` from the other shells
73
94
on your system, you may author a `~/.brushrc` file._
74
95
75
-
<detailsopen>
76
-
<summary>π <b>Installing prebuilt binaries from GitHub</b></summary>
96
+
<details>
97
+
<summary>πΊ <b>Installing using Homebrew</b> (macOS/Linux)</summary>
77
98
78
-
We publish prebuilt binaries of `brush`for Linux (x86_64, aarch64) and macOS (aarch64) to GitHub for official [releases](https://github.com/reubeno/brush/releases). You can manually download and extract the `brush` binary from one of the archives published there, or otherwise use the GitHub CLI to download it, e.g.:
99
+
Homebrew users can install using [the `brush`formula](https://formulae.brew.sh/formula/brush):
<summary>π <b>Installing prebuilt binaries via `cargo binstall`</b></summary>
94
120
95
121
You may use [cargo binstall](https://github.com/cargo-bins/cargo-binstall) to install pre-built `brush` binaries. Once you've installed `cargo-binstall` you can run:
@@ -101,82 +127,78 @@ cargo binstall brush-shell
101
127
</details>
102
128
103
129
<details>
104
-
<summary> π¨ <b>Installing from sources</b></summary>
130
+
<summary>π <b>Installing prebuilt binaries from GitHub</b></summary>
105
131
106
-
To build from sources, first install a working (and recent) `rust` toolchain; we recommend installing it via [`rustup`](https://rustup.rs/). Then run:
132
+
We publish prebuilt binaries of `brush` for Linux (x86_64, aarch64) and macOS (aarch64) to GitHub for official [releases](https://github.com/reubeno/brush/releases). You can manually download and extract the `brush` binary from one of the archives published there, or otherwise use the GitHub CLI to download it, e.g.:
<summary>π§ <b>Installing on Arch Linux</b></summary>
147
+
<summary>π§ <b>Installing using Nix</b></summary>
127
148
128
-
Arch Linux users can install `brush` from the official [extra repository](https://archlinux.org/packages/extra/x86_64/brush/):
149
+
If you are a Nix user, you can use the registered version:
129
150
130
151
```bash
131
-
pacman -S brush
152
+
nix run 'github:NixOS/nixpkgs/nixpkgs-unstable#brush' -- --version
132
153
```
133
154
134
155
</details>
135
156
136
157
<details>
137
-
<summary>πΊ <b>Installing using Homebrew</b></summary>
158
+
<summary> π¨ <b>Building from sources</b></summary>
138
159
139
-
Homebrew users can install using [the `brush` formula](https://formulae.brew.sh/formula/brush):
160
+
To build from sources, first install a working (and recent) `rust` toolchain; we recommend installing it via [`rustup`](https://rustup.rs/). Then run:
140
161
141
162
```bash
142
-
brew install brush
163
+
cargo install --locked brush-shell
143
164
```
144
165
145
166
</details>
146
167
147
-
## π₯ Community
148
-
149
-
`brush` has a community Discord server, available [here](https://discord.gg/kPRgC9j3Tj).
168
+
## Community & Contributing
150
169
151
-
## π§ͺ Testing strategy
170
+
This project started out of curiosity and a desire to learnβwe're keeping that attitude. If something doesn't work the way you'd expect, [let us know](https://github.com/reubeno/brush/issues)!
152
171
153
-
This project is primarily tested by comparing its behavior with other existing shells, leveraging the latter as test oracles. The integration tests implemented in this repo include [900+ test cases](brush-shell/tests/cases) run on both this shell and an oracle, comparing standard output and exit codes.
172
+
*[Discord server](https://discord.gg/kPRgC9j3Tj) β chat with the community
173
+
*[Building from source](docs/how-to/build.md) β development workflow
174
+
*[Contribution guidelines](CONTRIBUTING.md) β how to submit changes
175
+
*[Technical docs](docs/README.md) β architecture and reference
154
176
155
-
For more details, please consult the [reference documentation on integration testing](docs/reference/integration-testing.md).
177
+
## Related Projects
156
178
157
-
## π Credits
179
+
Other POSIX-ish shells implemented in non-C/C++ languages:
158
180
159
-
There's a long list of OSS crates whose shoulders this project rests on. Notably, the following crates are directly relied on for major portions of shell functionality:
181
+
*[`nushell`](https://www.nushell.sh/) β modern Rust shell (provides `reedline`)
182
+
*[`fish`](https://fishshell.com) β user-friendly shell ([Rust port in 4.0](https://fishshell.com/blog/rustport/))
183
+
*[`Oils`](https://github.com/oils-for-unix/oils) β bash-compatible with new Oil language
184
+
*[`mvdan/sh`](https://github.com/mvdan/sh) β Go implementation
185
+
*[`rusty_bash`](https://github.com/shellgei/rusty_bash) β another Rust bash-like shell
160
186
161
-
*[`reedline`](https://github.com/nushell/reedline) - for readline-like input and interactive usage
162
-
*[`clap`](https://github.com/clap-rs/clap) - command-line parsing, used both by the top-level brush CLI as well as built-in commands
163
-
*[`fancy-regex`](https://github.com/fancy-regex/fancy-regex) - relied on for everything regex
0 commit comments