Skip to content

gangula-karthik/shell.cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

progress-banner

Shell (C++)

A POSIX-compliant shell implementation written in C++.

Features

  • Interactive REPL with a custom raw-mode terminal reader
  • Command history with up/down arrow navigation
  • Tab completion for builtin commands and executables in PATH
  • Single-quote, double-quote, and backslash escape handling
  • Builtin commands: exit, echo, type, pwd, cd, jobs, history
  • Execution of external programs via fork/exec
  • Background job execution with &
  • Job listing and status tracking
  • Persistent command history (loads/saves from HISTFILE)
  • PATH and HOME environment resolution
  • C++23 standard

Building

Ensure you have cmake and vcpkg installed, with VCPKG_ROOT set.

cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake
cmake --build ./build

Running

./run.sh

Or run the compiled binary directly:

./build/shell

About

A POSIX-compliant shell implementation written in C++

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors