Skip to content

Denionline/minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

563 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minishell

A small Unix-like shell implemented in C that reproduces core bash features: parsing, execution, redirections, heredoc, pipes, and a selection of builtins.

Goals

  • Display interactive prompt with history.
  • Handle quoted strings (single & double quotes).
  • Support input/output redirections and heredoc.
  • Support pipes between commands.
  • Expand environment variables.
  • Provide builtin commands executed in the parent where required.
  • Basic signal handling to avoid unwanted termination.

Quick start

Build:

make

Run:

./minishell

Run tests (simple script included):

./test_minishell.sh
# or the checker:
./github_checker_checker.sh

Project layout (important files)

Features & behavior

  • Prompt and history via GNU readline (linked by Makefile).
  • Built-in commands implemented in src/builtin/* (examples: ft_cd, ft_pwd, ft_export, ft_unset, ft_env, ft_echo, ft_exit).
  • Redirections:
    • < (ARROW_LEFT), << (DOUBLE_ARROW_LEFT/heredoc), > (ARROW_RIGHT), >> (DOUBLE_ARROW_RIGHT).
  • Heredoc: temporary file .heredoc_<n> created by heredoc.
  • Process management: pipes and forks handled under src/execute/ (see include/execute.h).
  • Errors: reported using end in src/verify/end.c.

Development notes

  • The project depends on a local libft (see Makefile LIBFT_PATH).
  • Compiler flags: -Werror -Wextra -Wall -g.
  • Object files are placed under .build/ as configured in the Makefile.

Running / debugging tips

Contributing

  • Follow coding style and tests already present.
  • Add unit tests or integration tests under minishell_tester/ or via new scripts.

License & credits

  • Libft helper library required: clone or build as defined in Makefile (LIBFT_URL).
  • See Makefile for build and test targets.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors