[Bash-autocompletion] Check clang version in Bash
ClosedPublic

Authored by yamaguchi on Jun 25 2017, 6:17 PM.

Details

Summary

Add check if user's clang version supports --autocomplete or not.
If not, we just autocomplete files.

Diff Detail

Repository
rL LLVM
yamaguchi created this revision.Jun 25 2017, 6:17 PM
ruiu added inline comments.Jun 25 2017, 6:22 PM
clang/utils/bash-autocomplete.sh
28 ↗(On Diff #103881)

It is probably a bit better if you mention that it falls back to the default filename completion if --autocomplete is not available. How about this: If clang is old that it does not support --autocomplete, fall back to the filename completion.

31 ↗(On Diff #103881)

If it is the same as just return, please remove 0.

33 ↗(On Diff #103881)

nit: it is a bit easier to read if you insert a newline here to separate code blocks.

yamaguchi updated this revision to Diff 103884.Jun 25 2017, 6:26 PM

Update patch.

ruiu accepted this revision.Jun 25 2017, 6:27 PM

LGTM

This revision is now accepted and ready to land.Jun 25 2017, 6:27 PM
teemperor accepted this revision.Jun 25 2017, 10:50 PM

Works as intended, good job!

This revision was automatically updated to reflect the committed changes.