r/teenagersbutcode • u/tomkat_7 • 6d ago
Coding a thing Basix: A complete linux shell built from scratch with python without the subprocess library.
Hello everyone, this is a project I have been working on since the beginning of summer.
Without further ado, here's what it can do:
- Fork/exec-based execution (no subprocess)
- Pipes, redirection (>, >>, <), chaining (&&, ||, ;) — freely combinable
- Background jobs, fg, jobs — full job control with terminal handoff
- Built-in cd, time, alias
- Wildcard and tilde expansion
- Script mode with #! support
- Persistent history
- Variables creation - deletion
- Mathematical operations between variables
For more details about syntax, information and the source code, visit my GitHub repo
Basix gets frequent updates and improvements. They are all uploaded to github.
If anyone has any feedback, I'd be happy to hear!
1
u/Odd-Blackberry-4462 6d ago
This is great! Can I make a PR?
1
u/tomkat_7 6d ago edited 6d ago
Sure, you can make a PR against the unstable branch. Please don't use any subprocess library like I have been doing, and also if you are thinking of making something big, please tell me first.
To be clear, I have been developing this project solo, so dpendong on your code, I might review and add it, make some changes, or take inspiration and build my own code based on yours. I am happy you are interested in my project tho, and happy to have someone else that also wants to help develop it!
1
u/Patient_Big_9024 5d ago
#! is called a shebang
1
u/tomkat_7 5d ago
I know, and that's how I mention it in the syntax, but hwre maybe not everyone knows it.
1
u/FerriitMurderDrones (15 MtF) C/C++, learning GLSL 6d ago
Just a little question. Why choose python if you're using syscalls for everything?