Skip to content

A fully functional Shell for Linux Terminals, with features primarily based on Bash, Zsh and Fish.

Notifications You must be signed in to change notification settings

IttoSanzzo/Minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minishell Artwork

About It

Some Features

  • Perfectly capable of parsing a prompt and launching executables with arguments.
  • It as suport to piping between executables.
  • Any common token will work as intended, except for && and ||, which weren't needed, but won't cause any error.
  • Quotes like "" and '' work the same as Bash.
  • You can separate commands with ;, as well as use redirections >, <, >>, << and pipes |.
  • Environment variables are handled, and expand to it's values when used, like $HOME, including the return code $?.
  • You can use Ctrl-C to interrupt and Ctrl-\ to quit a program, as well as Ctrl-D to throw an EOF, same as in bash.
  • A few of the built-in functions where made as well, meaning we don't call the executable, I re-coded them directly. It's the case for echo, pwd, cd, env, export, unset and exit.

Usage

  • You will need the external "readline" library installed in your machine.
  • It functions just as any other shell program would. Simply clone the repository, and then compile it using make. It will then generate a minishell executable.
  • Running this program will change the shell you're currently in, to the minishell.
./minishell
  • In it, you're able to do about anythink you would be in another common shell, for example, using commands from the enviromental path, such as ls, echo, and exit, which ends the program.

Minishell Commands Example

  • And as the minishell was done to be able to recognize terminal signals, it can be ended pressing CTRL-D as well, like Bash.

Using it as default Shell

To use it as your default Shell, you will need to, either:

  • Move the executable to the /bin/bash directory, and then change your Terminals default shell to it, if it's supported.

or

  • Add a line containing /path/to/executable/minishell to the end of whatever "rc" file your current Shell uses. For example, if it's Bash, then you will need to add that line at the end of your ~/.bashrc file.

Done with a lot of 💜... aand C, by IttoSanzzo.

About

A fully functional Shell for Linux Terminals, with features primarily based on Bash, Zsh and Fish.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published