[Bash-autocompletion] Show flags which has HelpText or GroupID

Summary: Otherwise internal flags will be also completed.

Differential Revision: https://reviews.llvm.org/D34930

llvm-svn: 307116
This commit is contained in:
Yuka Takahashi 2017-07-05 02:36:32 +00:00
parent e03a654581
commit 34a7c3baf9
1 changed files with 1 additions and 1 deletions

View File

@ -228,7 +228,7 @@ OptTable::suggestValueCompletions(StringRef Option, StringRef Arg) const {
std::vector<std::string> OptTable::findByPrefix(StringRef Cur) const {
std::vector<std::string> Ret;
for (const Info &In : OptionInfos.slice(FirstSearchableIndex)) {
if (!In.Prefixes)
if (!In.Prefixes || (!In.HelpText && !In.GroupID))
continue;
for (int I = 0; In.Prefixes[I]; I++) {
std::string S = std::string(In.Prefixes[I]) + std::string(In.Name);