enduserrr/minishell ? reverse-engineered prompt

Reverse engineered prompt

Build me a small shell program in C that feels like Bash for the basics.

I want it to open with a prompt, keep command history, and run normal commands from PATH as well as relative and absolute paths. It should support the usual builtins, cd, echo with n, pwd, env, export, unset, and exit. Please handle quotes properly so single quotes stop expansion and double quotes still allow variables. I also need input and output redirection, append mode, heredocs, and piping so commands can be chained together.

Make sure environment variables expand correctly, including $?. It should ignore Ctrl backslash, show a fresh prompt on Ctrl C, and exit cleanly on Ctrl D. If a command is invalid, a directory, or can’t be executed, show a sensible error. Memory cleanup matters too, so don’t leave leaks behind. If you need to check current behavior or details, look up the best docs online while you work.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab