I was following this article to update my bash. I really want to update my version of bash so that I can use the --group-directories-first
option for the ls
command.
So far I have accomplished the following from the linked article:
I successfully executed the
brew install bash
command and downloaded the new bash. Per the article I can verify that the the/usr/local/bin/bash --version
on my machine shows the following:GNU bash, version 5.0.11(1)-release (x86_64-apple-darwin18.6.0) Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
- I completed the
sudo vim /etc/shells
command, editing the file to include the new downloaded bash. This is what it looks like:
- I completed the
- I executed the
chsh -s /usr/local/bin/bash
to set the new bash as default.
However, even after I close the terminal and relaunch it, I am not sure if I am using the new terminal. This is because:
when I execute
bash --version
I get the following:GNU bash, version 5.0.11(1)-release (x86_64-apple-darwin18.6.0) Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
But when I run echo $BASH_VERSION
I get something to the contrary (3.2.57(1)-release
). Isn't that the old verison?
- Also, the new "group directories first" command still doesn't work. I get the following error when I run
ls --group-directories-first
:
ls: illegal option -- - usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]
Any help or pointers would be greatly appreciated.
Thanks!