[Bash-completion-commits] [bash-completion] 02/02: cc, c++: Check path to binary when finding out if it's gcc (Alioth: #314417).
Ville Skyttä
scop-guest at alioth.debian.org
Sat Sep 7 07:06:31 UTC 2013
This is an automated email from the git hooks/post-receive script.
scop-guest pushed a commit to branch master
in repository bash-completion.
commit ffabc6f2829201815c1a9c69cfdf8bdbe77ff648
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sat Sep 7 10:05:03 2013 +0300
cc, c++: Check path to binary when finding out if it's gcc (Alioth: #314417).
---
completions/gcc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/completions/gcc b/completions/gcc
index aa9ffdd..578f800 100644
--- a/completions/gcc
+++ b/completions/gcc
@@ -47,9 +47,11 @@ _gcc()
} &&
complete -F _gcc gcc g++ g77 gcj gpc &&
{
- cc --version 2>/dev/null | grep -q GCC && \
+ cc --version 2>/dev/null | grep -q GCC || \
+ [[ $( _realcommand cc ) == *gcc* ]] && \
complete -F _gcc cc || complete -F _minimal cc
- c++ --version 2>/dev/null | grep -q GCC && \
+ c++ --version 2>/dev/null | grep -q GCC || \
+ [[ $( _realcommand c++ ) == *g++* ]] && \
complete -F _gcc c++ || complete -F _minimal c++
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/bash-completion/bash-completion.git
More information about the Bash-completion-commits
mailing list