Created
May 19, 2020 13:14
-
-
Save ikurni/858b6691b94d58db54d93e8e4269d006 to your computer and use it in GitHub Desktop.
Bash auto completion is not working
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
Check /etc/profile.d/bash_completion.sh, make sure below line are there : | |
--------------------------------------------------------------------------- | |
# Check for interactive bash and that we haven't already been sourced. | |
[ -z "$BASH_VERSION" -o -z "$PS1" -o -n "$BASH_COMPLETION_COMPAT_DIR" ] && return | |
# Check for recent enough version of bash. | |
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.} | |
if [ $bmajor -gt 4 ] || [ $bmajor -eq 4 -a $bminor -ge 1 ]; then | |
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion" ] && \ | |
. "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion" | |
if shopt -q progcomp && [ -r /usr/share/bash-completion/bash_completion ]; then | |
# Source completion code. | |
. /usr/share/bash-completion/bash_completion | |
fi | |
fi | |
unset bash bmajor bminor | |
--------------------------------------------------------------------- | |
logout and login again |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment