Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Install bash completion for Mac OSX

Answer:

Bash completion (bash-complete) is a tool that allow you to auto complete commands and their arguments easily using the "tab" keys.

Firstly, make sure you have installed Homebrew, then

# brew install git bash-completion

And add the following lines in your ~/.bash_profile

if [ -f `brew --prefix`/etc/bash_completion ]; then
    . `brew --prefix`/etc/bash_completion
fi

Restart your terminal and now you can see the effect of bash complete by tabbing..

  1. How to install homebrew for Mac?
  2. Install Git in Mac using MacPort
  3. How to install Easy Install for Python in Ubuntu
  4. How to check the bash shell version
  5. Swap last two words in Bash

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>