space/README.md

28 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2025-01-15 13:51:04 +11:00
# space - A simple shell written in C++
## What is space?
2025-03-24 15:46:46 +11:00
Space is a shell. There is a simple substitutions feature, which can substitute something for something else.
2025-01-15 13:51:04 +11:00
## How to use?
2025-03-24 15:46:46 +11:00
1. Compile (`g++ src/main.cpp -o space`). (may differ by OS or personal preference, this works for Linux)
2025-01-15 13:51:04 +11:00
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`.
2025-03-24 15:46:46 +11:00
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.
2025-04-07 20:28:53 +10:00
Change environment variables with `set key value`. At present there is no way to access environment variables.
2025-03-24 14:52:21 +11:00
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.
2025-04-07 20:28:53 +10:00
The path is set with the $PATH environment variable.
2025-03-24 15:46:46 +11:00
The prompt is not able to be changed. Yes, I'm forcing my opinion on you.
2025-01-15 13:51:04 +11:00
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)