Skip to content
IzaroArbaizaPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐚 Minishell

Minishell is a simple UNIX shell implementation developed as part of the 42 School curriculum. The project aims to recreate a basic shell environment, mimicking the behavior of the Bash shell, and to deepen understanding of processes, file descriptors, and system calls.

🧠 Project Summary

  • Written in C
  • Implements a minimal shell with support for:
    • Command execution
    • Built-in commands: echo, cd, pwd, export, unset, env, exit
    • Redirections: >, <, >>, <<
    • Pipes: |
    • Environment variable expansion
    • Signal handling (Ctrl+C, Ctrl+\, Ctrl+D)
    • Command history navigation (up/down arrows)
  • Utilizes system calls such as fork, execve, waitpid, pipe, dup2, signal, kill, getcwd, chdir, open, close, read, write, malloc, free, perror, exit, printf, access, readline, rl_clear_history, rl_on_new_line, rl_replace_line, rl_redisplay, add_history, and rl_replace_line.

📋 Features

✅ Mandatory

  • Implement a prompt that displays and waits for user input
  • Parse and execute simple commands with arguments
  • Implement built-in commands:
    • echo (with -n option)
    • cd (with relative or absolute paths)
    • pwd (no options)
    • export (with no options)
    • unset (with no options)
    • env (with no options or arguments)
    • exit (with exit status)
  • Handle redirections:
    • >: redirect output
    • <: redirect input
    • >>: append output
    • <<: here-document
  • Implement pipes (|) to connect multiple commands
  • Expand environment variables in commands (e.g., $HOME, $PATH)
  • Handle signals:
    • Ctrl+C: terminate current process
    • Ctrl+\: quit shell
    • Ctrl+D: exit shell
  • Implement command history navigation using up/down arrows

🎛️ Controls

Key Combination Action
Enter Execute the current command
Up / Down Navigate through command history
Ctrl + C Terminate the current process
Ctrl + \ Quit the current process
Ctrl + D Exit the shell

🚀 How to Use

Clone and build the project:

git clone https://github.com/IzaroArbaiza/Minishell.git
cd Minishell && make

Run the shell:

./minishell

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages