diff --git a/blog/posts.org b/blog/posts.org index ef8e093..4a9c458 100644 --- a/blog/posts.org +++ b/blog/posts.org @@ -1,4 +1,3 @@ #+title: Blog posts * 2025 -- [[./framework12guix.org][GNU Guix on Framework 12]] - [[./whythiswebsiteissimple.org][Why this website is so simple?]] diff --git a/index.org b/index.org index 9b47300..029f1ef 100644 --- a/index.org +++ b/index.org @@ -15,6 +15,7 @@ Since November 2025 I'm also an associated member of [[https://fsf.org][Free Sof - [[./projects/project-gestalt.org][Project Gestalt (Mod for Stellaris)]] - [[./projects/health-for-watch.org][Health for Watch]] - To be continued... +- [[./projects/arsh.org][arsh - a simple shell]] * [[./blog/posts.org][My Blog]] * My Contributions I contributed to several Free and Open Source projects: diff --git a/projects/arsh.org b/projects/arsh.org new file mode 100644 index 0000000..b758d1c --- /dev/null +++ b/projects/arsh.org @@ -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]]