3 ms·
Traditional shells provide some small conveniences that are hard to give up. You cannot shoehorn this stuff into an existing language by defining global functio
by sjs 16y ago
Traditional shells provide some small conveniences that are hard to give up. You cannot shoehorn this stuff into an existing language by defining global functions, it must be syntax. Ruby could come close by not requiring parens, but still cannot allow something like the following zsh command without extra quoting, parens, or function calls.
for f ({foo,bar}/*(.)) { cp -v $f ${f%.js}.min.js } > output.txt
- burgerbrain 16y agoScsh (a Scheme based shell) is probably the most promising example of the shell revisited and done in an established language that I've seen, but there are serious problems with it's implementation. It won't run on x86_64 for starters... S-Expressions should allow you to do anything a shell can do, and with good completion (it'd have to be at least as good as Zsh's) I could see it being usable. Somebody just needs to do it right.