GithubHelp home page GithubHelp logo

harshkumbhani / 42_minishell Goto Github PK

View Code? Open in Web Editor NEW

This project forked from realconrad/42minishell

0.0 0.0 0.0 342 KB

Creating our own shell based off bash

License: MIT License

C 96.23% Makefile 3.77%

42_minishell's Introduction

๐Ÿ“— Minishell

A custom shell environment designed to emulate basic features of traditional UNIX shells

Developed usingย ย 


Table Of Contents

Features

  • Command Execution: Ability to execute standard Unix/Bash commands.
  • Built-in commands: Includes multiple built-ins such as:
    • cd with only a relative or absolute path.
    • pwd with no options.
    • echo with option -n.
    • env with no options or arguments.
    • exit with no options.
    • unset with no options.
    • export with no options.
  • Command History: Keeps track of previous commands by using the up & down arrow keys.
  • Expansion: Our program interprets and handles environment variable expansion within quotes. Within single quotes its interpreted as a literal value while in double quotes it expands (if its a valid env variable), mirroring Bash's behaviour. It also supports expansion in heredocs.
  • Signal Handling: Includes features like interrupt (Ctrl+C), quit (Ctrl+\), and EOF (Ctrl+D). The signals behave similar to bash.
  • Error Handling: Includes protection for malloc(), pipe(), fork() and more. It also provides clear error messages (E.g. command not found, syntax error, no permission, malloc fail etc..).
  • Redirection And Piping: Supports intput, output, heredoc, and append redirection (>, <, <<, >>). It also supports piping (|) allow to command chaining.
  • Memory Management: Our program frees and cleansup any memory/file descriptors upon termination, ensuring system stability.
  • Tab Completion: Auto complete file names by using tab. Also by pressing tab in the prompt displays the current directories files/folders.
  • Documentation: All functions have doxygen comments to ensure readability and to better understand the underlying logic at a glance.

Installation

  1. Clone the repository
git clone https://github.com/harshkumbhani/42minishell.git
  1. Enter the directory and run make
cd 42minishell
make
  1. Run the program
./minishell
  1. Happy shell scripting :)

Contributors

Liencse

MIT

42_minishell's People

Contributors

realconrad avatar harshkumbhani 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.