-->
  • Recent Articles

    How to easily Install Autocomplete for Bash on MAC

     By partially typing commands or arguments and then clicking the [Tab] key, you can use the bash completion tool to automatically complete them. You can use this to write the bash command in the terminal.

    Installation

    brew install bash-completion
    

    Bash completion will be installed in /usr/local/etc/bash_completion.d.

    For it to work, add this to your ~/.bash_profile:

    [ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion
    

    Or simply type:

    echo "[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion" >> ~/.bash_profile
    

    To re-read your bash profile: 

    source ~/.bash_profile

    No comments