Skip to content

This project is about creating a simple shell.

Notifications You must be signed in to change notification settings

jojomo96/minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minishell

Score: 125/100
Finished: 27.05.2024
Team: @jojomo96 & @flomero

minishell

As beautiful as a shell

Summary:

This project is about creating a simple shell. Yes, your own little bash. You will learn a lot about processes and file descriptors.

Usage

$ make
$ ./minishell

shell screenshot

Features

  • A Prompt just like Bash with working history
  • History is saved during sessions
  • Builtin Commands:
    • echo (with option -n)
    • cd (with relative & absolute path and - and ~)
    • pwd
    • export (with and without args, supports +=)
    • unset
    • env
    • exit
  • execution of external Commands using the $PATH, as well as relative or absolute Paths
  • Redirections: <, >, << & >>
  • Logic Operators: &&, || and parenthesis
  • Pipes |: The output of each command in the pipeline is connected to the input of the next command via a pipe.
  • Expansion:
    • handle env Variables starting with $
    • handle $?
    • handle wildcard expansion using * and ?
  • Support interactive and non-interactive mode
  • Signal Handling for CRTl+C, CRTl+D & CRTl+\

Debug

  • run make debug to enable debug prints
  • run make tree to enable outputting of the AST to dot-format

Example of AST Visulization

(echo ok1 && echo ok2) || cd /fail3 && echo ok4 || echo ok5 || echo ok6 | grep ok1 >> out

Ast Visualization

About

This project is about creating a simple shell.

Topics

Resources

Stars

Watchers

Forks