Minishell
As beautiful as a shell :shell:
Install / Use
/learn @paulahemsi/MinishellREADME
minishell
As beautiful as a shell
introduction
The objective of this project is to create a simple shell and learn a lot about processes and file descriptors
The existence of shells is linked to the very existence of IT. At the time, all coders agreed that communicating with a computer using aligned 1/0 switches was seriously irritating. It was only logical that they came up with the idea to communicate with a computer using interactive lines of commands in a language somewhat close to english. With Minishell project, we’ll be able to travel through time and come back to problems people faced when Windows didn’t exist.

usage
Clone the repo git clone --recurse-submodules https://github.com/paulahemsi/minishell.git
Install Readline library make install
Compile Minishell make
Run ./minishell
Enjoy!

builtins_implemented
command | description | ---|------| echo | echo the STRING(s) to standart output. -n flag: do not output the trailing newline | cd | change the shell working directory (with a relative or absolute path)| pwd | print name of current/working directory | export | set export attribute for shell variables | unset | unset values of shell variables | env | print the environment | exit | cause the shell to exit with the exit status specified |
step_by_step
- Prompt implementation
- HashTable functions implementation
- Tokenizer implementation
- Variables expansion implementation
- Builtins implementation
- Parse and execute sistem design
- Signals implementation
- Parsing implementation
- Execute implementation
- Norme
- Bugs hunting
mindmap

study_resources
unix
- Unix Processes in C -video
- Termination Signals
- Shell Command Language
- Bash Guide for Beginners
- Programming Terminal Devices -video
- Introduction to System Programming -video
- Capturing exit status code of child process
- Notion with details about Readline lib, Termcaps and Signals
- Writing Your Own Shell
hashtable
tokenizer
more
libft_functions
<details> <summary>Click to expand </summary>Part_1
ctype.h
| Function | Description | | --- | --- | | ft_isalpha |checks for an alphabetic character.| | ft_isdigit | checks for a digit (0 through 9).| | ft_isalnum | checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).| | ft_isascii | checks whether c is a 7-bit unsigned char value that fits into the ASCII character set. | | ft_isprint | checks for any printable character including space.| | ft_isupper | checks if character is uppercase.| | ft_toupper | convert lowercase letters to uppercase| | ft_tolower | convert uppercase letters to lowercase. |
string.h
| Function | Description | | --- | --- | | ft_memset | fills the first n bytes of the memory area pointed to by s with the constant byte c| | ft_bzero | erases the data in the n bytes of the memory starting at the location pointed to by s, by writing zeros (bytes containing '\0') to that area.| | ft_memcpy | copies n bytes from memory area src to memory area dest. The memory areas must not overlap. Use memmove(3) if the memory areas do overlap. | ft_memccpy | copies no more than n bytes from memory area src to memory area dest, stopping when the character c is found. If the memory areas overlap, the results are undefined.| | ft_memmove | copies n bytes from memory area src to memory area dest. The two strings may overlap; the copy is always done in a non-destructive manner.| | ft_memchr |scans the initial n bytes of the memory area pointed to by s for the first instance of c.| | ft_memcmp | function compares the first n bytes (each interpreted as unsigned char) of the memory areas s1 and s2.| | ft_strlen | The ft_strlen() function computes and returns the length of the string s.| | ft_strlcpy | copies up to size - 1 characters from the NUL-terminated string src to dst, NUL-terminating the result.| | ft_strlcat | appends the NUL-terminated string src to the end of dst. It will append at most size - strlen(dst) - 1 bytes, NUL-terminating the result.| | ft_strchr | returns a pointer to the first occurrence of the character c in the string s.| | ft_strrchr | returns a pointer to the last occurrence of the character c in the string s.| | ft_strnstr | locates the first occurrence of the null-terminated string little in the string big, where not more than len characters are searched.| | ft_strncmp | lexicographically compares the null-terminated strings s1 and s2. Returns an integer greater than, equal to, or less than 0, according as the string s1 is greater than, equal to, or less than the string s2. Compares not more than n characters. The comparison is done using unsigned characters, so that '\200' is greater than '\0'.| | ft_strdup | returns a pointer to a new string which is a duplicate of the string s.|
stdlib.h
| Function | Description | | --- | --- | | ft_atoi | converts the initial portion of the string pointed to by str to int representation and returns the int. | | ft_calloc | allocates memory for an array of nmemb elements of size bytes each and returns a pointer to the allocated memory. The memory is set to zero.|
Part_2
string's functions
| Function | Description | | --- | --- | | ft_substr | Allocates and returns a substring from the string ’s’. The substring begins at index ’start’ and is of maximum size ’len’.| | ft_strjoin | Allocates and returns a new string, which is the result of the concatenation of ’s1’ and ’s2’.| | ft_strtrim | Allocates and returns a copy of ’s1’ with the characters specified in ’set’ removed from the beginning and the end of the string.| | ft_split | Allocates and returns an array of strings obtained by splitting ’s’ using the character ’c’ as a delimiter.| | ft_strmapi | Applies the function ’f’ to each character of the string ’s’ to create a new string resulting from successive applications of ’f’.|
string to int
| Function | Description | | --- | --- | | ft_itoa | Allocates and returns a string representing the integer received as an argument. Negative numbers must be handled.|
file-descriptor's functions
| Function | Description | | --- | --- | | ft_putchar_fd | Outputs the character ’c’ to the given file descriptor.| |
Related Skills
node-connect
339.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR
