4 ms·
The Unix shell may be a highly powerful interactive programming environment, but it's sure hard to think of anything that comes anywhere close to sucking as bad
by comex 13y ago
The Unix shell may be a highly powerful interactive programming environment, but it's sure hard to think of anything that comes anywhere close to sucking as badly. With the shell and the standard Unix commands, some things that are hard in other languages are easy, and most of the things that are easy in other languages are hard to impossible... I'd love to see a clean slate replacement for the shell that still feels Unix-like and retains most of its existing benefits.
(I suspect PowerShell would be a good environment to take design cues from or even port, but I've never used it so I can't say for sure.)
- sigil 13y ago> I'd love to see a clean slate replacement for the shell that still feels Unix-like and retains most of its existing benefits. Have you looked at scsh, the Scheme Configurable Shell? It's a nice clean language with a REPL (well, it's just scheme) that has syntax for all the usual things you'd want in a unix shell -- pipelines, redirections, environment, signals, etc. http://www.scsh.net/docu/html/man-Z-H-1.html http://www.scsh.net/docu/html/man-Z-H-1.html
- thristian 13y agoHave you looked at "rc", the shell from Plan 9? It's very similar in spirit to the Bourne shell, but it's fundamentally better thought-out. http://plan9.bell-labs.com/sys/doc/rc.html http://plan9.bell-labs.com/sys/doc/rc.html
- mixmastamyk 13y agoHmm, sounds like you've never written batch files, the ultimate in "suck", but then you mention PowerShell, so I'm not so sure. Anyway, I enjoy using the fish shell, and you may too.
- jfb 13y agoI think the problem is that the terrible shell semantics are inextricable from the larger semantics of using Unix. So you could replace sh with something less dumb-stupid, but you'd still be interacting with the garbage that is the shell environment. You could then replace the latter, but at that point, well, you're off into the weeds. I hold my nose and write shell, even as I look over at, for instance, scsh, and think ... yeah.
- ygra 13y agoPowerShell is nice and in principle seems more Unixy than the normal Unix core utils in that cmdlets really do only one thing and that one well (most of ls' options for example can be solved by simply combining Get-ChildItem with Sort-Object or one of the Format-* cmdlets). As for a port, you're welcome to contribute on Pash (https://github.com/Pash-Project/Pash https://github.com/Pash-Project/Pash) – it's still woefully incomplete, sadly.
- nfoz 13y ago> I'd love to see a clean slate replacement for the shell that still feels Unix-like and retains most of its existing benefits. I've been working on one, in my spare time for about a year. I can't tell you how exciting it is. It's still a ways from being ready for actual use, but I'll have a website up in a couple of weeks to showcase the approach, and will surely post to HN when it's up.