space/README.md

28 lines
1.3 KiB
Markdown

# 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.
Change environment variables with `set key value`. At present there is no way to access environment variables.
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 set with the $PATH environment variable.
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)