This is an archive of the discontinued LLVM Phabricator instance.

[autocompletion] Handle the space before pressing tab
ClosedPublic

Authored by yamaguchi on Oct 24 2018, 4:07 AM.

Details

Summary

Distinguish "--autocomplete=-someflag" and "--autocomplete=-someflag,"
because the latter indicates that the user put space before pushing tab
which should end up in a file completion.

Diff Detail

Repository
rC Clang

Event Timeline

yamaguchi created this revision.Oct 24 2018, 4:07 AM
teemperor requested changes to this revision.Oct 24 2018, 4:15 AM
teemperor added inline comments.
clang/lib/Driver/Driver.cpp
1514 ↗(On Diff #170845)

Why not const bool HasSpace = PassedFlags.endswith(",")?

1539 ↗(On Diff #170845)

Can you describe in the comment why printing a newline and returning here is the correct behavior? It's not obvious to the reader (including me).

This revision now requires changes to proceed.Oct 24 2018, 4:15 AM
yamaguchi updated this revision to Diff 170849.Oct 24 2018, 4:37 AM

Updated HasSpace, added comments, fixed typo in the commit message

This revision is now accepted and ready to land.Oct 24 2018, 4:52 AM
This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.