This is an archive of the discontinued LLVM Phabricator instance.

[GSoC] Delete space after flags which has '=' prefix
ClosedPublic

Authored by yamaguchi on Jun 24 2017, 6:55 AM.

Event Timeline

yamaguchi created this revision.Jun 24 2017, 6:55 AM
yamaguchi updated this revision to Diff 103839.Jun 24 2017, 6:58 AM

Fixed review comment.

yamaguchi edited the summary of this revision. (Show Details)Jun 24 2017, 6:59 AM
ruiu added inline comments.Jun 24 2017, 7:49 AM
clang/utils/bash-autocomplete.sh
4

Do you need to set arg to ""? I thought that variables defined by local would automatically get an empty value.

33–35

A shorthand notation of this which is used often in shell programming is

[[ ${flag:-1} == '=' ]] && compopt -o nospace

Can you add a comment to describe why you need this? Something like "bash automatically appends a space after '=' by default. Disable it so that it works nicely for options in the form of -foo=bar."

yamaguchi updated this revision to Diff 103842.Jun 24 2017, 8:59 AM

Update diff.

yamaguchi marked 2 inline comments as done.Jun 24 2017, 8:59 AM
ruiu accepted this revision.Jun 24 2017, 9:02 AM

LGTM

This revision is now accepted and ready to land.Jun 24 2017, 9:02 AM
teemperor accepted this revision.Jun 24 2017, 9:17 AM
yamaguchi closed this revision.Jun 25 2017, 5:39 PM