Created
September 19, 2021 04:30
-
-
Save AliKhadivi/22dd64be26559f0ae255f26648f4615d to your computer and use it in GitHub Desktop.
Enable bash autocomplate! before run ( sudo apt-get install --reinstall bash-completion )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
bash-completion
is a set of bash scripts which enables customized completion for specific commands.This is not just for files and directories, but also e.g. for the commands. So you type partial of commands and by hitting Tab we get a auto completion of commands.
Installation
Step 1: Install bash-completion
And some times it works if we re-installed it by the follwing command:
Step 2: Enable bash-completion in your
.bashrc
fileOpen your
vim ~/.bashrc
and if these content doesn't exist there, add them at the end of it and save it.Important: After changing the file you need to source your
~/.bashrc
withsource ~/.bashrc
or reopen your Terminal. It should be fixed now.