{"id":22551086,"url":"https://github.com/xdec0de/42minishell","last_synced_at":"2026-03-19T23:07:06.739Z","repository":{"id":267005902,"uuid":"781437070","full_name":"xDec0de/42minishell","owner":"xDec0de","description":"[42] Our own simple shell based on bash, made in C","archived":false,"fork":false,"pushed_at":"2025-07-30T16:18:19.000Z","size":291,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-30T02:52:00.162Z","etag":null,"topics":["42","42born2code","42cursus","42madrid","42projects","42school","minishell","minishell-42","minishell42"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xDec0de.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-03T11:34:43.000Z","updated_at":"2025-07-30T16:18:23.000Z","dependencies_parsed_at":"2024-12-07T17:09:40.879Z","dependency_job_id":"36ac31b3-f0ea-4892-9570-5f4f90cfd134","html_url":"https://github.com/xDec0de/42minishell","commit_stats":null,"previous_names":["xdec0de/42minishell"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xDec0de/42minishell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xDec0de%2F42minishell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xDec0de%2F42minishell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xDec0de%2F42minishell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xDec0de%2F42minishell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xDec0de","download_url":"https://codeload.github.com/xDec0de/42minishell/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xDec0de%2F42minishell/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29937391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T13:49:17.081Z","status":"ssl_error","status_checked_at":"2026-02-28T13:48:50.396Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["42","42born2code","42cursus","42madrid","42projects","42school","minishell","minishell-42","minishell42"],"created_at":"2024-12-07T17:09:36.378Z","updated_at":"2026-02-28T14:31:21.200Z","avatar_url":"https://github.com/xDec0de.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 42minishell ![Code quality](https://app.codacy.com/project/badge/Grade/84a0ed73021a434384e03ccf107f1268) ![Test coverage](https://app.codacy.com/project/badge/Coverage/84a0ed73021a434384e03ccf107f1268) ![Workflow status](https://github.com/xdec0de/42minishell/actions/workflows/validate.yml/badge.svg)\n\n42 project \"minishell\", code follows the norm used at 42. The objective of\nthis project is to create a basic replica of a bash shell, built in C.\n\nDetailed code quality and coverage stats can be found\n[here](https://app.codacy.com/gh/xDec0de/42minishell).\n\n## Requirements\n\nThis project is designed to work on Linux. Don't expect it to work on\nWindows unless you are using WSL. That being said, it still has some\nrequirements.\n\n### Fast setup\n\nA bash script is provided to install all required dependencies. You can\nrun it with `sudo ./setup`. This script **does require sudo or root**\nprivileges to run, as it uses apt to install dependencies. It will also\ncompile the project with `make` and has two flags to choose from:\n\n| Flag | Description |\n| :---: | :---: |\n| -y | Automatically accepts installing dependencies |\n| -optional | Install optional dependencies too (List below) |\n\nIf you are just testing the project and not planning to contribute to it,\nthen the recommended command is `sudo ./setup -y`\n\n### List of dependencies\n\nIf you prefer a manual install, then here is the list of dependencies:\n\nRequired:\n\n- The project compiles with `cc`.\n- The readline library. Install it with `sudo apt-get install libreadline-dev`.\n- Makefile is used for build logic: `sudo apt install make`.\n\nOptional:\n\n- [Norminette](https://github.com/42School/norminette) is used for code style\n  validation.\n- [Valgrind](https://valgrind.org) used for leak testing.\n- [lcov](https://github.com/linux-test-project/lcov),\n  for code coverage reports: `sudo apt install lcov`\n\n## Building, validating and testing the project\n\nAs previously stated, 42minishell follows the norm used at 42. This means\nthe norminette program is used in order to validate that the code style\nof the project is up to standards. To build, validate and test the project\nwe use Makefile. Here is the full table of commands:\n\n| Command | Description |\n| :---: | :---: |\n| `make norm` | Executes norminette on the src folder for style validation |\n| `make` or `make all` | Compiles updated files only |\n| `make re` | Recompiles the whole project (src) |\n| `make build` | `make norm` and `make re` |\n| `make testonly` | `make fclean` and run tests |\n| `make covonly` | Generate coverage report, assuming tests have been done |\n| `make test` | `make norm` and `make testonly` |\n| `make testcov` | `make testonly` and `make covonly` |\n| `make clean` | Removes any file generated by these commands |\n| `make fclean` | `make clean`, also removing program executables |\n\n## Allowed functions\n\nFor this rather complex task, we are allowed to use the following table of\nfunctions:\n\n| Name | Library | Basic description | Used |\n| :---: | :---: | :---: | :---: |\n| [readline](https://linux.die.net/man/3/readline) | readline/readline.h | Get a line from a user with editing | ✅ |\n| [rl_clear_history](https://tiswww.case.edu/php/chet/readline/readline.html#index-rl_005fclear_005fhistory) | readline/readline.h | Clear history list | ❌ |\n| [rl_on_new_line](https://tiswww.case.edu/php/chet/readline/readline.html#index-rl_005fon_005fnew_005fline) | readline/readline.h | Move onto a new line with prompt displayed | ✅ |\n| [rl_replace_line](https://tiswww.case.edu/php/chet/readline/readline.html#index-rl_005freplace_005fline) | readline/readline.h | Replace the contents of the rl_line_buffer | ✅ |\n| [rl_redisplay](https://tiswww.case.edu/php/chet/readline/readline.html#index-rl_005fredisplay) | readline/readline.h | Update the display of rl_line_buffer | ✅ |\n| [add_history](https://linux.die.net/man/3/history) | readline/history.h | Place a string at the end of history list | ✅ |\n| [printf](https://linux.die.net/man/3/printf) | stdio.h | Formatted output conversion | ✅ |\n| [malloc](https://linux.die.net/man/3/malloc) | stdlib.h | Allocate dynamic memory | ✅ |\n| [free](https://linux.die.net/man/3/free) | stdlib.h | Free dynamic memory | ✅ |\n| [write](https://linux.die.net/man/3/write) | unistd.h | Write on a file | ❌ |\n| [access](https://linux.die.net/man/2/access) | unistd.h | Check real user's permissions for a file | ❌ |\n| [open](https://linux.die.net/man/3/open) | fcntl.h | Open a file | ❌ |\n| [read](https://linux.die.net/man/3/read) | unistd.h | Read from a file | ❌ |\n| [close](https://linux.die.net/man/2/close) | unistd.h | Close a file descriptor | ❌ |\n| [fork](https://linux.die.net/man/2/fork) | unistd.h | Create a child process | ❌ |\n| [wait](https://linux.die.net/man/2/wait) | sys/wait.h | Wait for process to change state | ❌ |\n| [waitpid](https://linux.die.net/man/2/waitpid) | sys/wait.h | Wait for process to change state | ❌ |\n| [wait3](https://linux.die.net/man/2/wait3) | sys/wait.h | Wait for process to change state, BSD style | ❌ |\n| [wait4](https://linux.die.net/man/2/wait4) | sys/wait.h | Wait for process to change state, BSD style | ❌ |\n| [signal](https://linux.die.net/man/2/signal) | signal.h | ANSI C signal handling | ✅ |\n| [sigaction](https://linux.die.net/man/2/sigaction) | signal.h | Examine and change a signal action | ❌ |\n| [kill](https://linux.die.net/man/3/kill) | signal.h | Send a signal to a process or a group of processes | ❌ |\n| [exit](https://linux.die.net/man/3/exit) | stdlib.h | Cause normal process termination | ✅ |\n| [getcwd](https://linux.die.net/man/3/getcwd) | unistd.h | Get current working directory | ✅ |\n| [chdir](https://linux.die.net/man/2/chdir) | unistd.h | Change working directory | ✅ |\n| [stat](https://linux.die.net/man/2/stat) | unistd.h | Get file status | ❌ |\n| [lstat](https://linux.die.net/man/2/lstat) | unistd.h | Get file status | ❌ |\n| [fstat](https://linux.die.net/man/2/fstat) | unistd.h | Get file status | ❌ |\n| [unlink](https://linux.die.net/man/2/unlink) | unistd.h | Delete a name and possibly the file it refers to | ❌ |\n| [execve](https://linux.die.net/man/2/execve) | unistd.h | Execute a program | ✅ |\n| [dup](https://linux.die.net/man/2/dup) | unistd.h | Duplicate a file descriptor | ❌ |\n| [dup2](https://linux.die.net/man/2/dup2) | unistd.h | Duplicate a file descriptor | ❌ |\n| [pipe](https://linux.die.net/man/2/pipe) | unistd.h | Create pipe | ❌ |\n| [opendir](https://linux.die.net/man/3/opendir) | dirent.h | Open a directory | ❌ |\n| [readdir](https://linux.die.net/man/3/readdir) | dirent.h | Read a directory | ❌ |\n| [closedir](https://linux.die.net/man/3/closedir) | dirent.h | Close a directory | ❌ |\n| [strerror](https://linux.die.net/man/3/strerror) | string.h | Return string describing error number | ❌ |\n| [perror](https://linux.die.net/man/3/perror) | errno.h | Print system error message | ✅ |\n| [isatty](https://linux.die.net/man/3/isatty) | unistd.h | Test whether a file descriptor refers to a terminal | ❌ |\n| [ttyname](https://linux.die.net/man/3/ttyname) | unistd.h | Return name of a terminal | ❌ |\n| [ttyslot](https://linux.die.net/man/3/ttyslot) | unistd.h | Find the slot of the current user's terminal in some file | ❌ |\n| [ioctl](https://linux.die.net/man/2/ioctl) | sys/ioctl.h | Control device | ❌ |\n| [getenv](https://linux.die.net/man/3/getenv) | stdlib.h | Get an environment variable | ❌ |\n| [tcsetattr](https://linux.die.net/man/3/tcsetattr) | unistd.h | Set terminal attributes | ❌ |\n| [tcgetattr](https://linux.die.net/man/3/tcgetattr) | unistd.h | Get terminal attributes | ❌ |\n| [tgetent](https://linux.die.net/man/3/tgetent) | term.h | Load entry | ❌ |\n| [tgetflag](https://linux.die.net/man/3/tgetflag) | term.h | Get boolean entry | ❌ |\n| [tgetnum](https://linux.die.net/man/3/tgetnum) | term.h | Get numeric entry | ❌ |\n| [tgetstr](https://linux.die.net/man/3/tgetstr) | term.h | Get string entry | ❌ |\n| [tgoto](https://linux.die.net/man/3/tgoto) | term.h | Instantiate parameters into a given capability | ❌ |\n| [tputs](https://linux.die.net/man/3/tputs) | term.h | Retrieve capabilities | ❌ |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxdec0de%2F42minishell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxdec0de%2F42minishell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxdec0de%2F42minishell/lists"}