Update bash os x
You probably use auto-completion for completing commands, filenames, and variables by starting to type and then hitting Tab to auto-complete the current word or hitting Tab two times to get a list of all possible completions, if there is more than one. This is the default completion of Bash. However, programmable completion goes much beyond that, because it allows command-specific completions that can depend on the context.
Imagine, for example, typing cmd -[tab][tab] , and then seeing a list of all options that are applicable to this command. Programmable completion allows to do that. Programmable completion logic is defined by the creators of commands in completion specifications, typically in the form of completion scripts. These completion scripts have to be sourced in your shell to enable the completion functionality for a command.
The problem is that the programmable completion features of Bash have been extended since version 3. By upgrading to a newer version of Bash, you become able to use these completion scripts, which can be extremely useful. I wrote an entire article called Programmable Completion for Bash on macOS , which explains all you need to know to take full advantage of programmable completion on macOS after upgrading to a newer Bash version.
To upgrade the default shell of your macOS system to the latest version of Bash, you have to do three things:. Each step is extremely easy, as explained in the following. The two versions will exist side by side on your system, but you can just ignore the old version from there on. I recommend to use Homebrew to install the latest version of Bash:.
To verify the installation, you can check that you now have two versions of Bash on your system:. The first one is the new version, and the second one is the old version:.
So far, so good. Now you have make this version the default. With just those few commands, you should be using with the latest version of your shell. The Homebrew command update actually refers to updating Homebrew itself.
In this example, Homebrew will look for the package named bash on your computer and install the latest version. If you're comfortable with compiling and installing your own programs, this may not be outside the realm of possibility, but if you're not familiar with compilers, Makefiles and the gotchas that can come with trying to do it the non-Apple way, you may well be better off leaving it as is.
If you're not running Web Sharing, remote login, ssh or other services, you don't have too much about which to worry. Significant differences will be your starting point. For one thing, you really do want to keep your base bash --version as the starting point. So, where the Lion and later systems would use v3.
Even using my Ask Different article as a template, you may run into problems. Note the comments under the article in which one Snow Leopard user ran into issues because the GNU sources were looking for a different version of readline in order to compile.
You may or may not run into the same problem. You may run into others. Best of luck with it. As pointed out elsewhere, you'd do well to consider moving from Tiger to a supported version of OS X. Currently, the oldest supported OS X version is Lion Everything older than that has been end-of-lifed by Apple.
Lion will likely go the way of the dodo as soon as Yosemite is released. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Learn more. Is there coming more than this? Macinman Sep 30 I thought it was interesting to see a bash update for os x. My media server, which runs ubuntu studio, just had a couple of bash updates this past week as well.
While I have applied all available patches, Since SSH or Telnet aren't open to the public here, I'm not sure how at risk my systems are. I usually just use the shell over the local LAN which is just the two computers in home. Surfspirit Sep 30 Aergern Sep 30 So So glad I've used zsh for over a decade. Thanks Apple. Amc3 Sep 30 Terminal show that this patch changes the GNU bash, version 3.
0コメント