Introduction
grfsh is a Unix shell written in Rust. It reads bash style scripts, gives you a comfortable interactive shell without plugins, and adds a set of table commands whose pipelines carry typed rows.
$ files src -r | where name =~ .rs | sort-by size -r | first 3 | select name sizename sizeshell.rs 14 KBsys.rs 13 KBcheck.rs 8.7 KBWhat you get:
- Scripting with the bash syntax most scripts use: functions,
[[ ]],case, indexed and associative arrays, parameter expansion operators, arithmetic, brace expansion, here documents, process substitution,trapandset -euo pipefail. - An interactive shell with autosuggestions, syntax highlighting, context aware completion, a
zcommand, abbreviations and themed prompts with right and transient prompts. - Job control with Ctrl-Z,
fg,bg,jobsandwait. - Typed tables from
files,procs,loadandfrom, filtered and reshaped withwhere,sort-by,select,group-byandmath. Any other program in the pipeline receives plain text. - A script checker,
grfsh --check script.sh, that reports syntax errors and bash features grfsh does not support without running anything.
grfsh depends on two crates, rustyline and libc, starts in about 2 ms and is a single static binary on Linux.
Continue with Installation, or read Migrating from bash if you want to know what changes for your existing setup.