Skip to content

Commit 5b551a6

Browse files
committed
Adds a readme for the shell
1 parent 454e36f commit 5b551a6

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

packages/berry-shell/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# `@berry/shell`
2+
3+
A Javascript implementation of a bash-like shell (we use it in Yarn 2 to provide cross-platform scripting). This package contains the parser and interpreter merged together; for the parser only you can check the `@berry/parsers` package, but you probably won't need it.
4+
5+
## Usage
6+
7+
```ts
8+
import {execute} from '@berry/shell';
9+
10+
process.exitCode = await execute(`ls "$1" | wc -l`, [process.cwd()]);
11+
```
12+
13+
## Features
14+
15+
- Typechecked
16+
- Portable across systems
17+
- Supports custom JS builtins
18+
- Supports pipes
19+
- Supports logical operators
20+
- Supports subshells
21+
- Supports variables
22+
- Supports string manipulators
23+
- Supports argc/argv
24+
- Supports the most class builtins
25+
- Doesn't necessarily need to access the fs
26+
27+
## Help Wanted
28+
29+
- Stream redirections (`> foo`)

0 commit comments

Comments
 (0)