Built-in shell
One shell on macOS, Windows and Linux.
The default shell in a tab is Shell's own interpreter. It runs bash and zsh scripts, brings its tools with it, and is the same interpreter on all three systems.
Compatibility
- Dialects
- A script runs in the dialect its
#!line names, bash or zsh, and as bash when it names none. The interactive dialect is a setting. - bash's suite
- Run on bash's own test suite, the built-in shell produces 12,786 of the 12,838 lines of expected output (99.6%).
- Parsing
- A corpus of 10,047 scripts that bash or zsh accept, gathered from Homebrew,
/usr, published startup configurations and other source trees, parses without error. That is parsing, not running. - Git's suite
- Git's own test suite, 1,058 test scripts, run with the built-in shell as its shell, fails one case that it passes under the system's.
- Startup files
- Your
.zshrcand.bashrcare read. 22 published setups, among them oh-my-zsh, prezto, zinit, zimfw, antidote and powerlevel10k, start with the same resulting state as in the real shell. - Windows
- A native program on the Win32 API. No WSL, no MSYS, no Cygwin.
Over 150 tools built in
The tools a script expects are part of Shell, so they are there on a bare machine and on Windows:
grepsedawkfindxargsdiffpatchtarzipgzipxzzstdcurlwgetjqmakergfdtree
- Implementation
- Each is written for Shell, to behave as a named version of its original:
rgas ripgrep 15,fdas fd 10,jqas jq 1.7,makeas GNU make 4.4. - Precedence
- On macOS and Linux, Shell's version of a tool runs in two cases: it is verified to accept every option of the system's version (
mv,cp,rm,mkdirand ten other file tools), or the system has none. Otherwise the one on yourPATHruns. The Built-in Commands setting makes Shell's the first choice, the last, or turns them off. curl,wget- Run on Shell's own HTTP/1.1 and HTTP/2 client, with the operating system's TLS.
make- Unlike GNU make, builds in parallel unless told otherwise.
qcc- A C compiler for arm64 and x86-64, with its own linker for Mach-O, ELF and PE. It does not optimize. It builds Shell itself during development: 666,000 preprocessed lines in 0.32 seconds on eight threads of an M1 Pro.
Integration with the terminal
- As you type
- Before Enter, the line shows how many files a glob matches, the value of a variable or that it is unset, which program a name would run, and how many files and directories an
rmwould delete. undo- Writes the command that reverses the last one, for you to run: a
mv, acp, amkdir, achmod, agzip, acd. Before reversing, it checks that the file is still as the command left it. - Tables
ls,ps,dfandduprint rows that sort by any column and copy as a table.$out- What the previous command printed.
$outsis an array of the last 32 outputs.
Limits
- Support for zsh is less complete than for bash. Scripts and startup files run. The line is edited by Shell's own editor, so
zlewidgets andbindkeybindings are accepted and ignored. - Shell draws its own prompt. A prompt theme's settings load, but its look does not carry over.
rmcannot be undone, nor can a command that overwrote a file.undosays so.undo, tables,$outand the checks as you type work in the built-in shell, not in a system shell run in a tab.- To use zsh, bash or fish itself, choose it as a tab's shell. Its commands are still blocks.
The built-in shell runs in the terminal, beside the editor and the Git client.
Download Shell
Free to evaluate, with every feature and no time limit.