cubernetes/42_minishell ? reverse-engineered prompt

Reverse engineered prompt

Build me a small UNIX shell in C that behaves like a simplified bash. I want an interactive prompt with command history, support for running programs from PATH, quotes, environment variables, pipes, input and output redirection, heredocs, and the usual builtins like echo, cd, pwd, env, export, unset, and exit. It should handle Ctrl C, Ctrl D, and Ctrl backslash properly, and it should work both in normal interactive use and when commands are piped into it or passed with a command string.

If you can, also include the bonus shell features like && and ||, parentheses for grouping, and globbing with *. I’d like the prompt to feel polished too, with basic expansion for things like the current user and directory. Use the README and subject as the source of truth, and if something is unclear, look up the current docs online before guessing.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab