[flagged]
Fascinating that you resurrected an account from 2014 just for LLM spam, were the credentials compromised or something?
Building a Shell
11–20 of 49 posts
Re: Building a Shell
#12Re: Building a Shell
#13Re: Building a Shell
#14Re: Building a Shell
#15Bit of pedantry but I don't think traditional unix shell (like this) follows repl model; the shell is not usually doing printing of the result of evaluation . Instead the printing happens more as a side effect of the commands.
The first line was always to turn off echo, and I've always wondered why that was a decision for batch script. Or I'm misremembering. 30 years of separation makes it hard to remember the details.
Re: Building a Shell
#16Re: Building a Shell
#17Bit of pedantry but I don't think traditional unix shell (like this) follows repl model; the shell is not usually doing printing of the result of evaluation . Instead the printing happens more as a side effect of the commands.
Re: Building a Shell
#18Fun read. Wonder if you are able to edit text in the shell, or if you need to implement a gap buffer to allow it?
IIRC readline uses a `char *` internally since the length of a user-edited line is fairly bounded.
Re: Building a Shell
#19Bit of pedantry but I don't think traditional unix shell (like this) follows repl model; the shell is not usually doing printing of the result of evaluation . Instead the printing happens more as a side effect of the commands.
I remember my first shell programming I ever did was batch in windows back in the 3.11/95 days. The first line was always to turn off echo, and I've always wondered why that was a decision for batch script. Or I'm misremembering. 30 years of separation makes it hard to remember the details.
Re: Building a Shell
#20Fun read. Wonder if you are able to edit text in the shell, or if you need to implement a gap buffer to allow it?
Editing the current line works because I brought in https://man7.org/linux/man-pages/man3/readline.3.html towards the end so I could support editing, tab completion, and history. IIRC readline uses a `char *` internally since the length of a user-edited line is fairly bounded.