{"id":19011359,"url":"https://github.com/colmiik/minishell","last_synced_at":"2026-05-16T15:35:10.896Z","repository":{"id":223524765,"uuid":"760619024","full_name":"ColmiiK/minishell","owner":"ColmiiK","description":"A simple recreation of bash in C","archived":false,"fork":false,"pushed_at":"2024-07-08T11:35:33.000Z","size":233,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-21T15:51:32.577Z","etag":null,"topics":["42school","bash","minishell"],"latest_commit_sha":null,"homepage":"","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/ColmiiK.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}},"created_at":"2024-02-20T16:19:56.000Z","updated_at":"2024-07-08T11:35:36.000Z","dependencies_parsed_at":"2024-03-05T19:25:00.239Z","dependency_job_id":"c1d6e065-13c3-4e8d-b5a5-6d7521b9e311","html_url":"https://github.com/ColmiiK/minishell","commit_stats":null,"previous_names":["colmiik/minishell"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ColmiiK/minishell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColmiiK%2Fminishell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColmiiK%2Fminishell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColmiiK%2Fminishell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColmiiK%2Fminishell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ColmiiK","download_url":"https://codeload.github.com/ColmiiK/minishell/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColmiiK%2Fminishell/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33108201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"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":["42school","bash","minishell"],"created_at":"2024-11-08T19:14:09.374Z","updated_at":"2026-05-16T15:35:10.878Z","avatar_url":"https://github.com/ColmiiK.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/15Galan/42_project-readmes/blob/master/banners/cursus/projects/minishell-light.png?raw=true#gh-light-mode-only\" alt=\"Banner (claro)\" /\u003e\n    \u003cimg src=\"https://github.com/15Galan/42_project-readmes/blob/master/banners/cursus/projects/minishell-dark.png?raw=true#gh-dark-mode-only\" alt=\"Banner (oscuro)\" /\u003e\n    \u003cbr\u003e\n    This project is about creating a simple shell. Yes, your own little bash. You will learn a lot about processes and file descriptors\n    \u003cbr\u003e\n\t\u003ctable\u003e\n\t\u003ctr\u003e\u003cth\u003eAlbagar4 (Built-ins, Environment variables)\u003c/th\u003e\n\t\t\u003ctd\u003e\u003ca href='https://profile.intra.42.fr/users/albagar4' target=\"_blank\"\u003e\n        \u003cimg alt='42 (oscuro)' src='https://img.shields.io/badge/Málaga-black?style=flat\u0026logo=42\u0026logoColor=white'/\u003e\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\u003cth\u003eAlvega-g (Parser-lexer, Executor)\u003c/th\u003e\n\t\t\u003ctd\u003e\u003ca href='https://profile.intra.42.fr/users/alvega-g' target=\"_blank\"\u003e\n        \u003cimg alt='42 (oscuro)' src='https://img.shields.io/badge/Málaga-black?style=flat\u0026logo=42\u0026logoColor=white'/\u003e\u003cbr\u003e\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003c/table\u003e    \n    \u003cimg src=\"https://img.shields.io/badge/score- 101%20%2F%20100-success?color=%2312bab9\u0026style=flat\" /\u003e\n    \u003c/a\u003e\n\n\u003c/div\u003e\n\n---\n\n# Mandatory part\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eProgram name\u003c/th\u003e\n    \u003ctd\u003e\u003cem\u003eminishell\u003c/em\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003eTurn in files\u003c/th\u003e\n    \u003ctd\u003e\u003ccode\u003eMakefile, *.h, *.c\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003eMakefile\u003c/th\u003e\n    \u003ctd\u003e\u003ccode\u003eNAME, all, clean, fclean, re\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n\t\u003cth\u003eArguments\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003eExternal functions\u003c/th\u003e\n    \u003ctd\u003e\u003ccode\u003ereadline, rl_clear_history, rl_on_new_line,\nrl_replace_line, rl_redisplay, add_history,\nprintf, malloc, free, write, access, open, read,\nclose, fork, wait, waitpid, wait3, wait4, signal,\nsigaction, sigemptyset, sigaddset, kill, exit,\ngetcwd, chdir, stat, lstat, fstat, unlink, execve,\ndup, dup2, pipe, opendir, readdir, closedir,\nstrerror, perror, isatty, ttyname, ttyslot, ioctl,\ngetenv, tcsetattr, tcgetattr, tgetent, tgetflag,\ntgetnum, tgetstr, tgoto, tputs\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n\t\u003cth\u003eLibft authorized\u003c/th\u003e\n\t\u003ctd\u003eYes\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003eDescription\u003c/th\u003e\n    \u003ctd\u003eWrite a shell\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\nYour shell should:\n- Display a __prompt__ when waiting for a new command.\n- Have a working __history__.\n- Search and launch the right executable (based on the ``PATH`` variable or using a\nrelative or an absolute path).\n- Avoid using more than __one global variable__ to indicate a received signal. Consider\nthe implications: this approach ensures that your signal handler will not access your\nmain data structures.\n\n### Be careful. This global variable cannot provide any other information or data access than the number of a received signal. Therefore, using \"norm\" type structures in the global scope is forbidden.\n\n- Not interpret unclosed quotes or special characters which are not required by the\nsubject such as \\ (backslash) or ; (semicolon).\n- Handle ’ (single quote) which should prevent the shell from interpreting the metacharacters in the quoted sequence.\n- Handle \" (double quote) which should prevent the shell from interpreting the metacharacters in the quoted sequence except for $ (dollar sign).\n- Implement __redirections__:\n\t- \u003c should redirect input.\n\t- \\\u003e should redirect output.\n\t- \u003c\u003c should be given a delimiter, then read the input until a line containing the\ndelimiter is seen. However, it doesn’t have to update the history!\n\t- \\\u003e\u003e should redirect output in append mode.\n- Implement __pipes__ (| character). The output of each command in the pipeline is\nconnected to the input of the next command via a pipe.\n- Handle __environment variables__ ($ followed by a sequence of characters) which\nshould expand to their values.\n- Handle ``$?`` which should expand to the exit status of the most recently executed\nforeground pipeline.\n- Handle ``ctrl-C``, ``ctrl-D`` and ``ctrl-\\`` which should behave like in ``bash``.\n- In interactive mode:\n\t- ``ctrl-C`` displays a new prompt on a new line.\n\t- ``ctrl-D`` exits the shell.\n\t- ``ctrl-\\`` does nothing.\n- Your shell must implement the following __builtins__:\n\t- ``echo`` with option ``-n``\n\t- ``cd`` with only a relative or absolute path\n\t- ``pwd`` with no options\n\t- ``export`` with no options\n\t- ``unset`` with no options\n\t- ``env`` with no options or arguments\n\t- ``exit`` with no options\n\nThe ``readline()`` function can cause memory leaks. You don’t have to fix them. But that __doesn’t mean your own code, yes the code you wrote, can have memory leaks.__\n\n### You should limit yourself to the subject description. Anything that is not asked is not required. If you have any doubt about a requirement, take [bash](https://www.gnu.org/savannah-checkouts/gnu/bash/manual/) as a reference.\n\n# Bonus part\n\nYour program has to implement:\n- ``\u0026\u0026`` and ``||`` with parenthesis for priorities.\n- Wildcards * should work for the current working directory.\n- Correct implementation of single and double quotes when expanding variables and nesting quotes.\n\n# How to run\n\nClone this repository to your working directory by running the following commands:\n\n```bash\ngit clone https://github.com/ColmiiK/minishell.git\ncd minishell\nmake\n./minishell\n```\n\n### The readline library is required to run this program.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolmiik%2Fminishell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolmiik%2Fminishell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolmiik%2Fminishell/lists"}