summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2009-04-02 01:28:35 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2009-04-02 01:28:35 +0200
commit0372e14506b3cd40c2072dc33842b543dd662b3e (patch)
tree6d823679a90b1384c874e6dfb2ee12aa12e029fe
parent845ae5d0ef81df8c2934c18bec13932de0720164 (diff)
downloaddotfiles-0372e14506b3cd40c2072dc33842b543dd662b3e.tar.gz
dotfiles-0372e14506b3cd40c2072dc33842b543dd662b3e.tar.xz
dotfiles-0372e14506b3cd40c2072dc33842b543dd662b3e.zip
corrected the bashcompletion including
Diffstat (limited to '')
-rw-r--r--bashrc/common/bashcomp.sh26
1 files changed, 15 insertions, 11 deletions
diff --git a/bashrc/common/bashcomp.sh b/bashrc/common/bashcomp.sh
index 48d83fa..fbf9387 100644
--- a/bashrc/common/bashcomp.sh
+++ b/bashrc/common/bashcomp.sh
@@ -1,20 +1,24 @@
# bash completion
-bmajor=${BASH_VERSION%%.*}
-bminor=${BASH_VERSION#*.}
-bminor=${bminor//[^0-9]*}
+if [[ -f /etc/profile.d/bash-completion.sh ]]; then
+ . /etc/profile.d/bash-completion.sh
+else
+ bmajor=${BASH_VERSION%%.*}
+ bminor=${BASH_VERSION#*.}
+ bminor=${bminor//[^0-9]*}
-if [[ ${bmajor} -eq 2 && ${bminor} -gt 4 ]] || [[ ${bmajor} -gt 2 ]]; then
- [[ -f /etc/bash_completion ]] && source /etc/bash_completion
+ if [[ ${bmajor} -eq 2 && ${bminor} -gt 4 ]] || [[ ${bmajor} -gt 2 ]]; then
+ [[ -f /etc/bash_completion ]] && source /etc/bash_completion
- if [[ -d ~/.bash_completion.d ]]; then
- for i in ~/.bash_completion.d/*; do
- [[ -f ${i} ]] && source ${i}
- done
+ if [[ -d ~/.bash_completion.d ]]; then
+ for i in ~/.bash_completion.d/*; do
+ [[ -f ${i} ]] && source ${i}
+ done
+ fi
fi
-fi
-unset bmajor bminor
+ unset bmajor bminor
+fi
export COMP_WORDBREAKS=${COMP_WORDBREAKS/:/}
export FIGNORE=".o:~"