]> code.delx.au - dotfiles/commitdiff
bash: load completion and git-prompt
authorJames Bunton <jamesbunton@delx.net.au>
Mon, 19 Nov 2018 14:34:21 +0000 (01:34 +1100)
committerJames Bunton <jamesbunton@delx.net.au>
Mon, 19 Nov 2018 14:34:58 +0000 (01:34 +1100)
.bashrc

diff --git a/.bashrc b/.bashrc
index 4c7226f6b23d4864e6bfb6c41604264aa182eb5f..50549e5ad8d85cbba0bc14cf5d771c18edd2eaa3 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -1,4 +1,4 @@
-# shellcheck disable=SC1090 # -- Can't follow non-constant source
+# shellcheck disable=SC1090 disable=SC1091 # -- Can't follow non-constant source
 
 ###########################
 # Settings for all shells #
@@ -61,6 +61,7 @@ export HISTCONTROL='erasedups:ignoredups:ignorespace'
 export HISTSIZE='100000'
 export HISTTIMEFORMAT='%F %T '
 
+[ -r /etc/bash_completion ] && source /etc/bash_completion
 
 ##################
 # Terminal setup #
@@ -90,6 +91,7 @@ function find_up_exists {
     return 1
 }
 
+[ -r /usr/lib/git-core/git-sh-prompt ] && source /usr/lib/git-core/git-sh-prompt
 [ -r /usr/share/git/completion/git-prompt.sh ] && source /usr/share/git/completion/git-prompt.sh
 function my_git_ps1 {
     find_up_exists .git || return