Guest User

/etc/profile.d/bash_completion

a guest
Jun 27th, 2022
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.73 KB | None | 0 0
  1. # shellcheck shell=sh disable=SC1091,SC2039,SC2166
  2. # Check for interactive bash and that we haven't already been sourced.
  3. if [ "x${BASH_VERSION-}" != x -a "x${PS1-}" != x -a "x${BASH_COMPLETION_VERSINFO-}" = x ]; then
  4.  
  5.     # Check for recent enough version of bash.
  6.     if [ "${BASH_VERSINFO[0]}" -gt 4 ] ||
  7.         [ "${BASH_VERSINFO[0]}" -eq 4 -a "${BASH_VERSINFO[1]}" -ge 2 ]; then
  8.         [ -r "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion" ] &&
  9.             . "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion"
  10.         if shopt -q progcomp && [ -r /usr/share/bash-completion/bash_completion ]; then
  11.             # Source completion code.
  12.             . /usr/share/bash-completion/bash_completion
  13.         fi  
  14.     fi  
  15.  
  16. fi
  17.  
Advertisement
Add Comment
Please, Sign In to add comment