Skip to content

Cryplo/ScrappyShell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What This Is

A simple bash-like shell intended as a learning project

What I've Accomplished

The shell receives a command-line input and lexes the input into tokens. Then, it converts tokens into three categories: commands (such as cd or ls), operators (such as | or <), and generic input (such as file names). Then, the shell parses the input following the same precendence as Bash and executes the input.

What I've learned

What I've learned from ScrappyShell so far

  • Basic C++ Project Stuff
  • Refreshed overall C++ knowledge
  • How shell interacts with OS
  • UNIX commands
  • Setting up MakeFiles
  • Setting up WSL
  • Language inferencing, i.e lexing and parsing
  • Forking processes, and process IDs, etc. (remember, in child process fork returns 0, in parent process fork returns child ID)
  • File I/O, i.e buffers
  • Multithreading
  • File Descriptors
  • Recursive Descent Parsing

Thanks to MIT's xv6 shell implementation for inspiration

To-Do

  • Implement quit built-in command
  • Implement key press detection
  • Support parentheses
  • Support !
  • Double output redirection behavior is different than bash (sort -r < ahhh.txt > smth.txt > testing.txt)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors