Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 1400  / 2 Years ago, mon, february 21, 2022, 5:49:43

While trying to compile using a C/C++ file using cc/c++ commands, I find that it is no longer possible for me to use Tab key for bash-completion.



I could do the same before 12.10. Also, when compiling with gcc and g++, bash-completion works fine.


More From » bash

 Answers
2

What you are seeing is a bug in bash-completion.



Luckly there's a workaround: you can open /usr/share/bash-completion/completions/cc, find the following:



complete -F _gcc gcc g++ g77 gcj gpc &&
{
cc --version 2>/dev/null | grep -q GCC && complete -F _gcc cc || :
c++ --version 2>/dev/null | grep -q GCC && complete -F _gcc c++ || :
}


and replace it with the following:



complete -F _gcc gcc g++ g77 gcj gpc cc c++

[#29721] Tuesday, February 22, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tudatchful

Total Points: 270
Total Questions: 109
Total Answers: 122

Location: Palau
Member since Tue, May 30, 2023
1 Year ago
;