{"id":31074150,"url":"https://github.com/wapoco/minishell","last_synced_at":"2026-05-18T06:13:13.919Z","repository":{"id":311899169,"uuid":"1045506771","full_name":"WaPoco/minishell","owner":"WaPoco","description":"The objective of this project is to create a simple shell. Built as part of the 42 school curriculum.","archived":false,"fork":false,"pushed_at":"2025-09-05T11:11:25.000Z","size":172,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-05T12:39:00.792Z","etag":null,"topics":["42school","bash","minishell","pair-programming","unix-shell"],"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/WaPoco.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":"2025-08-27T09:28:30.000Z","updated_at":"2025-09-05T11:11:29.000Z","dependencies_parsed_at":"2025-08-27T18:55:16.814Z","dependency_job_id":"acae802a-f3bb-4753-b3d4-5f39d5c8a463","html_url":"https://github.com/WaPoco/minishell","commit_stats":null,"previous_names":["wapoco/minishell"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/WaPoco/minishell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WaPoco%2Fminishell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WaPoco%2Fminishell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WaPoco%2Fminishell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WaPoco%2Fminishell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WaPoco","download_url":"https://codeload.github.com/WaPoco/minishell/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WaPoco%2Fminishell/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275348511,"owners_count":25448626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-16T02:00:10.229Z","response_time":65,"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":["42school","bash","minishell","pair-programming","unix-shell"],"created_at":"2025-09-16T02:03:57.180Z","updated_at":"2026-05-18T06:13:13.914Z","avatar_url":"https://github.com/WaPoco.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# minishell\r\nThis project has been created as part\r\nof the 42 curriculum by vpogorel and hmote.\r\n\r\n# Description\r\nIn this project we reimplemented a small version of the classic UNIX shell. The main challenge was to parse user input and execute commands only using POSIX-compliant C library functions.\r\n\r\n![Minishell demo video](https://github.com/WaPoco/minishell/blob/main/minishell-demo.gif)\r\n\r\n### Features\r\n- Working history (⬆️ and ⬇️)\r\n- Search and launch the right executable (based on the PATH variable or using a\r\nrelative or an absolute path)\r\n- Supports common builtin commands:\r\n\r\n     - cd with only a relative or absolute path\r\n     - echo with option of -n\r\n     - env with no options or arguments\r\n     - export with no options\r\n     - unset with no options\r\n     - pwd with no options\r\n     - exit with no options\r\n- Handles ’ (single quote) which should prevent the shell from interpreting the metacharacters in the quoted sequence\r\n- Handles \" (double quote) which should prevent the shell from interpreting the metacharacters in the quoted sequence except for $ (dollar sign)\r\n- Pipes (| character). The output of each command in the pipeline is\r\nconnected to the input of the next command via a pipe.\r\n- Environment variables ($ followed by a sequence of characters) which\r\nshould expand to their values.\r\n- $? which should expand to the exit status of the most recently executed\r\nforeground pipeline\r\n- Handles ctrl-C, ctrl-D and ctrl-\\ which should behave like in bash.\r\n- The code includes at most one global variable to indicate a received signal.\r\n- Redirections similar to bash:\r\n    - ```\u003c``` redirects input\r\n    - ```\u003e``` redirects output\r\n    - ```\u003c\u003c``` heredoc mode\r\n    - ```\u003e\u003e``` append mode\r\n\r\nFor this project the libft library was used, which is a custom implementation of some standard C library functions. The functions implemented in libft are listed in the subject pdf file.\r\nThe rest of the features are described in the subject pdf file.\r\n## Architecture:\r\nThe project is organized into several modules, each responsible for a specific aspect of the shell's functionality. The main modules include:\r\n- **Initialization**: This module sets up the shell environment, including signal handling and terminal settings.\r\n- **Parsing\u0026Tokanizer**: This module is responsible for parsing user input, handling quotes, and expanding environment variables and extracting the commands into tokens.\r\n- **Execution**: This module executes the parsed commands, handling built-in commands and external executables, as well as managing pipes and redirections as a process with execve().\r\n- **Utilities**: This module contains helper functions for string manipulation, error handling, and other common tasks.\r\n![Minishell-Diagramm](https://github.com/WaPoco/minishell/blob/main/architecure.jpg)\r\n\r\n# Instructions\r\nClone the repository:\r\n```\r\ngit clone https://github.com/WaPoco/minishell minishell\r\n```\r\nChange to the minishell folder:\r\n```\r\ncd minishell\r\n```\r\nTo compile the project, run:\r\n```\r\nmake\r\n```\r\nTo run the shell, execute:\r\n```\r\n./minishell\r\n```\r\nTo clean up the compiled files, run:\r\n```\r\nmake fclean\r\n```\r\n\r\n# Resources\r\n\r\n- Minishell subject (https://github.com/WaPoco/minishell/blob/main/en.subject.pdf)\r\n- AI was used to generate code snippets and to get suggestions on how to implement certain features. Furthermore I used AI to write some parts of the README file.\r\n- Minishell tutorial (https://42-cursus.gitbook.io/guide/3-rank-03/minishell)\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwapoco%2Fminishell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwapoco%2Fminishell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwapoco%2Fminishell/lists"}