Skip to content

Ismail-Mahmoud/cpp-shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPP Shell

Simple POSIX-compliant shell written in C++ (Based on CodeCrafters Challenge)

Pre-requisites

  • C++ 20 (or later)
  • CMake 3.13 (or later)

Installation

Using CMake

The following commands are included in run.sh script that you can directly run.

  • Generate build files:

    cmake -B build .
  • Compile the program:

    cmake --build ./build
  • Run the executable:

    ./build/shell

Using GCC

  • Compile the program:

    g++ -Iinclude -std=c++20 -o shell.out src/*.cpp
  • Run the executable:

    ./shell.out

Features

  • Built-in Commands: exit, echo, pwd, cd, type
  • External Commands Support (using PATH environment variable)
  • Command Auto-completion (using TAB key)
  • Single and Double Quoting Support
  • Output and Error Redirection

TODO

  • Navigation with Arrow Keys
  • History Support

About

Simple POSIX-compliant shell written in C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published