SkillAgentSearch skills...

Minishell

MiniShell is a minimalistic shell interpreter, supporting features like basic command execution, environment variable handling, command chaining, redirections, pipes, subshells, and here documents.

Install / Use

/learn @LeaYeh/Minishell
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<div align="center">

<i>🌊</i>rash Minishell | @42Vienna

The Creative Abort Shell

<br>

Workflow Status Norminette Status GitHub release (latest by date including pre-releases) GitHub tag (latest SemVer)

Visits Badge Lines of Code GitHub

<br>

This project goes beyond merely crafting a new shell from scratch; it endeavors to emulate the Bash source code and the GNU Bash POSIX manual while incorporating principles from compiler parsing. By referencing these authoritative sources, the project aims to meticulously implement a shell interpreter. Moreover, it documents the entire journey from ground zero to the creation of a personalized shell, serving as a valuable resource for future learners seeking insights into shell development.

welcome_art

</div>

Table of Contents

Support Features

| Category | Module | Function | Requirement | Status | |------------|-------------|------------------------|----------------------------------------------------------------------------------------------------------|--------| | Frontend | Lexer | Tokenizing | Tokenize user input into token list. | ✅ | | | | | Support PIPE \|. | ✅ | | | | | Support logical AND &&. | ✅ | | | | | Support logical OR \|\|. | ✅ | | | | | Support sequential operator ;. | 🛇 | | | | | Support left and right parentheses () for SUBSHELL. | ✅ | | | | | Support WORD representing basic words. | ✅ | | | | | Recognize ASSIGNMENT_WORD = for local variable assignments. | ✅ | | Frontend | Parser | Syntax Analysis | Analyze syntax of token list and report syntax errors based on Shift-Reduce algorithm with predefined grammar rules and then output as command table list. | ✅ | | Frontend | Expander | Brace Expansion | Perform brace expansion to generate multiple strings based on expressions enclosed in braces {}. | 🛇 | | | | Tilde Expansion | Perform tilde expansion to replace ~ with the current user's home directory path. | 🛇 | | | | Parameter Expansion | Perform parameter expansion to replace variables and special parameters (optionally enclosed in braces {}) in a string. | ✅ | | | | Command Substitution | Perform command substitution to replace command output in a string. | 🛇 | | | | Arithmetic Expansion | Perform arithmetic expansion to evaluate mathematical expressions enclosed in $(()). | 🛇 | | | | Process Substitution | Perform process substitution to use the output of a command as a file or input to another command. | 🛇 | | | | Word Splitting | Perform word splitting to split a string into separate words based on spaces, tabs, and newlines. | ✅ | | | | Wildcard Expansion | Perform filename expansion (globbing) in the current directory to generate filenames matching a specified pattern. | ✅ | | | | Quote Removal | Remove quotes from strings to interpret them as literal values. | ✅ | | Backend | Builtins | cd | Implement cd with relative and absolute paths. | ✅ | | | | echo | Implement echo with option -n. | ✅ | | | | env | Implement env with no options or arguments. | ✅ | | | | exit | Implement exit with no options. | ✅ | | | | export | Implement export with no options. | ✅ | | | | pwd | Implement pwd with no options. | ✅ | | | | unset | Implement unset with no options. | ✅ | | Backend | Redirection | IO Redirection | Redirect STDIN with input redirection by < operator. | ✅ | | | | | Redirect HEREDOC with input redirection by << operator. | ✅ | | | | | Redirect STDOUT with output redirection by > operator. | ✅ | | | | | Redirect STDOUT append with output redirection by >> operator. | ✅ | | | | Subshell Redirection | Implement redirections and pipes between subshell groups (\|). | ✅ | | | | Pipe Redirection | Redirect STDIN/STDOUT by pipe(). | ✅ | | Backend | Assignment | Local Assignment | Assign variables local to the current shell environment or for the duration of a command following the assignment. | 🛇 | | Cross-end | Signals | Signal Handling | Handle ctrl-C as SIGINT mirroring bash's behavior. | ✅ | | | | | Handle ctrl-D as EOF mirroring bash

Related Skills

View on GitHub
GitHub Stars46
CategoryCustomer
Updated24d ago
Forks2

Languages

C

Security Score

95/100

Audited on Mar 4, 2026

No findings