[PATCH] D35759: [Bash-autocompletion] Show HelpText with possible flags

Raphael Isemann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 22 11:50:27 PDT 2017


teemperor accepted this revision.
teemperor added a comment.

LGTM.



================
Comment at: clang/utils/bash-autocomplete.sh:60
   eval local path=${COMP_WORDS[0]}
-  flags=$( "$path" --autocomplete="$arg" 2>/dev/null )
+  flags=$( "$path" --autocomplete="$arg" 2>/dev/null | sed -e 's/\t.*.\s*$//' )
   # If clang is old that it does not support --autocomplete,
----------------
ruiu wrote:
> `\t.*.\s*` doesn't seem to make much sense to me. Isn't `\t.*` enough?
Can you add some comment why we need the sed? Something like `# Filtering out the help texts of the flags as we can't display them in bash easily`.


https://reviews.llvm.org/D35759





More information about the cfe-commits mailing list