[Tcsh] One-line command parsing

Christos Zoulas christos at zoulas.com
Mon Aug 24 11:47:51 EDT 2026


What is the implication for the existing syntax? I.e. how are existing scripts affected?

christos

> On Aug 24, 2026, at 10:51 AM, Matheus <tateusg at protonmail.com> wrote:
> 
> https://github.com/Krush206/etcsh/pull/2
> Hello. I'm writing this e-mail as a matter of contribution. I forked Tcsh, and added some features. My most-recent contribution is on one-line command parsing. I'm currently working on an implementation to parse control structures in a single line, as in Bourne shells.
> 
> At first, I thought on parsing one-line commands on top of a temporary function. This turned out to be too complicated. Instead, I parse semicolons into a new node mode [NODE_FUNC]. I implemented a new mode [F_LINE]. I "reparse" the entire tree, setting the F_LINE bit to every command node [NODE_COMMAND]. Then, in execute(), I walk through the entire tree, analyzing which of the NODE_COMMAND entries contain the F_LINE mode. The node shall be saved in a circular linked list for each containing the F_LINE mode. Next, the circular linked list is analyzed from search1(). The parsing is almost the same from search().
> 
> This is still a work in progress. Not ready for production use. I don't know if this is 100% feasible, though, compared to past implementations, progressed quite fairly.
> 
> I'd appreciate for contributions and feedback.
> 
> Thank you.
> -- 
> Tcsh mailing list
> Tcsh at astron.com
> https://mailman.astron.com/mailman/listinfo/tcsh



More information about the Tcsh mailing list