Re: how use bash 5.0 port

2020-09-01 Thread Bill Cole
On 1 Sep 2020, at 21:36, Ken Cunningham wrote: The thing to do with bash is link it statically — then it can never break. I do this on all older systems, and then copy it into /bin/bash If you're doing this to fix the actual serious vulnerabilities in older bash (e.g. shellshock) you should

Re: how use bash 5.0 port

2020-09-01 Thread Ken Cunningham
The thing to do with bash is link it statically — then it can never break. I do this on all older systems, and then copy it into /bin/bash see if you need inspiration. Ken

Re: how use bash 5.0 port

2020-09-01 Thread raf
On Wed, Sep 02, 2020 at 11:10:28AM +1000, Dave Horsfall wrote: > On Tue, 1 Sep 2020, dan d. wrote: > > > The way to call the bash 5 version first is either to move the macports > > version to /bin/ or put the /opt/local/bin/ in your shell path first. > > In my 40+ years of Unix experience, nev

Re: how use bash 5.0 port

2020-09-01 Thread Dave Horsfall
On Tue, 1 Sep 2020, dan d. wrote: The way to call the bash 5 version first is either to move the macports version to /bin/ or put the /opt/local/bin/ in your shell path first. In my 40+ years of Unix experience, never overwrite system binaries; that's why we have $PATH etc. -- Dave

Re: how use bash 5.0 port

2020-09-01 Thread Ryan Schmidt
On Sep 1, 2020, at 18:58, jam wrote: > On 1 Sep 2020, at 8:00 pm, macports-users-request wrote: > >> I have always been too cautious to change the default shell on MacOS to >> anything other than one that is officially provided, especially for the >> root account, even if those shell version

Re: how use bash 5.0 port

2020-09-01 Thread j...@tigger.ws
> On 1 Sep 2020, at 8:00 pm, macports-users-requ...@lists.macports.org wrote: > > I have always been too cautious to change the default shell on MacOS to > anything other than one that is officially provided, especially for the > root account, even if those shell versions are as old as the hi

Re: how use bash 5.0 port

2020-09-01 Thread Murray Eisenberg
I already had /opt/local/bin/ ahead of /bin in my PATH, but that did not fiix things. Only the change in Terminal’s Preferences, which I described in a previous reply, fixed it. > On 1 Sep2020, at 11:05 AM, dan d. wrote: > > Macports puts binary app. files in /opt/local/bin . > > The mac os

Re: how use bash 5.0 port

2020-09-01 Thread dan d.
Macports puts binary app. files in /opt/local/bin . The mac os uses the unix location of /bin/ for bash , that is where the default bash is found. The way to call the bash 5 version first is either to move the macports version to /bin/ or put the /opt/local/bin/ in your shell path first. Doing

how NOT to use bash 5.0 port (was Re: how use bash 5.0 port)

2020-08-31 Thread Bill Cole
On 31 Aug 2020, at 13:22, John Chivian wrote: If you really want to change the default you can using the chsh command (man chsh), but I've never done so for the root or startup user. Too much experience based paranoia I guess. Yeah... It is not a good idea to change the default shell of root

Re: how use bash 5.0 port

2020-08-31 Thread Ryan Schmidt
On Aug 31, 2020, at 16:41, Steven Smith wrote: > Note: These Catalina+ steps are not currently reflected in the MacPorts > instructions at > https://trac.macports.org/wiki/howto/bash-completion#Step3:UsebashfromMacPortsinyourterminal Anybody may feel free to add useful information to the wik

Re: how use bash 5.0 port

2020-08-31 Thread Steven Smith
To continue using bash on 10.15 and ignore the zsh deprecation: chsh -s /opt/local/bin/bash And, if using /bin/bash rather than MacPorts bash, stick this in your ~/.profile (or ~/.bash_profile): # don't use zsh default on macOS export BASH_SILENCE_DEPRECATION_WARNING=1 Note: These Catalina+ st

Re: how use bash 5.0 port

2020-08-31 Thread Arno Hautala
> On 31 Aug 2020, at 15:52, Murray Eisenberg wrote: > > I think I found a way to fix this: > > Terminal > Preferences > General, in “Shells open with” keep “Command > (complete path)” chosen and replace /usr/local/bin/bash with > /opt/local/bin/bash > > (Or is this problemmatic?) Mine is

Re: how use bash 5.0 port

2020-08-31 Thread Rainer Müller
On 31/08/2020 18.32, Murray Eisenberg wrote: > So then I successfully installed the MacPorts port bash @5.0.17_0. > > —> But how do I make this bash 5.0 my shell when I open Terminal? It's a bit hard to find, but this wiki page has instructions for both Terminal.app and iTerm2: https://trac.macp

Re: how use bash 5.0 port

2020-08-31 Thread Murray Eisenberg
I think I found a way to fix this: Terminal > Preferences > General, in “Shells open with” keep “Command (complete path)” chosen and replace /usr/local/bin/bash with /opt/local/bin/bash (Or is this problemmatic?) > On 31 Aug2020, at 1:25 PM, Stephen J. Butler wrote: > > In Terminal -> Prefer

Re: how use bash 5.0 port

2020-08-31 Thread Uli Wienands
Years ago I did shell surgery on a PowerMac running Tiger. What I did then, simply, was to replace the shell executable by the new version, keeping the old one around with a .bak extension or something like that. Needless to say, this was done only after verifying the new one worked, and the v

Re: how use bash 5.0 port

2020-08-31 Thread Arno Hautala
I’m not sure what went awry from those steps, what does the following print for the “Shell” line? You’ll be asked for your password. > EDITOR=cat chsh You also shouldn’t need to reboot for these changes to take effect. Just opening a new Terminal window or tab should be enough. -- arno s ha

Re: how use bash 5.0 port

2020-08-31 Thread Eric F (iEFdev)
On 8/31/20 19:22 , Murray Eisenberg wrote: > To get the MacPorts bash 5.0 the default shell, I now tried: > > - edit /private/etc/shells so as to add /opt/local/bin/bash After that… use the `chsh' (*ch*ange *sh*ell) command: chsh -s /opt/local/bin/bash It should ask you for your pwd. If not,

Re: how use bash 5.0 port

2020-08-31 Thread Murray Eisenberg
To get the MacPorts bash 5.0 the default shell, I now tried: - edit /private/etc/shells so as to add /opt/local/bin/bash - in System Preferences > Users & Groups, I opened Advanced Options for my (adminstrator’s) account and changed the entry for Login shell to /opt/local/bin/ba

Re: how use bash 5.0 port

2020-08-31 Thread John Chivian
I have always been too cautious to change the default shell on MacOS to anything other than one that is officially provided, especially for the root account, even if those shell versions are as old as the hills.   For scripts and launchd process simply put the #!/path/to/bash5 at the top and th

Re: how use bash 5.0 port

2020-08-31 Thread Arno Hautala
> On 31 Aug 2020, at 12:32, Murray Eisenberg wrote: > > —> But how do I make this bash 5.0 my shell when I open Terminal? > This page includes info on changing the shell from the command line as well as from System Preferences. https://www.howtogeek.com/444596/how-to-change-the-default-shel

how use bash 5.0 port

2020-08-31 Thread Murray Eisenberg
I want to upgrade the built-ub bash 3.2 shell on my macOS Catalina (10.15.6) to bash 5.0. I tried to do this by building from scratch, using the methods given at https://scriptingosx.com/2019/02/install-bash-5-on-macos/?unapproved=66418&moderation-hash=e680aa22ae89f6f565cadd63e63d04e0#comment-66