On 31/05/2013, Fernando C.V. <ferk...@gmail.com> wrote: > Would it make sense to create a whole shell infrastructure based on > little small commands? > > I mean, not just replacing no-brainer builtin things like "echo", etc, > but also things like "if", "while", "for", "set", by doing system() > calls to an extremelly minimal shell. Would it make sense? maybe even > a command for creating pipes.
I tried this lately. Actually, I tried no shell at all. The basic idea was this: a program is a list of arguments. Each utility parses the first few arguments and spawns the rest by its operational scheme, like chroot and setsid. This was the dawn of grief, for many utilities, for example if, must take many argument lists. I first tried '--' as list separator, but thus I had to quote '--'s in the argument list, which I did with another '-'; as I soon learned, this is very cumbersome. I mean to try again, this time with s-expressions, which, as they are balanced, need no quotation. Cheers, Strake