Compare commits
4 Commits
77a704a09a
...
5dc7de73b3
| Author | SHA1 | Date | |
|---|---|---|---|
| 5dc7de73b3 | |||
| 640c22d366 | |||
| 856bc8243f | |||
| fbd2349060 |
32
README.md
32
README.md
@@ -1,3 +1,4 @@
|
|||||||
|
<!-- *This project has been made by sede-san and padan-pe* -->
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
<!-- Project badge -->
|
<!-- Project badge -->
|
||||||
@@ -30,7 +31,21 @@
|
|||||||
|
|
||||||
> The purpose of this project is to create a simple bash-like shell.
|
> The purpose of this project is to create a simple bash-like shell.
|
||||||
|
|
||||||
DETAILED INFO
|
**minishell** is a minimal bash-like shell implementation written in C. It provides essential shell functionality including command execution, piping, input/output redirection, and built-in commands.
|
||||||
|
|
||||||
|
### Key Features
|
||||||
|
|
||||||
|
- **Command Execution**: Execute external programs with argument parsing and path resolution.
|
||||||
|
- **Pipelines**: Connect multiple commands using the pipe operator (`|`).
|
||||||
|
- **Redirections**: Support for input (`<`), output (`>`), and append (`>>`) file redirections.
|
||||||
|
- **Built-in Commands**: `cd`, `echo`, `env`, `exit`, `export`, `pwd`, `unset`.
|
||||||
|
- **Environment Variables**: Access and manage shell environment variables.
|
||||||
|
- **Interactive Shell**: Read-Evaluate-Print Loop (REPL) powered by GNU Readline.
|
||||||
|
- **Quote Handling**: Proper handling of single and double quotes for literal strings.
|
||||||
|
|
||||||
|
### Development
|
||||||
|
|
||||||
|
The codebase adheres to **Norminette v4** standards and uses a modular architecture separating parsing, execution, and built-in command logic. Build artifacts are automatically generated; refer to `AGENTS.md` for detailed development guidelines.
|
||||||
|
|
||||||
For detailed info, refer to this project [subject](docs/en.subject.pdf).
|
For detailed info, refer to this project [subject](docs/en.subject.pdf).
|
||||||
|
|
||||||
@@ -88,7 +103,20 @@ For detailed info, refer to this project [subject](docs/en.subject.pdf).
|
|||||||
|
|
||||||
### Basic Usage
|
### Basic Usage
|
||||||
|
|
||||||
INSTRUCTIONS
|
1. **Execute the shell**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./minishell
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Interact with it like if it was bash**
|
||||||
|
```bash
|
||||||
|
echo "Hello, World!"
|
||||||
|
...
|
||||||
|
cat groceries.txt | grep tomatoes
|
||||||
|
...
|
||||||
|
echo "Greetings $USER!" > greetings.txt
|
||||||
|
```
|
||||||
|
|
||||||
## 📏 Norminette
|
## 📏 Norminette
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: sede-san <sede-san@student.42madrid.com +#+ +:+ +#+ */
|
/* By: sede-san <sede-san@student.42madrid.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/10/20 16:35:10 by sede-san #+# #+# */
|
/* Created: 2025/10/20 16:35:10 by sede-san #+# #+# */
|
||||||
/* Updated: 2026/02/14 01:13:42 by sede-san ### ########.fr */
|
/* Updated: 2026/02/14 15:17:38 by sede-san ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -42,4 +42,6 @@
|
|||||||
# include <term.h> // tgetent(3), tgetflag(3), tgetnum(3),
|
# include <term.h> // tgetent(3), tgetflag(3), tgetnum(3),
|
||||||
// tgetstr(3), tgoto(3), tputs(3)
|
// tgetstr(3), tgoto(3), tputs(3)
|
||||||
|
|
||||||
|
# define MINISHELL_VERSION "1.0.0"
|
||||||
|
|
||||||
#endif /* MINISHELL_H */
|
#endif /* MINISHELL_H */
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: sede-san <sede-san@student.42madrid.com +#+ +:+ +#+ */
|
/* By: sede-san <sede-san@student.42madrid.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2026/02/13 21:29:43 by sede-san #+# #+# */
|
/* Created: 2026/02/13 21:29:43 by sede-san #+# #+# */
|
||||||
/* Updated: 2026/02/14 01:39:36 by sede-san ### ########.fr */
|
/* Updated: 2026/02/14 15:17:17 by sede-san ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -115,6 +115,9 @@ void set_intp(
|
|||||||
return ;
|
return ;
|
||||||
set_int("?", "0", minishell);
|
set_int("?", "0", minishell);
|
||||||
set_int("_", "minishell", minishell);
|
set_int("_", "minishell", minishell);
|
||||||
|
set_int("PS0", "", minishell);
|
||||||
set_int("PS1", DEFAULT_PS1, minishell);
|
set_int("PS1", DEFAULT_PS1, minishell);
|
||||||
set_int("PS2", DEFAULT_PS2, minishell);
|
set_int("PS2", DEFAULT_PS2, minishell);
|
||||||
|
set_int("MINISHELL", "minishell", minishell);
|
||||||
|
set_int("MINISHELL_VERSION", MINISHELL_VERSION, minishell);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user