Skip to content
alexey0bPublic

About

A lightweight shell implementation in Go with pipe support and builtin commands

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Minishell CI Coverage Status

👶🏼 Minishell

A lightweight shell implementation in Go with pipe support and builtin commands.


✅ Supported Features

Builtin Commands

Command Description Example
cd <path> Change directory cd /tmp, cd ~, cd
pwd Print working directory pwd
echo [args...] Print arguments echo hello world
ps List running processes ps
kill <pid> Remove process by PID kill 1

External Commands

  • Full support for all system commands available in $PATH (ls, cat, grep, etc.)

Pipeline Support

  • Execute multiple commands connected with pipes: echo test | cat | grep test
  • Commands in pipeline run concurrently in separate goroutines

Pipelines visualization

Signal Handling

  • SIGINT - Cancel current command execution
  • SIGTERM or Ctrl+D - Graceful shutdown

▶️ Usage

  • Clone the repository:
git clone https://github.com/alexey0b/minishell
cd minishell
  • Build the project:
make build
  • Run the shell:
./minishell

📖 Examples

Basic Commands

$ ./minishell
> pwd
/home/user
> echo hello world
hello world
> cd /tmp
> pwd
/tmp

Pipeline Commands

> echo test | cat
test
> echo hello world | grep hello | cat
hello world

🛠️ Technical Details

Requirements

  • Go 1.25+
  • Unix/Linux/macOS

Dependencies


About

A lightweight shell implementation in Go with pipe support and builtin commands

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages