]> 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)
commit6e51b14dc8b74d364f69a7db389e1807e3cf22c7
treec6cf40fe755d8a49d187962b59a646d642be6173
parentcd74a21a79eb784e884831ea11ad1a32c84a078c
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]