When I do the brew upgrade
I see I do have the newer version. How can I use it?
$ bash -version
GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13)
Copyright (C) 2007 Free Software Foundation, Inc.
$ brew upgrade bash
Error: bash-4.2.45 already installed
$ which bash
/bin/bash
I do see I have
/usr/local/Cellar/bash/4.2.45/bin
but when i do
$ /usr/local/Cellar/bash/4.2.45/bin/bash
I am still in
$ bash -version
GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13)
Copyright (C) 2007 Free Software Foundation, Inc.
08:06:45 mdurrant w89123148q1 /usr/local/Cellar/bash/4.2.45/bin master
The contents of /etc/shells
are:
/usr/local/Cellar/bash/4.2.45/bin/bash # (I added this)
/usr/local/bin/bash
/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
chsh didn't seem to do what I hoped:
$ chsh -s /usr/local/Cellar/bash/4.2.45/bin/bash
Changing shell for mdurrant.
Password for mdurrant:
chsh: /usr/local/Cellar/bash/4.2.45/bin/bash: non-standard shell
$ bash --version
GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13)
Copyright (C) 2007 Free Software Foundation, Inc.
I have the file here:
$ l /usr/local/Cellar/bash/4.2.45/bin/bash
-r-xr-xr-x 1 mdurrant admin 699688 Apr 14 19:54 /usr/local/Cellar/bash/4.2.45/bin/bash*
I've yet to actually see the new bash version for anyway that I try interactively to invoke it.
$ echo $BASH_VERSION
shows
3.2.51(1)-release
I tried using dscl and did
> change Local/Default/Users/mdurrant UserShell /bin/bash /usr/local/Cellar/bash/4.2.45/bin/bash
but got
<main> attribute status: eDSAttributeNotFound
<dscl_cmd> DS Error: -14134 (eDSAttributeNotFound)
and now list shows
> UserShell: /usr/local/Cellar/bash/4.2.45/bin/bash