A simple shell written in C++
Go to file
2025-03-24 14:52:21 +11:00
src Substitutions 2025-03-24 15:36:08 +11:00
README.md Update README.md 2025-03-24 14:52:21 +11:00

space - A simple shell written in C++

What is space?

Space is a shell. There is a simple substitutions feature, which can substitute something for something else.

How to use?

  1. Compile (g++ src/main.cpp -o space). (may differ by OS or personal preference, this works for Linux)

  2. Run the outputted binary (space).

  3. Run your commands inside the shell.

If you need to change your directory, run cd (directory). If you need to exit the shell, type exit.

If you would like to create a substitution, type sub (string) (anotherstring). List all your substitutions with listsubs. By default, ls is substituted with ls -l. If you'd like to make your substitutions include extra command line arguments, write your arguments inside quotation marks.

A file located at ~/.config/space/Spacefile is essentially a script that will run on startup. Add any commands or substitutions that you would like in this file. These will be run for you.

The path is hard-coded into the source code, change the vector on line 59 to add directories to your path.

The prompt is not able to be changed. Yes, I'm forcing my opinion on you.

If you want to run an executable in your current directory, there's no need for the ./ (keep in mind Space will prioritise local executables over ones in the path)