From a291b3eed3c338c6991f26d442df723bdc610e72 Mon Sep 17 00:00:00 2001 From: chemotaxis Date: Mon, 2 May 2022 04:21:59 -0400 Subject: [PATCH] Fix grammar in `repo create` prompt (#5557) * Use plural linking verb While it looks like you could use "there's" informally, grammatically, it should be "are" since "commits" is plural. * Omit "the" I created a remote called "github" and got this prompt: > Would you like to push commits from the current branch to the "github"? Normally, the default name "origin" doesn't sound bad in that prompt, but using the name "github" made the prompt sound like something wasn't right to my American English-speaking ears. Here are a few options. Yes, I know English grammar sucks, to put it mildly. But, hopefully, the following options and explanations make sense. Get rid of "the". This is the option I went with. "github" acts as a proper noun, so no determiner is needed. If you substitute your own name for "github" in the original prompt above, you get the same effect: > Would you like to push commits from the current branch to "github"? Add the implicit word "remote". "github" now acts as an adjective and "the" refers to "remote": > Would you like to push commits from the current branch to the "github" remote? Or, combine the two. This last option relies on the fact that instructions and manuals often omit definite articles because most articles are definite. See the [zero-marking][2] article on Wikipedia. The original prompt already does this by omitting "the" before the word "commits": > Would you like to push commits from the current branch to "github" remote? Reference: [1]: http://writing.umn.edu/sws/quickhelp/grammar/articlesproper.html [2]: https://en.wikipedia.org/wiki/Zero-marking_in_English --- pkg/cmd/repo/create/create.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/repo/create/create.go b/pkg/cmd/repo/create/create.go index c105adb9a..0840a5892 100644 --- a/pkg/cmd/repo/create/create.go +++ b/pkg/cmd/repo/create/create.go @@ -535,10 +535,10 @@ func createFromLocal(opts *CreateOptions) error { return err } - // don't prompt for push if there's no commits + // don't prompt for push if there are no commits if opts.Interactive && committed { pushQuestion := &survey.Confirm{ - Message: fmt.Sprintf(`Would you like to push commits from the current branch to the %q?`, baseRemote), + Message: fmt.Sprintf(`Would you like to push commits from the current branch to %q?`, baseRemote), Default: true, } err = prompt.SurveyAskOne(pushQuestion, &opts.Push)