Created
May 28, 2017 08:15
-
-
Save zerda/cf4f91b290b4b5fd2abdb7a7f6e1e9f0 to your computer and use it in GitHub Desktop.
Bash Completion Init Script
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 for interactive bash and that we haven't already been sourced. | |
if [ -n "${BASH_VERSION-}" -a -n "${PS1-}" -a -z "${BASH_COMPLETION_COMPAT_DIR-}" ]; then | |
# Check for recent enough version of bash. | |
if [ ${BASH_VERSINFO[0]} -gt 4 ] || \ | |
[ ${BASH_VERSINFO[0]} -eq 4 -a ${BASH_VERSINFO[1]} -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 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment