aboutsummaryrefslogtreecommitdiff
path: root/profile.dot.link
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-03-08 14:18:37 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-03-08 14:18:37 -0300
commitcc248438ef6b2892f4b27ce95d1f3ff39c1c17fb (patch)
treea0b2da0ed06d82f80873a772150a77a54f3574ea /profile.dot.link
parentecc5f7524bb46cd9adad37920fa264c50ddd5e27 (diff)
downloadprofile-cc248438ef6b2892f4b27ce95d1f3ff39c1c17fb.tar.gz
profile-cc248438ef6b2892f4b27ce95d1f3ff39c1c17fb.tar.bz2
Check for BASH before loading completions
Diffstat (limited to 'profile.dot.link')
-rw-r--r--profile.dot.link12
1 files changed, 7 insertions, 5 deletions
diff --git a/profile.dot.link b/profile.dot.link
index 40f41d2..57afb93 100644
--- a/profile.dot.link
+++ b/profile.dot.link
@@ -101,11 +101,13 @@ export GIT_PS1_SHOWUNTRACKEDFILES=""
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
-if ! shopt -oq posix; then
- if [ -f /usr/share/bash-completion/bash_completion ]; then
- . /usr/share/bash-completion/bash_completion
- elif [ -f /etc/bash_completion ]; then
- . /etc/bash_completion
+if [ ! -z "$BASH" ]; then
+ if ! shopt -oq posix; then
+ if [ -f /usr/share/bash-completion/bash_completion ]; then
+ . /usr/share/bash-completion/bash_completion
+ elif [ -f /etc/bash_completion ]; then
+ . /etc/bash_completion
+ fi
fi
fi