4 ms·
> No other shell gives you this, for some reason. That's not true. There are a few other shells out there that do. The issue is the popular shells tend to be t
by hnlmorg 7y ago
> No other shell gives you this, for some reason.
That's not true. There are a few other shells out there that do. The issue is the popular shells tend to be the ones that go for POSIX (or Bash) compatibility and those that do go for a syntax redesign (for example) often get criticised for not being POSIX compatible. There is comment further down in this discussion describing those syntax differences as "bugs" rather than "features"; which just goes to demonstrate how ingrained Bash et al are to Linux/UNIX command line users.
Personally I see Fish and other non-POSIX shells like another programming language (arguably that's literally what they are). So switching from Bash to Fish - or whatever else - should be like switching from C++ to C#, Java, Rust, whatever. Sure there will be a lot of commonalities but it is the differences what makes the shift worthwhile.
That all said, I can't blame people for preferring a POSIX or Bash compatible shell because that's what you'd expect to find on any Linux or UNIX system. Or at the very least a Bourne Shell (sh). Plus most documentation online will be tailored for compliant shells. However it does become a self-fulling prophecy where compliant shells are more widely used because they're already more widely used. I'm fine with this though. People who want to make the shift and learn something new can still do so under the knowledge that they're breaking from the norms and all the potential complications that might bring; and people who just want something that's universal and works - irrespective of it's warts - can continue to do so.
- atemerev 7y agoYes, you are right. I believe that we software engineers should not dwell in such conservative states of mind and innovate and even break from standards when necessary. Bash and POSIX were good enough 30 years ago when they first appeared. Now they feel really dated.
- yoloClin 7y agoI would _kill_ for a shell that returns bash-like data to stdout, but a JSON blob to pipes, or whatever the not-1970 concept of a pipe would be.
- umanwizard 7y agoThe shell isn’t in charge of what data commands print out.
- yoloClin 7y agoTrue, but it's driven the method for output for a long time. If sh/bash exposed functions for objective output I'm sure a lot more utilities commonly in use would output in a similar methodology.
- umanwizard 7y agoNo it hasn’t. The shell isn’t involved at all in program output. When a program writes to stdout it’s talking directly to the kernel, and the shell is suspended and not running.
- yoloClin 7y agoI don't really care what outputs the data I see. I care about how it's formatted and whether that format is easily readable + usable by consuming utilities. I don't understand why your being standoffish over a technicality.
- umanwizard 7y agoOkay, that’s fine. I think it would be nice for an OS to have a set of utilities that communicate with each other with objects instead of text. So I agree with you. I’m just pointing out that this has literally zero whatsoever to do with the shell. You posted it as a comment in an article involving a choice of shells. How am I being standoffish?
- hnlmorg 7y agoThat's true for POSIX shells but if you're breaking POSIX comparability then you can start doing all kinds of clever/stupid hacks to turn pipes into something more than dumb byte streams. Coincidentally, this is what I'm working on with my shell.
- kerng 7y agoPowerShell is the modern equivalent basically. You can also use it in Linux. But I think it has a bit of a learning curve because not thinking in string outputs is quite different.