This is the Minishell project for Hive Helsinki (42 School). Minishell is a shell implementation that provides a basic command-line interface, offering various features and functionalities while adhering to most Unix shell standards. This project was done in collaboration with Azär Sarikhani Aghmioun
- Command Execution: Run various shell commands and programmes found via users' PATH environment variable.
- Environment Variables: Support for manipulating environment variables.
- Redirection: Implement input and output redirection.
- Pipes: Allow for the use of pipes to connect commands.
- Signal Handling: Handle signals such as Ctrl-C and Ctrl-.
- Built-in Commands: Implement a set of built-in shell commands:
cd
: Change the current directory.echo
: Print arguments to the standard output.pwd
: Print the current working directory.export
: Set or modify environment variables.unset
: Remove environment variables.env
: Display the environment.exit
: Terminate the shell.
- Error Handling: Display meaningful error messages and codes when necessary.
- Line Editing: Implement line editing and history using the GNU Readline library.
- Custom Prompt: Set a custom prompt for the shell.
- Command Line Parsing: Parse and tokenize the command line input.
Follow these instructions to get the Minishell project up and running on your local machine.
Before you begin, make sure you have the following installed:
gcc
(GNU Compiler Collection)make
readline
library
-
Clone this repository to your local machine:
git clone https://github.com/dorianjagusch/minishell.git cd minishell
-
Build the project using the provided Makefile:
make
-
Run Minishell:
./minishell
Minishell works similarly to other Unix shells. You can run various shell commands, utilise built-in commands, set environment variables, and perform other shell-related tasks. You will be greeted with a very colourful welcome message upon running the shell. Overall, the projects visual design is inspired by Azär's and my shared identity as members of the LGBTQ community.
All parts have been done in collaboration, yet each of us focused on different aspects of the project.
Azär:
- Parsing, checking and tokenisation of the input
- Signal handling
exit
commandheredoc
Dorian:
- Search for and execute commands
- Redirections and piping
- Built-in commands
- Support for wildcards
- Support for
&&
and||