Cicada Unix Shell
Cicada is a simple Unix shell written in Rust. It's ready for daily use.
Documents
Try out cicada with Docker
$ docker pull mitnk/cicada
$ docker run --rm -it mitnk/cicada
Features
run programs and pipelines
$ ls | head -n3
Desktop
Documents
Downloads
$ echo foo bar | awk -F " " '{print $2, $1}'
bar foo
with redirections
$ ls file-not-exist 2>&1 | wc > e.txt
$ cat e.txt
1 7 46
command substitution
$ ls -l `which sh`
-r-xr-xr-x 1 root wheel 618512 Oct 26 2017 /bin/sh
$ echo "Time is $(date)."
Time is Sun Sep 2 12:04:13 CST 2018.
run multiple commands (with logical)
$ echo foo; echo bar
foo
bar
$ echo foo && echo bar
foo
bar
$ echo foo || echo bar
foo
shell expansions
$ echo sp{el,il,al}l
spell spill spall
$ echo $SHELL
/usr/local/bin/cicada
$ echo *
Cargo.lock Cargo.toml LICENSE Makefile README.md src target
do math arithmetic directly in the shell!
$ 1 + 2 * 3 - 4
3
$ (1 + 2) * (3 - 4) / 8.0
-0.375
job control
# run sleep in backgroup
$ sleep 200 &
[1] 89
# listing jobs
$ jobs
[1] 89 Running sleep 200 &
# bring it as foreground
$ fg 1
sleep 200
# now you can use `Ctrl-Z` to suspend it
^Z
[1] 89 Stopped sleep 200
$ jobs
[1] 89 Stopped sleep 200
# run it again (in background) with bg
$ bg
$ jobs
[1] 89 Running sleep 200 &
Cicada is also a library (BETA)
Read APIs here: https://docs.rs/cicada/.
Install Cicada
Please refer to docs/install.md.