Minimal toy shell written in C built for fun and to expand my C/systems skills.
This project uses CMake, so I would highly recommend that you install it if you haven't already. It doesn't use any external libraries, so you just need a C compiler. The project was tested with both GCC and Clang.
You can run this command and it will compile the project and run it:
mkdir build && cd build && cmake .. && cmake --build . --target runA release build can be compiled using (assuming you already generated the Makefile):
cd build && cmake --build . --config ReleaseShell and man pages can be installed using:
sudo ./install.shThen it can be uninstalled using:
sudo ./uninstall.shSnowshell currently supports basic things you would expect from a rudimentary shell like:
- Execute programs
- Go through directories
- Has a history of past commands
- Pipe commands together
Small demo:
$ ./snowshell
[ /home/elliott/Documents/snowshell/build ]-> cd
[ /home/elliott ]-> mkdir test
[ /home/elliott ]-> cd test
[ /home/elliott/test ]-> nvim test.py
[ /home/elliott/test ]-> python test.py
Hello World!
[ /home/elliott/test ]-> exitPipe demo:
[ /home/elliott/Documents/snowshell ]-> cat README.md | tr 'a-z' 'A-Z' | head -n 4
# SNOWSHELL
SMALL AND SIMPLE SHELL MADE IN C. JUST SOMETHING I MADE FOR FUN AND
TO LEARN MORE ABOUT THE LANGUAGE.I think the shell is pretty much where I'd like it to be, but here's some ideas that could be worked on:
- Better C practices and just general refactoring of the code as I get better with it
- Simple redirection (like ls -l > output.txt) could be fun
- Adding the '&&' command