diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-03-08 14:18:37 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-03-08 14:18:37 -0300 |
commit | cc248438ef6b2892f4b27ce95d1f3ff39c1c17fb (patch) | |
tree | a0b2da0ed06d82f80873a772150a77a54f3574ea | |
parent | ecc5f7524bb46cd9adad37920fa264c50ddd5e27 (diff) | |
download | profile-cc248438ef6b2892f4b27ce95d1f3ff39c1c17fb.tar.gz profile-cc248438ef6b2892f4b27ce95d1f3ff39c1c17fb.tar.bz2 |
Check for BASH before loading completions
-rw-r--r-- | profile.dot.link | 12 |
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 |