Chell

Chell is a custom Unix-like shell implementation written in C++. It provides a command-line interface with support for built-in commands (echo, type, exit, pwd, cd) and external executable programs. The shell features a customizable colored prompt displaying username, hostname, and current working directory. It handles command parsing with support for quoted strings, escaped characters, and PATH resolution for executables.

c++
1 stars
Updated: 12/31/2025

Chell

Table of Contents

About

Creating a custom shell program as a small exercise. Chell is a Unix-like shell implementation that provides basic command-line functionality with support for both built-in commands and external executables.

Features

  • Customizable colored prompt with username, hostname, and current directory
  • Built-in command support
  • External executable resolution via PATH
  • Quote and escape character handling
  • Directory navigation with tilde expansion

Building

Compile the program using a C++ compiler with C++17 support.

g++ -std=c++17 -o chell main.cpp sources/shell.cpp

Usage

Run the compiled executable to start the shell.

./chell

Built-in Commands

  • echo - Display a line of text
  • type - Display information about command type
  • exit - Exit the shell with optional status code
  • pwd - Print current working directory
  • cd - Change the current directory

License

Copyright © 2024 Choice404

This code is licensed under the GNU General Public License 3.0. Please see the LICENSE file in the root directory of this project for the full license details.