I spent the last 8+ hours building a custom POSIX-compliant C shell from scratch. I built a custom lexer and parser to handle right-linear grammar, quoting, and escaping without using standard parsing tools like Lex/Yacc. I also implemented several complex built-in commands natively without relying on exec system calls, including a custom directory jumper (hop) with a time-decaying frecency algorithm (similar to Zoxide) that persists across sessions, and a custom cat-like tool (peek) that uses lseek to read files in reverse chunk-by-chunk to save memory.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.