kichkiro / minishell

This project is about creating a simple shell.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minishell

The existence of shells is linked to the very existence of IT.

At the time, all developers agreed that communicating with a computer using aligned 1/0 switches was seriously irritating.

It was only logical that they came up with the idea of creating a software to communicate with a computer using interactive lines of commands in a language somewhat close to the human language.

Thanks to Minishell, you’ll be able to travel through time and come back to problems people faced when Windows didn’t exist.

🌳 - Project tree

.
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md
β”œβ”€β”€ _notebook
β”‚   β”œβ”€β”€ bash.ipynb
β”‚   └── minishell.ipynb
β”œβ”€β”€ _subject
β”‚   └── en.subject.pdf
β”œβ”€β”€ _tester
β”‚   └── -> minishell_tester
└── project
    β”œβ”€β”€ Makefile
    β”œβ”€β”€ readline.supp
    β”œβ”€β”€ include
    β”‚   └── minishell.h
    β”œβ”€β”€ lib
    β”‚   β”œβ”€β”€ libft.a
    β”‚   └── libft.h
    └── src
        β”œβ”€β”€ _lst
        β”‚   β”œβ”€β”€ lst_add_back.c
        β”‚   β”œβ”€β”€ lst_free.c
        β”‚   β”œβ”€β”€ lst_free_last.c
        β”‚   β”œβ”€β”€ lst_new.c
        β”‚   β”œβ”€β”€ lst_set_to_head.c
        β”‚   └── lst_set_to_last.c
        β”œβ”€β”€ main
        β”‚   β”œβ”€β”€ bombfreeall.c
        β”‚   β”œβ”€β”€ history.c
        β”‚   β”œβ”€β”€ init.c
        β”‚   β”œβ”€β”€ main.c
        β”‚   β”œβ”€β”€ prompt.c
        β”‚   └── signal_handler.c
        β”œβ”€β”€ parser
        β”‚   β”œβ”€β”€ parsing_ext.c
        β”‚   β”œβ”€β”€ parsing_system.c
        β”‚   β”œβ”€β”€ variable_expand.c
        β”‚   └── wildcards.c
        β”œβ”€β”€ executor
        β”‚   β”œβ”€β”€ booleans.c
        β”‚   β”œβ”€β”€ builtins.c
        β”‚   β”œβ”€β”€ execution_system.c
        β”‚   β”œβ”€β”€ fd_handler.c
        β”‚   β”œβ”€β”€ heredoc.c
        β”‚   β”œβ”€β”€ pipes.c
        β”‚   └── redirections.c
        β”œβ”€β”€ errors
        β”‚   β”œβ”€β”€ errors_handler.c
        β”‚   β”œβ”€β”€ invalid_prompt.c
        β”‚   └── syntax_errors.c
        └── variables
            β”œβ”€β”€ env_variables.c
            β”œβ”€β”€ export_variables.c
            └── shell_variables.c

πŸ› οΈ - How to use?

git clone https://github.com/kichkiro/minishell.git
cd minishell/project
make
./minishell

and enjoy yourself...

πŸ“ˆ - Tester

The tester minishell_tester performs more than 200 tests on the main features of the project, including:

  • Parsing
  • Commands
  • Redirects
  • Pipes
  • Exit Status
  • Mixed Mandatory
  • Booleans
  • Wildcards

The tester launches Bash and Minishell processes with the Popen method of Python's subprocess library, inputs the same test, captures the output, and compares it.

NOTE: The tester was tested on Ubuntu 20.04 LTS with Python version 3.8. Also, during development we tried to make it as generic as possible so that it can work on other minishell projects, but this does not guarantee that it will work correctly on all projects.

βš–οΈ - License

See LICENSE

About

This project is about creating a simple shell.

License:Other


Languages

Language:C 69.6%Language:Jupyter Notebook 27.6%Language:Makefile 2.8%