This looks very cool, and I've been having a lot of inspiration to write my own shell, but I want to make it vaguely compatible with my system.
POSIX compatibility might be overkill for the start.
This looks very cool, and I've been having a lot of inspiration to write my own shell, but I want to make it vaguely compatible with my system.
POSIX compatibility might be overkill for the start.
The remaining parts are stuff about process and file semantics - you can find that in APUE, or really from reading manpages. You also need to learn the arcane VT100 escape sequences for the TUI, and there are plenty of articles for that too.
It looks like APUE might be the ticket to fill in some of my gaps though. Thank you for the suggestion.
Escape sequences should be fine (famous last words?).
Elvish is written in golang. I’m sure that’s going to be quite grokkable if you want to understand how a shell is written ?
Even if it's heavily commented, I learn better from debate, trade off analysis, or failure analysis.
To put it simply, I like argue and break things.
I understand why someone might not want to start there, but I think that could be a bit short-sighted. I think people are far too quick to dismiss code that's old. Yeah, it may have a lot of warts (for a lot of reasons, some more valid than others), but that doe not negate the value of understanding how something was implemented.
I'm also not suggesting this would be easy. There are some very complicated C codebases out there. I'm just saying that I disagree that there's no point in examining them.