Giter Club home page Giter Club logo

minishell's Introduction

๐Ÿ“œ Minishell

Welcome to Minishell, a simple yet powerful Unix shell. Minishell provides a command-line interface with several essential features. It's designed to be intuitive and functional for everyday use.

๐ŸŒŸ Key Features

  • Command Execution: Minishell can execute system commands based on the PATH variable or using a relative or absolute path.

  • Prompt: It displays a prompt to indicate it's ready to accept a command.

  • Command History: Minishell maintains a working history of previously executed commands, allowing you to recall and re-execute them easily.

  • Signal Handling: The shell handles signals efficiently, using a single global variable to indicate received signals. This approach ensures that the signal handler won't access main data structures, maintaining the integrity of your shell.

  • Quoting: Minishell correctly interprets single (' ') and double (" ") quotes, preventing unwanted interpretation of metacharacters within them.

  • Redirection: You can redirect input (<) and output (>) and even implement heredoc-style input (<<) to read input until a delimiter is seen (without updating the history). Append mode (>>) for output is also supported.

  • Pipes: Minishell allows you to use pipes (|) to connect the output of one command to the input of the next, enabling complex command chains.

  • Environment Variables: You can work with environment variables, using the "$" symbol followed by a sequence of characters to expand to their values.

  • Exit Status: The shell provides access to the exit status of the most recently executed foreground pipeline using "$?".

  • Interactive Mode: In interactive mode, Minishell behaves like you would expect from a shell. You can use ctrl-C to display a new prompt, ctrl-D to exit the shell, and ctrl-\ (ctrl-backslash) to do nothing.

  • Built-in Commands: Minishell implements several essential built-in commands, including:

    • echo with the -n option
    • cd with relative or absolute paths
    • pwd with no options
    • export with no options
    • unset with no options
    • env with no options or arguments
    • exit with no options

๐Ÿš€ Getting Started

Requirements

You need to install readline first

sudo apt update
sudo apt install libreadline-dev

Compilation

To compile and run Minishell, use the provided Makefile. Here are the basic commands:

make         # Compile Minishell
./minishell  # Run Minishell

Enjoy using Minishell! ๐Ÿš๐Ÿ’ป

minishell's People

Contributors

romann-broque avatar hellothere-immat avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.