]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
feat: add minimal POSIX sh shell (/bin/sh)
authorTulio A M Mendes <[email protected]>
Wed, 11 Feb 2026 22:22:37 +0000 (19:22 -0300)
committerTulio A M Mendes <[email protected]>
Fri, 13 Feb 2026 02:20:50 +0000 (23:20 -0300)
commit2e215074380829207d9955dc3eab8ca230e81803
treee9b24a66b4ffe3e792e1db2f5faf558636ec199e
parentfa5236fd587fbf94b118b821f72bb95e8df1bdb6
feat: add minimal POSIX sh shell (/bin/sh)

- user/sh.c: minimal sh-compatible shell with:
  - Line reading from stdin
  - Argument parsing (whitespace-delimited)
  - PATH resolution (/bin/, /disk/bin/)
  - Input/output redirection (< and >)
  - Pipeline support (up to 4 stages with |)
  - Builtins: exit, echo
  - External commands via fork+execve+waitpid
- Makefile: added SH_ELF build rule and initrd packaging as /bin/sh
- cppcheck clean, 19/19 smoke tests pass
Makefile
user/sh.c [new file with mode: 0644]