Skip to content

KillianWasHere/42sh

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

141 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42sh | Introduction

Life, the universe, and especially the shell.

The goal of this project is to recreate an UNIX shell based on tcsh.
It consists of a command interpreter, capable of executing anything that is executuable.
Everything must stay stable, while still adding as much existing functionalities as possible.
Bonuses aren't counted in the ATs, but are still very valuable.

Must

> Get user prompt.

> Parse the arguments and rearrange if needed.

> Execute a basic command.

> Handle error messages (coredump, double free, ...).
Handle error return values.

> Execute local environment commands (env, setenv, unsetenv).

> Execute cd command alongside the local env.
Execute cd with special arguments (~, /, -).

> Handle priority between operators (||, &&) and commands.

> Redirect inputs / outputs into specific files.
Redirect command to command.

Features

  • Aliases
    • aliasCOMMANDREPLACES
    • The command lets you create a shortcut to another command of your choice
  • History
    • history[FLAG]
    • The command displays a list of every used command
    • num : displays the last num commands typed
    • -c : clears the list of commands
  • Multiline
    • Lets you type a command in multiple lines, if the last character typed is a '\'
    • You can also simply type, which will make you occupy more lines
  • Which
    • whichCOMMAND
    • Displays the path where this command is located in
  • Parenthesis
    • Changes the priorities, depending on what's in the parenthesis
  • GitHub Action
    • Checks the coding style according to Epitech's banana checker
  • Unit tests
    • make tests_run
    • Criterion tests, to see how much the program works in every case

Credits

About

Continuity of the previous solo projects Minishell 1 and Minishell2, with the goal of recreating the shell 'tcsh', in 5 weeks in a group of 5 people

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C 97.0%
  • Makefile 3.0%