Added note about arsh shell

This commit is contained in:
Aleksandr Lebedev 2026-04-21 18:17:29 +02:00
parent ced65a2779
commit a45295dcd6
3 changed files with 19 additions and 1 deletions

18
projects/arsh.org Normal file
View file

@ -0,0 +1,18 @@
#+title: arsh - ARchaic SHell
Since I started using GNU/Linux, I always wondered, how do shells work and what exactly are they responsible for.
In order to learn it (and also to use some C) I decided to implement a simple shell in C in a /single file/, where I would try to implement some of the features, that other shells like bash, zsh, fish, etc have. And also I wanted to use no external dependencies, except for the standard C library.
* Features
Some of the implemented features are:
- You can pipe stdout of one command to stdin of another (ex. ~cat main.c | wc --lines~)
- You can redirrect output/input with ~>~, ~>>~, ~<~, ~2>~, ~&>~
- Variables expansion with ~$PATH~ and ~${HOME}~ syntax
- Shows custom prompt, if ~PS1~ env variable is set
- Run subcomands with ~$(hostname)~ or ~`pwd`~ (works with pipes)
- Custom ~readline~ function with support for cursor moving (<-, ->) and inline editing
- Run the shell in interactive and non interactive mode
* Source code
[[https://git.kylekrein.com/kylekrein/arsh][Forgejo]]