Visitar URL original
Fix incorrect docs in Issue&PR create by AliabbasMerchant · Pull Request #994 · cli/cli · GitHub
The Wayback Machine - https://web.archive.org/web/20200529202741/https://github.com/cli/cli/pull/994
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect docs in Issue&PR create #994

Open
wants to merge 1 commit into
base: trunk
from

Conversation

@AliabbasMerchant
Copy link

AliabbasMerchant commented May 26, 2020

Fixes #967

@mislav
Copy link
Member

mislav commented May 26, 2020

@AliabbasMerchant Thank you!

@ampinsk what do you think about this approach? What would be your preferred way to indicate that some flags can be repeated or accept multiple comma-delimited values?

@ampinsk
Copy link
Collaborator

ampinsk commented May 26, 2020

@mislav Is there a reason different flags work differently for multiple arguments? That would help me understand how to explain it in docs!

@mislav
Copy link
Member

mislav commented May 27, 2020 •

@ampinsk Regular flags don't take multiple values, so if one tried to repeat it, only the last value would be respected: pr create --title hello --title world. Also, a comma character in them has no special meaning, e.g. pr create --title hello,world results in literal title hello,world.

However, certain flags we explicitly designate as accepting multiple values, and for them the invocations pr create --label bug --label todo and pr create --label bug,todo are equivalent and will aggregate all passed values into a list.

The problem right now is that in our documentation there is no visual distinction between these types of flags; i.e. the user is left to guess that flags like --label, --project, --assignee, --reviewer can optionally receive multiple values by either repeating the flag or by passing comma-separated values. Ideally, they would learn that by perusing documentation.

@mislav mislav changed the base branch from master to trunk May 27, 2020
@ampinsk
Copy link
Collaborator

ampinsk commented May 27, 2020

@probablycorey, I know you've been thinking about our docs and syntax we use, so I'm curious if you have any thoughts here, or if you've seen anything around this in looking at other tools' docs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.