{"id":23131733,"url":"https://github.com/faithbyte/mini","last_synced_at":"2025-04-04T07:28:52.127Z","repository":{"id":161890284,"uuid":"515993463","full_name":"faithByte/mini","owner":"faithByte","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-15T13:26:42.000Z","size":1443,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-09T18:41:27.335Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/faithByte.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":"2022-07-20T13:28:44.000Z","updated_at":"2022-10-22T17:18:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"8d4b1240-c860-4318-b8f1-9190d7009f6d","html_url":"https://github.com/faithByte/mini","commit_stats":null,"previous_names":["faithbyte/mini"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faithByte%2Fmini","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faithByte%2Fmini/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faithByte%2Fmini/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faithByte%2Fmini/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/faithByte","download_url":"https://codeload.github.com/faithByte/mini/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247138020,"owners_count":20889974,"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","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":[],"created_at":"2024-12-17T11:15:59.963Z","updated_at":"2025-04-04T07:28:52.107Z","avatar_url":"https://github.com/faithByte.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minishell\n\n**Minishell** is a small command-line interpreter written in C language that is designed to mimic the behavior of the popular Unix shell, **Bash**. \nIt provides a basic command-line interface to users that allow users to execute basic commands and handle simple I/O operations.\n___\n## Requirements:\n* gcc\n* make\n* readline\n\n  ➜ Requirements installation for Debian distributions:\n``` shell\nsudo apt-get install gcc make libreadline8 libreadline-dev\n```\n## Installation\n``` shell\ngit clone https://github.com/irhesri/mini.git\ncd mini\nmake\n```\n\n## Usage\n* Start The executable:\n``` shell\n./minishell\n```\nOnce the program is running you can start using it by entering the commands you want to run.\n \n## Features\n* The program display a prompt waiting for a new command\n\n  ### ➜ Builtins:\n    The builtins do the same work as the ones of bash:\n    * **echo** : with option -n\n    * **cd** : with only a relative or absolute path\n    * **pwd** : with no options\n    * **export** : with no options\n    * **unset** : with no options\n    * **env** : with no options or arguments\n    * **exit** : with no options\n\n  ### ➜ Commands other than builtins:\n    * The program runs the commands by launching the right executable based on the PATH variable or by using a relative or an absolute path\n\n  ### ➜ Redirections:\n    * **\u003c** : redirect input\n    * **\u003c\u003c** `delimiter` : should be given a delimiter, it reads the input until a line containing the delimiter is seen\n    * **\u003e** : redirect output in truncate mode\n    * **\u003e\u003e** : redirect output in append mode\n\n  ### ➜ Interactive mode:\n    * \u003ckbd\u003e ctrl \u003c/kbd\u003e + \u003ckbd\u003e C \u003c/kbd\u003e : displays a new prompt on a new line\n    * \u003ckbd\u003e ctrl \u003c/kbd\u003e + \u003ckbd\u003e D \u003c/kbd\u003e : exits the shell\n    * \u003ckbd\u003e ctrl \u003c/kbd\u003e + \u003ckbd\u003e \\ \u003c/kbd\u003e : does nothing \n\n  ### ➜ History:\n    * \u003ckbd\u003e ↑ \u003c/kbd\u003e (up) and \u003ckbd\u003e ↓ \u003c/kbd\u003e (down) arrows : go through the command history\n\n  ### ➜ Others:\n    * **|** (pipes) : \u003c/b\u003e The output of each command in the pipeline is the input of the next command via a pipe\n    * **$**`environment variable name` : it get expanded to its value\n    * **$?** : get expanded to the exit status of the most recently executed foreground pipeline\n\n    \u003e Note: The program does not interpret unclosed quotes or \"\\\\\" (backslash) or \";\" (semicolon).\n\n## Restrictions:\n* Only the next functions are allowed:\n  \u003ereadline, rl_clear_history, rl_on_new_line, rl_replace_line, rl_redisplay, add_history, printf, malloc, free, write, access, open, read, close, fork, wait, waitpid, wait3, wait4, signal, sigaction, sigemptyset, sigaddset, kill, exit, getcwd, chdir, stat, lstat, fstat, unlink, execve, dup, dup2, pipe, opendir, readdir, closedir, strerror, perror, isatty, ttyname, ttyslot, ioctl, getenv, tcsetattr, tcgetattr, tgetent, tgetflag, tgetnum, tgetstr, tgoto, tputs\n* Not use more than one global variable. \n\n## Conclusion:\n***Minishell*** is a small but useful project that provides a basic set of functionalities and commands similar to the bash shell. And developing it was an enriching learning experience where we were able to understand the core concepts of the command-line interfaces and the underlying system mechanisms that enable them to work by implementing them in a real-world project. Moreover, working on this project we gained practical knowledge about ***multiprocessing*** (creating child processes), ***executing system commands***, ***handling signals***, ***files manipulating***, implementing features such as ***piping*** and ***redirections***, and some ***shell functionalities***.\nOverall, Minishell was an incredibly rewarding experience that deepened our knowledge and skills in ***system programming*** and ***command-line interfaces***.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaithbyte%2Fmini","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaithbyte%2Fmini","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaithbyte%2Fmini/lists"}