Skip to content

Latest commit

 

History

History
48 lines (39 loc) · 2.19 KB

README.md

File metadata and controls

48 lines (39 loc) · 2.19 KB

Minishell

Minishell is a mini version of a Unix shell, created as a school project with Bash as the reference shell. The goal of this project is to implement essential features of a shell environment from scratch, deepening our understanding of process creation, signal handling, and command execution.

This project was a collaborative effort, with each contributor responsible for different aspects of the shell.

Parts Handled by me:

  • Parsing and Tokenization (Fully Implemented): Efficiently parses and tokenizes user input for command processing.
  • Command Execution (Fully Implemented): Executes system commands, handling both relative and absolute paths.
  • Pipes (Fully Implemented): Implements piping (|), enabling the chaining of commands.
  • Redirection (Fully Implemented): Handles input (<), output (>), and append (>>) redirection.
  • Environment Variables (Fully Implemented): Manages environment variables like $HOME and $USER.
  • Heredoc (Collaboration): Includes partial functionality for heredoc (<<).
  • Signal Handling (Collaboration): Basic signal handling (e.g., Ctrl+C and Ctrl+).
  • Error Handling (Partially Implemented): Provides error management for invalid commands and syntax, with some areas still under development.
  • Built-in Commands (Improved): Fixed edge cases for built-in commands (echo, cd, pwd, export, unset, env, exit).

Parts Handled by partner:

  • Initial Pipex Implementation (Fully Implemented): Provided the foundational code for pipe handling.
  • Prompt (Fully Implemented): Displays a customizable shell prompt.
  • Built-in Commands: echo, cd, pwd, export, unset, env, exit
  • Error Handling (Partially Implemented): Provides appropriate error messages for invalid commands or incorrect usage.
  • Signals (Collaboration): Implements signal handling (e.g., Ctrl+C, Ctrl+) to manage shell behavior.
  • Heredoc (Collaboration): Includes partial functionality for heredoc (<<).

Compilation

  1. Clone the repository:
git clone [email protected]:k2matu/minishell.git
  1. Navigate into the directory:
cd minishell
  1. Compile the library using make:
make
  1. Run the shell:
./minishell

Usage

Once the shell is running, you can execute commands similarly to Bash!