Hello. I've introduced some modifications on Tcsh. • Functions; • variable assignment from pipes and redirections; • comments on interactive sessions; • tell whether stdin is empty.
There's more, but I recognize these as most valuables. I'd appreciate for any feedback, suggestion or contribution. Contributions of any kind are very welcome. The source code is here [https://github.com/Krush206/tcsh]. The modifications are separated in branches. Later on, I might create a branch including all modifications. I might make these modifications into the original Csh as well. Actually, I do have a repository for the original Csh [https://github.com/Krush206/3bsd-csh]. Though out-of-date, only functions have been implemented. The original idea on functions was based on goto and source, after realizing these built-ins make a great combination for simulating functions. This initial idea was limited to scripts. Recently, it evolved to source from pipes, which sources from a tree derived from aliases and variables, making suitable for interactive sessions as well. Unlike to aliases and variables, the tree is restrictive. Once a function is declared, may not be redeclared or undeclared. The "Variable assignment from pipes and redirections" idea, originally, had assignment limited to files, and would read to a pre-defined variable. It evolved to allow assignment from pipes, as well as reading to user-defined variables. This work also provides a fix for blank output from pipes. As of now, only the "Tell whether stdin is empty" idea was approved to upstream.