]> Frank Brehm's Git Trees - config/berta/etc.git/commitdiff
committing changes in /etc after emerge run
authorFrank Brehm <frank@brehm-online.com>
Tue, 20 Dec 2016 13:23:34 +0000 (14:23 +0100)
committerFrank Brehm <frank@brehm-online.com>
Tue, 20 Dec 2016 13:23:34 +0000 (14:23 +0100)
Package changes:
+app-shells/bash-completion-2.1_p20141224-r1

.etckeeper
bash/bashrc.d/bash_completion.sh [new file with mode: 0644]

index 3139a8b2b571b5135246dbeab685ab805e148656..00b92dc869ee76b44c2877a2827d53f06e52684b 100755 (executable)
@@ -24,6 +24,7 @@ maybe chmod 0644 'bash/bash_logout'
 maybe chmod 0644 'bash/bashrc'
 maybe chmod 0755 'bash/bashrc.d'
 maybe chmod 0644 'bash/bashrc.d/.keep_app-shells_bash-0'
+maybe chmod 0644 'bash/bashrc.d/bash_completion.sh'
 maybe chmod 0644 'bash/bashrc.d/fbrehm.sh'
 maybe chmod 0755 'bash_completion.d'
 maybe chmod 0644 'bash_completion.d/gentoo-style-init'
diff --git a/bash/bashrc.d/bash_completion.sh b/bash/bashrc.d/bash_completion.sh
new file mode 100644 (file)
index 0000000..bb0fdb6
--- /dev/null
@@ -0,0 +1,15 @@
+# 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