Git Product home page Git Product logo

42sh's Introduction

42sh

This is the final project of the Unix branch at Le 101, the culmination of the first year of study: a working shell, full of cool features!

This project was coded in C, following the Norm used by the school (see References below). The program is not allowed to crash, nor leak any memory.

It was designed for MacOS but should work fine on Linux: simply make and enjoy!

Made with love and care by Thibault Le Cozanet, Vitor Branco & Vincent Schlumberger

Mandatory part

  • Execution of commands with arguments and path management
  • Line acquisition (prompt display, reading of a command line, proper space and tabulations management)
  • Builtins with their POSIX options: cd, echo, exit, env, setenv, unsetenv
  • Error and commands' return value management
  • Redirections: ">", ">>", "<", "|"
  • Logical operators: "&&", "||"
  • Separator: ";"

Bonuses

  • Dynamic autocompletion with Tab
  • Hash table for binaries, hash command
  • Command history, history and ! builtins
  • Local variables, unset and export builtins
  • Inhibitors: double quote ("), simple quote ('), backslash (\)
  • Advanced redirections: file output aggregation and heredoc (<<)
  • Line edition
    • Cursor movement
      • Right/Left Move letter by letter
      • Alt + Right/Left Move word by word
      • Alt + Up/Down Move up/down from one line to another in the command while remaining in the same column
      • Home/End Get to the beginning/end of the command
    • Cut/copy/paste
      • Alt + A Cut the whole command
      • Alt + S/D Cut everything before/after the cursor
      • Alt + Z Copy the whole command
      • Alt + X/C Copy everything before/after the cursor
      • Alt + V Paste
  • Ctrl + L to clear the screen

References

This a list of ressources we found useful in making this project.

42sh's People

Contributors

lazareus-dev avatar vbranco avatar vischlum avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

vischlum vbranco

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.