Enable bash-completion in bash_profile
authorSteve Youngs <steve@steveyoungs.com>
Tue, 9 Feb 2021 05:07:54 +0000 (15:07 +1000)
committerSteve Youngs <steve@steveyoungs.com>
Tue, 9 Feb 2021 05:07:54 +0000 (15:07 +1000)
Signed-off-by: Steve Youngs <steve@steveyoungs.com>
etc/pkgusr/bash_profile

index 7c4b777..dbea839 100644 (file)
@@ -82,12 +82,6 @@ alias ls='ls --color=always -Fb'
 # Suck in some handy shell functions
 . /etc/pkgusr/handy_funcs
 
-# If they exist, load any private settings.  This comes last so that
-# we can override any system defaults if need be
-if [ -f ${HOME}/.pkgusrrc ]; then
-    . ${HOME}/.pkgusrrc
-fi
-
 # Go to the home directory whenever we su to a package user.
 cd
 
@@ -96,6 +90,22 @@ if [[ ! -d ${HOME}/.config/git && -f ${HOME}/.gitconfig ]]; then
     prep_git
 fi
 
+# Bash Completion
+if [ -f /usr/share/bash-completion/bash_completion ]; then
+    . /usr/share/bash-completion/bash_completion
+fi
+
+# If they exist, load any private settings.  This comes last so that
+# we can override any system defaults if need be
+if [ -f ${HOME}/.pkgusrrc ]; then
+    . ${HOME}/.pkgusrrc
+fi
+
+###
+# Don't put anything below here unless it relies on something being
+# set in ~/.pkgusrrc
+###
+
 # Maybe check if the build script can be updated, but not on dumb
 # terms so that TRAMP still works.
 if [ ${CHECKUPDATES} -eq 1 -a "$TERM" != "dumb" ]; then