{"id":28188839,"url":"https://github.com/toro-nicolas/42sh","last_synced_at":"2026-02-15T03:03:31.473Z","repository":{"id":240212489,"uuid":"796438399","full_name":"toro-nicolas/42sh","owner":"toro-nicolas","description":"A Unix shell based on TCSH.","archived":false,"fork":false,"pushed_at":"2025-03-02T11:53:35.000Z","size":6757,"stargazers_count":3,"open_issues_count":13,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-19T21:27:38.674Z","etag":null,"topics":["42sh","c","epitech","shell","tcsh"],"latest_commit_sha":null,"homepage":"https://toro-nicolas.github.io/42sh/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toro-nicolas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-05-05T23:28:26.000Z","updated_at":"2025-05-06T11:13:14.000Z","dependencies_parsed_at":"2025-07-19T20:03:30.809Z","dependency_job_id":"67d67a78-1b05-4f6a-81b1-47c078c33cec","html_url":"https://github.com/toro-nicolas/42sh","commit_stats":null,"previous_names":["toro-nicolas/42sh"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/toro-nicolas/42sh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toro-nicolas%2F42sh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toro-nicolas%2F42sh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toro-nicolas%2F42sh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toro-nicolas%2F42sh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toro-nicolas","download_url":"https://codeload.github.com/toro-nicolas/42sh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toro-nicolas%2F42sh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29466925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T01:01:38.065Z","status":"online","status_checked_at":"2026-02-15T02:00:07.449Z","response_time":118,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["42sh","c","epitech","shell","tcsh"],"created_at":"2025-05-16T09:12:06.878Z","updated_at":"2026-02-15T03:03:31.443Z","avatar_url":"https://github.com/toro-nicolas.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💻 42sh 🐚\n\n![42sh](https://toro-nicolas.github.io/42sh/preview.png)\n\n## Table of contents 📑\n- [Description](https://github.com/toro-nicolas/42sh/blob/main/README.md#description-)\n- [Usage](https://github.com/toro-nicolas/42sh/blob/main/README.md#usage-%EF%B8%8F)\n- [Features list](https://github.com/toro-nicolas/42sh/blob/main/README.md#features-list-)\n- [Result](https://github.com/toro-nicolas/42sh/blob/main/README.md#result-)\n- [Compilation](https://github.com/toro-nicolas/42sh/blob/main/README.md#compilation-%EF%B8%8F)\n- [Documentation](https://github.com/toro-nicolas/42sh/blob/main/README.md#documentation-)\n- [Code mandatory](https://github.com/toro-nicolas/42sh/blob/main/README.md#code-mandatory-)\n- [What's next ?](https://github.com/toro-nicolas/42sh/blob/main/README.md#whats-next--)\n- [Contributors](https://github.com/toro-nicolas/42sh/blob/main/README.md#contributors-)\n\n\n## Description 📝\nThe **42sh** is a project carried out by **groups of 5** (see [Contributors](https://github.com/toro-nicolas/42sh/blob/main/README.md#contributors-), during our **1st year** in [**EPITECH**](https://www.epitech.eu/) Grand Ecole program.  \nIts purpose is to recreate in [**C**](https://en.wikipedia.org/wiki/C_(programming_language)) a [**Unix shell**](https://en.wikipedia.org/wiki/Unix_shell) based on [**TCSH**](https://en.wikipedia.org/wiki/Tcsh).  \nIn addition, we've taken inspiration from [Powerlevel10k](https://github.com/romkatv/powerlevel10k) for our **shell prompt**.  \n\n\n## Usage ⚔️\nYou can run 42sh like this :\n```sh\n./42sh\n```\n\nYou can execute script with 42sh like this :\n```sh\n./42sh [script]\n```\n\nYou can also add the **42sh** to the **shebang of a script**, and when you run the script it will use the 42sh.  \n\nFor more information, please see the help section.\n```sh\n\u003e ./42sh --help\nUSAGE\n    ./42sh\n    ./42sh [script]\nDESCRIPTION\n    A Unix shell based on TCSH.\n    You can execute the help command to see the list of available builtins.\n```\n\n\n## Features list 📋\nOur **42sh** includes many of the **features found** in **TCSH** :\n- Executing a simple command\n- Executing recreated builtins :\n  - about\n  - alias\n  - cd\n  - echo\n  - else\n  - end\n  - endif\n  - env\n  - exit\n  - foreach\n  - help\n  - history\n  - if\n  - repeat\n  - set\n  - setenv\n  - source\n  - unalias\n  - unset\n  - unsetenv\n  - where\n  - which\n- Dynamic prompt\n- Dynamic line edition (use arrow and ctrl command)\n- Use of history and event (all commands are stock in the .42sh_history)\n- Use of variable (local and environmental)\n- Handle of specials variabes (~, ? and some other variables)\n- Handle backticks (\"`\")\n- Handle semi-colons (\";\")\n- Handle operators (\"\u0026\u0026\" and \"||\")\n- Handle pipes (\"|\")\n- Handle redirection (\"\u003c\", \"\u003c\u003c\", \"\u003e\" and \"\u003e\u003e\")\n- Handle inhibitors ('\"', \"'\" and \"\\\\\")\n- Handle parentheses (\"()\")\n- Handle globbing (\"*\", \"?\", \"[\" and \"]\")\n- Handle alias\n- Handle scripting and scripting commands (if, else, endif, foreach and end)\n\n\n## Result 🚩\nThe result of this project is a **almost perfect shell**, **very similar to TCSH**.  \nIf you discover a **problem** or an **error**, don't hesitate to **create an issue** and **report it** to us as soon as possible.\n\n\n### my.epitech.eu result\nThe last test was based on the commit code: [19d67f8bc2f1bc20cc5a8147595ccd659123a28b](https://github.com/toro-nicolas/42sh/commit/19d67f8bc2f1bc20cc5a8147595ccd659123a28b)\n\n| Category                         | Percentage | Numbers of tests |  Crash   |\n|----------------------------------|:----------:|:----------------:|:--------:|\n| basic tests                      |    100%    |       4/4        |    No    |\n| path handling                    |    100%    |       5/5        |    No    |\n| setenv and unsetenv              |    100%    |       2/2        |    No    |\n| builtin cd                       |    100%    |       3/3        |    No    |\n| line formatting (space and tabs) |    100%    |       8/8        |    No    |\n| error handling                   |    100%    |       6/6        |    No    |\n| separator                        |    100%    |       1/1        |    No    |\n| simple pipes                     |    100%    |       3/3        |    No    |\n| advanced pipes                   |    100%    |       6/6        |    No    |\n| redirections                     |    100%    |       5/5        |    No    |\n| advanced manipulations           |    100%    |       3/3        |    No    |\n| \u0026\u0026 and \\|\\| tests                |    100%    |       3/3        |    No    |\n| globbing                         |    100%    |       1/1        |    No    |\n| var interpreter                  |    100%    |       3/3        |    No    |\n| inhibitor                        |    100%    |       2/2        |    No    |\n| magic quotes                     |     0%     |       0/3        |    No    |\n| alias                            |    100%    |       4/4        |    No    |\n| scripting                        |    100%    |       1/1        |    No    |\n| foreach                          |    100%    |       1/1        |    No    |\n| which                            |    100%    |       2/2        |    No    |\n| where                            |    100%    |       2/2        |    No    |\n| if                               |    50%     |       1/2        |    No    |\n| repeat                           |    100%    |       1/1        |    No    |\n| parenthesis                      |     0%     |       0/1        |    No    |\n| **Results**                      | **93,1%**  |    **68/72**     |  **No**  |\n\n\n### Keynote result\nWe got the **best 42sh** of **our class**.\n\nProject Mark :\n```\nMark : 14\nAutomatic tests (11.5 / 14) :\n\nHistory (1.5 / 2) :\n\"!!\" non fonctionnel\nJob control (0 / 2) :\n\nDynamic command line (1 / 2) :\n\n```\n\nOral Mark :\n```\nMark : 3244\nTesting Policy (4 / 4) :\nTest unitaires ok + test\nMethodology and Organisation (40 / 40) :\nCommits branche ok, github project\nInvolvment (200 / 400) :\nBuiltins bonus\nScripting avancé\nHistory\nOral Presentation (3000 / 4000) :\n\"Présenter la keynote\"\nUne seule personne pour gérer le diapo\nSchema d'explication sur le cheminement  intéressant\nFaute \"fonctionnalitées\"\n```\n\n\n### Tests and code coverage\nFunctional tests were carried out with a **bash tester** and **unit tests** using [criterion](https://criterion.readthedocs.io/en/master/intro.html).  \nUnit tests are still to be performed, but a large part of the code is already covered:  \n- Lines: 84.8%\n- Functions: 94.7%\n- Branches:\t45.4%\n\nYou can run the tester with this command :\n```sh\n./tester.sh\n```\nYou can compile the project and run the tester with this command :\n```sh\nmake tests\n```\nYou can compile the project and run the unit tests with this command :\n```sh\nmake tests_run\n```\n  \nFor more details, please click [here](https://toro-nicolas.github.io/42sh/tests/test.html).\n\n\n## Compilation 🛠️\nYou can compile the project with this command :\n```sh\nmake\n```\n\nIf you want to debug the program, you can compile the project with this :\n```sh\nmake debug \n```\n\nIf you want clean the project, you can run this command :\n```sh\nmake fclean\n```\n\nYou can clean and compile the project with ```make re``` and for debugging ```make re_debug```\n\nYou can compile the unit tests with this command :\n```sh\nmake unit_tests\n```\n\n\n## Documentation 📚\nThe documentation is accessible [here](https://toro-nicolas.github.io/42sh/html/). \n\nYou can generate the documentation with this command :\n```sh\nmake doc\n```\nYou need multiple package for generate them :\n- doxygen\n- doxygen-latex\n- doxygen-doxywizard\n- graphviz\n\n\n## Code mandatory 📦\n- You'll need to create a branch where you'll push your code. Once you've completed your tasks on this branch, we'll work together to merge it and check that everything works.\n- Every function you add must be code-style and documented.\n- Before merging, you'll need to check that all unit tests pass by running ```make tests_run```.\n- If the github actions don't succeed, then ask yourself some questions\n- Each commit will contain ```[+]``` or ```[-]``` or ```[~]``` followed by a message\n  - ```[+]``` : Add feature\n  - ```[-]``` : Delete feature\n  - ```[~]``` : Edit feature\n\n**Of course, in exceptional cases, we may depart from these rules.**  \n\n\n## What's next ? 🚀\n- Fix the latest scripting problems\n- Fix final bugs in prompt and command writing\n- Add job controls (background process, ctrl + Z, ...)\n- Add unit tests on each piece of code\n\n\n## Contributors 👥\nFor this project, we were a group of **5 people**. Here are the people in the group:  \n- [Arthur WARIN](https://github.com/arthurwarin)\n- [Christophe VANDEVOIR](https://github.com/ItsKarmaOff) : also published the [42sh](https://github.com/ItsKarmaOff/42sh)\n- [Gianni TUERO](https://github.com/xJundo)\n- [Nicolas TORO](https://github.com/toro-nicolas) : also published the [42sh](https://github.com/toro-nicolas/42sh)\n- [Raphael ROSSIGNOL](https://github.com/RaphRoss)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoro-nicolas%2F42sh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoro-nicolas%2F42sh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoro-nicolas%2F42sh/lists"}