Add terminal autocomplete

Installation

Step 1: Install bash-completion

$ sudo apt-get install bash-completion
And some times it works if we re-installed it by the follwing command:

$ sudo apt-get install --reinstall bash-completion
Step 2: Enable bash-completion in your .bashrc file

Open your gedit ~/.bashrc and if these content doesn't exist there, add them at the end of it and save it.

# enable bash completion in interactive shells
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi

Important: Logout and log back in and reopen your Terminal. It should be fix now.

Категория: 
The code has been tested and works

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.