Skip to content

A bad shell written in C++

License

Notifications You must be signed in to change notification settings

simon0302010/bsh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6f2d12d · · Jan 24, 2026

History

55 Commits
Jan 22, 2026
Jan 24, 2026
Jan 23, 2026
Jan 24, 2026
Jan 22, 2026
Jan 24, 2026

Repository files navigation

BSH

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.

Features

  • 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>> < 2> 2>> <
  • Env variable expansion – $VAR or ${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

Requirements

  • A computer
  • Linux

Installation from the AUR

If you're running an arch based distro, you can install bsh from the AUR:

yay -S bsh-git

You can also use any other AUR helper

Installation from source

  1. Install dependencies (example for Arch Linux):
    sudo pacman -S cmake base-devel fmt readline
  2. Clone the GitHub repository:
    git clone https://github.com/simon0302010/bsh.git
    
    cd bsh
  3. Build and install:
    cmake -B build -DCMAKE_INSTALL_PREFIX=/usr
    cmake --build build
    sudo cmake --install buildld

Usage

Just run bsh.

License

This project is licensed under the GNU General Public License Version 3. For more information, see the LICENSE file.

About

A bad shell written in C++

Resources

License

Stars

Watchers

Forks

Packages

No packages published