

Since Readline is actually its own program, it uses its ownĭotfile, named ~/.inputrc, a file which is used to configure all programs that Incredibly configurable–for a complete list of options, see this Uses a library called GNU Readline for reading lines of text from the user Įverything you type into Bash first is processed by Readline. Tab completion isn’t the only way you interact with with the command line. You add a snippet similar to the one above to your ~/.bashrc.
INSTALL SML NJ USING HOMEBREW INSTALL
They’ll either install themselves or require that With a little bit of digging, you’ll be able to find Bash completion scripts for To git branch, as well as git branch ma and have Bash complete that to This means you can now do things like git br and have Bash complete that ForĮxample, when installing the most recent version of Git through Homebrew on OS In a post-installation note about completion scripts having been installed. Once again, this runs a script that turns on the more powerful Bash completionįrom time to time when installing a piece of software, you might see something Source $(brew -prefix )/etc/bash_completion # Add the newly installed bash to the list of valid login shells echo " $(brew -prefix ) /bin/bash" | sudo tee -a /etc/shellsįinally, add the following to your ~/.bash_profile: if then Haven’t already, go install Homebrew, then run # Install updated bash and bash completion If you’re on OS X, you’ll have to install Bash completion separately. This runs a script that turns on more powerful Bash completion scripts. This new configuration is actually quite simple. Package manager commands, flags to your favorite programs, and more.

Sophisticated properly configured, Bash can complete things like Git branches, Bash’s tab completion functionality is actually much more You probably know by now that you can press TAB to have Bash automaticallyĬomplete filenames. Of your command line, controlling how you actually interact with it. There are also a number of settings that let you configure the feel Tab Completion & The Prompt Lineīy changing your Bash prompt, you get to customize the look of your command People take great pride inĬrafting a beautiful prompt, and it can be a really fun project to introduce you You should definitely give these a read through. Turn on colors or bring up information about the shell. So that you don’t have to look up the specific escape sequences needed to
INSTALL SML NJ USING HOMEBREW HOW TO
Lots of comprehensive resources online for how to get started configuring your Should give you an idea of what’s possible. Google search will turn up some vastly different Bash prompts they One of the most popular aspects of Bash to customize is the prompt. Though you should substitute ~/.bash_profile if you’re on OS X. There’s a good discussion of the underlying differencesīetween these files here, but you don’t necessarily have to know what You’reĪlmost sure to find something there that will be useful to customizing yourĪs we’ve mentioned a few times before, the file you’re going to be usingĪbundantly to configure your prompt is the. Should be sure to brush up on the lessons in the Bash topic.

In addition to the things we talk about here, you If you’ve reached this page, you’re probably interested in how best to optimize
