Bsh (short for bad shell) is a simple shell made by me in C++. It supports basic features like pipes, redirections, environment variable expansion, script execution, and a colorful prompt.
- Command execution – Every shell can do this
- A few built-in commands
- Piping – Commands can be piped into each other by using |
- File completion using TAB - Thanks to GNU Readline
- stdout/stderr/stdin redirection using > >> 2> 2>> <
- Env variable expansion –
$VARor${VAR}will be expanded - Script execution – Put a few commands into a file and run it
- Colored prompt – Nothing more to say about that
- Command history – Lets you run commands from your history (also some other stuff but not enough space)
- Displays the last exit code 🤯
- Multiline commands using \ and separating commands using ;
- Support for all kinds of wildcards
- Environment variables
- Configurable prompt via
~/.bshrc
- A computer
- Linux
If you're running an arch based distro, you can install bsh from the AUR:
yay -S bsh-gitYou can also use any other AUR helper
- Install dependencies (example for Arch Linux):
sudo pacman -S cmake base-devel fmt readline
- Clone the GitHub repository:
git clone https://github.com/simon0302010/bsh.git cd bsh - Build and install:
cmake -B build -DCMAKE_INSTALL_PREFIX=/usr cmake --build build sudo cmake --install build
Just run bsh.
- This shell is still in development, so expect bugs and missing features.
- When the PATH environment variable is changed, the command changing it will take around 50ms more to execute due to the list of available commands being rebuilt.
This project is licensed under the GNU General Public License Version 3. For more information, see the LICENSE file.