Skip to content

Add a mini shell#54

Merged
ryuukumar merged 39 commits into
mainfrom
user/minish
May 11, 2026
Merged

Add a mini shell#54
ryuukumar merged 39 commits into
mainfrom
user/minish

Conversation

@ryuukumar
Copy link
Copy Markdown
Owner

@ryuukumar ryuukumar commented May 10, 2026

Adds cosh, a tiny shell that is capable of:

  • running builtin commands chdir, cd, echo, eval, exit, getpid, ls, mkdir, pwd, source, stat, touch
  • running elf binaries in the current directory with the typical fork + exec + wait structure
  • (untested) running elf binaries that are accessible by parsing PATH
  • elementary shell parsing like comments, semicolons, replacing $$ and $?
  • elementary conditional chaining with && and ||
  • builtin test with [ alias, with support for:
    • single arg, return true if exists
    • two arg (! does not contribute to arg count), check modes z, n, e, f, d, s
    • three arg, string comparisons = and !=, integer comparisons -eq, -ne, -lt, -le, -gt, -ge
  • interpreting passed file (syntax cosh <file>)

@ryuukumar
Copy link
Copy Markdown
Owner Author

image

Basic shell works!

@ryuukumar ryuukumar merged commit a93403d into main May 11, 2026
1 check passed
@ryuukumar ryuukumar deleted the user/minish branch May 11, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant