| ▲ | liampulles 4 days ago |
| Because I need the scripts and snippets I write for my repos to work for other developers, I'm going to write them to be bash compatible. That applies also to scripts and snippets written by others that I consume. So if a shell is not bash syntax compatible, then it really has to offer some astonishingly useful features to offset my having to translate and map the scripts I need to run for it. Murex does not interpret "$(cmd args)". So unfortunately, I cannot use it. I know it's not fair, and I know that is promoting a lock-in of what shells can do, but I need to get shit done I'm afraid. |
|
| ▲ | moondev 4 days ago | parent | next [-] |
| You should consider putting a shebang at the top of your scripts instead of leaving it to fate |
| |
| ▲ | liampulles 4 days ago | parent [-] | | I do this for all the scripts I write. That does cover one of the scenarios I covered above, which is valid. | | |
| ▲ | rafram 4 days ago | parent [-] | | Then there’s no reason you can’t use a different shell as your interactive shell, while running your scripts in bash. | | |
| ▲ | kstrauser 4 days ago | parent | next [-] | | A thousand times this. I use bash scripting for things I’m going to distribute, but do all my local CLI work and scripting in fish because life’s too short to wear the bash hair shirt when I don’t have to. | | |
| ▲ | esafak 4 days ago | parent [-] | | bash: what you feel like doing with your head trying to get work done in it. |
| |
| ▲ | liampulles 4 days ago | parent | prev [-] | | For me to develop my scripts it would help alot if my interactive shell supports the syntax as well. I mean you are right of course, I CAN do that, but it then becomes a tradeoff question again of whether this non-compatible interactive shell has sufficient niceties. | | |
| ▲ | sholladay 4 days ago | parent [-] | | I agree with you. Have you tried Fish? I find it to be the perfect balance of these goals. It has lots of niceties, which for me was already enough to switch to it years ago. But lately, they’ve been adding lots of bash compatibility, which has made it even more awesome. | | |
|
|
|
|
|
| ▲ | rendaw 4 days ago | parent | prev | next [-] |
| You're not wrong, but I don't think this is either very useful feedback or an interesting comment. What you're saying applies to all core non established technologies: languages, operating systems, file formats, protocols, plugin ecosystems. If you're in a situation where that's non negotiable then obviously you're not the target audience here. |
|
| ▲ | MangoToupe 4 days ago | parent | prev [-] |
| I just write everything in fish and have an LLM translate it to bash. Freed up a couple brain cells for more useful things for sure. |
| |
| ▲ | sholladay 4 days ago | parent [-] | | Newer versions of Fish have significantly improved bash compatibility. The LLM may actually be making things harder for you than they need to be. | | |
| ▲ | kstrauser 4 days ago | parent [-] | | The single biggest win there was that it understands ‘export foo=bar’ now, which is probably 90% of what I’d ever copy and paste into a shell. |
|
|