You get admin privileges on MacOS like a big boy. You can use bash or zsh commands in Terminal all you want.
Cool. So try updating to a version of Bash from the last 15 years, because the pre-installed one is Bash 3, because Bash 4 and 5 are under the GPLv3 license, which Apple won’t comply with.
…ah, no, you can’t update the pre-installed Bash, because it’s on a section of the file system that is read-only even with admin access. You can install Bash 5 as a separate shell, and use that as your default terminal shell, but any scripts written with the standard #!/bin/bash instead of the more flexible #!/usr/bin/env bash will still use Bash 3.
This “handholding” (or really, a safety net) is arguably a good thing, or at least a positive tradeoff; but you can’t claim it doesn’t exist.
I get that this is an Apples to Oranges comparison, but Powershell 7 is way easier to use than the default Windows Powershell because of autocomplete. I imagine that newer versions of Bash have made improvements that are similarly powerful.
It’s not so much a problem of there being things you “can’t do” in other shells or older Bash, as that it breaks existing shell scripts, which is frustrating.
Ok, yeah, I can see that there would be times this could matter but like 90% of the time this wouldn’t have mattered for my use case afaik. I didn’t realize you couldn’t backup the old copy in /bin and symlink to the brew one from there. In fact I thought I did do that long ago.
If it’s anything like when I used a Mac regularly 7y ago, Homebrew doesn’t install to /bin, it installs to /usr/local/bin, which only works for scripts that use env in their shell “marker” (if you don’t call it directly with the shell). You’re just putting a higher bash in the path, not truly updating the one that comes with the system.
That’s mostly still true, with the small caveat that the default prefix on arm64 macOS is /opt/homebrew rather than /usr/local, so you might have to add it explicitly to your PATH
Oh thank goodness, that was one of my main complaints with the system. Did they ever get around to requiring sudo like Macports (and any other reasonable system level packages manager on BSD/Linux)?
It’s been a long time since I even did this, and I’ve gotten at least one new machine since. I got several replies so I’ll just link my original response: https://lemmy.world/comment/11431853
It’s been a long time since I even did this, and I’ve gotten at least one new machine since. I got several replies so I’ll just link my original response: https://lemmy.world/comment/11431853
Cool. So try updating to a version of Bash from the last 15 years, because the pre-installed one is Bash 3, because Bash 4 and 5 are under the GPLv3 license, which Apple won’t comply with.
…ah, no, you can’t update the pre-installed Bash, because it’s on a section of the file system that is read-only even with admin access. You can install Bash 5 as a separate shell, and use that as your default terminal shell, but any scripts written with the standard
#!/bin/bash
instead of the more flexible#!/usr/bin/env bash
will still use Bash 3.This “handholding” (or really, a safety net) is arguably a good thing, or at least a positive tradeoff; but you can’t claim it doesn’t exist.
I agree it’s not as limitless as Linux, but there’s plenty of room for advanced users.
I’ve never needed to use a newer version of Bash. What is an example of something one couldn’t do with Bash 3 or zsh?
I get that this is an Apples to Oranges comparison, but Powershell 7 is way easier to use than the default Windows Powershell because of autocomplete. I imagine that newer versions of Bash have made improvements that are similarly powerful.
Oh, gotcha. I thought you were talking about limitations, not features. My misunderstanding.
It’s not so much a problem of there being things you “can’t do” in other shells or older Bash, as that it breaks existing shell scripts, which is frustrating.
I’m not sure what you mean. I have updated bash with a single homebrew command.
The poster you’re replying to was not referring to 3rd party software in user space.
Ok, yeah, I can see that there would be times this could matter but like 90% of the time this wouldn’t have mattered for my use case afaik. I didn’t realize you couldn’t backup the old copy in /bin and symlink to the brew one from there. In fact I thought I did do that long ago.
If it’s anything like when I used a Mac regularly 7y ago, Homebrew doesn’t install to /bin, it installs to /usr/local/bin, which only works for scripts that use env in their shell “marker” (if you don’t call it directly with the shell). You’re just putting a higher bash in the path, not truly updating the one that comes with the system.
That’s mostly still true, with the small caveat that the default prefix on arm64 macOS is /opt/homebrew rather than /usr/local, so you might have to add it explicitly to your PATH
Oh thank goodness, that was one of my main complaints with the system. Did they ever get around to requiring sudo like Macports (and any other reasonable system level packages manager on BSD/Linux)?
It’s been a long time since I even did this, and I’ve gotten at least one new machine since. I got several replies so I’ll just link my original response: https://lemmy.world/comment/11431853
Gotcha. Yeah low level Unix has some weird stuff going on sometimes.
Did you read the linked Q&A?
What do you get if you run
/bin/bash --version
?It’s been a long time since I even did this, and I’ve gotten at least one new machine since. I got several replies so I’ll just link my original response: https://lemmy.world/comment/11431853
Just because it doesn’t matter for most users doesn’t mean it isn’t a real limitation. I acknowledged as much in my original comment.
deleted by creator
deleted by creator