Giter Club home page Giter Club logo

minishell's Introduction

Minishell

Minishell is a simple imitation of the bash command line interface. Developed as part of the 42 Istanbul coding school, this project aims to recreate the basic functionality of a Unix shell and offer a customized terminal experience supporting various commands.

Getting Started

To clone this project onto your local machine, follow these steps:

git clone https://github.com/sademirdev/minishell.git
cd minishell

Requirements

The necessary libraries and tools for Minishell to operate:

  • Clang compiler
  • Make
  • readline library
  • Installation

To compile and run the project, use the following commands:

make
bin/minishell

Features

Minishell supports the following features:

  • Command history and display prompts
  • Search and launch the appropriate executable based on the PATH variable or through relative/absolute paths
  • Manage environment variables and the exit status of the most recently executed foreground command
  • Shortcut keys (ctrl-C, ctrl-D, ctrl-)
  • Basic redirections, heredoc and pipes
  • Proper handling of text and environment variables with single and double quotes
  • Built-in commands: echo, cd, pwd, export, unset, env, exit

Usage

When Minishell is run, it displays a command prompt waiting for a new command from the user. Users can enter commands and execute them by pressing ENTER. Use the exit command to terminate the program.

Contributing

If you would like to contribute to the project:

  • Fork the project and make improvements in your own branch.
  • Commit your changes and create a pull request.
  • Describe your pull request in detail.

License

This project is licensed under the MIT License.

Authors

minishell's People

Contributors

sademirdev avatar aliberkpancar avatar hulyakizrakyigit avatar dumran avatar acbst0 avatar murmurlab avatar kaankarakus avatar

Stargazers

Alanis Hadama avatar muhammed maruf güveli avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

dumran

minishell's Issues

redirect bugs

">>" asd

export T=">>"
$T lol

"$H"OM"E"
cat OME
/bin/rm -f OME


"$USER'$USER'"
cat "$USER'$USER'"
/bin/rm -f "$USER'$USER'"


"$USER"
cat $USER
/bin/rm -f $USER

dollar bugs

'$USER'
export T=">>"
$HOME
"$H"OM"E"
"$USER'$USER'"
They are not same with bash

$<alpha>

When i write alphabetic , it prints prompt twice? I can not fix it.
example :
$d
$v

minishell: $r
minishell: $rminishell:

FIXED

Spaces

Should we add other space options? (seperator.c:18)

Switch case

Is the switch case forbiden in norm? (minishell.c:4)

built-ins bugs

export T=e E=c S=h L=o
$T$E$S$L

export T=e E=c S=h L=o
$T$E"c"$L -nn

export T=e E=c S=h L=o
$T$E"C"$L -nn

export T=e E=c S=h L=o
$T$E"C"$L "" -""n

echo test1 test2

cd ../../..
exit code ???

unset PATH
echo $?

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.