提交 f5df7cab 编写于 作者: M Mislav Marohnić

Passing values for long-form flags is now available without `=`

上级 22fc159d
......@@ -25,7 +25,7 @@ compare [-uc] [-b <BASE>]
-c, --copy
Put the URL to clipboard instead of opening it.
-b, --base=<BASE>
-b, --base <BASE>
Base branch to compare against in case no explicit arguments were given.
[<START>...]<END>
......
......@@ -20,10 +20,10 @@ var cmdCreate = &Command{
-p, --private
Create a private repository.
-d, --description=<DESCRIPTION>
-d, --description <DESCRIPTION>
Use this text as the description of the GitHub repository.
-h, --homepage=<HOMEPAGE>
-h, --homepage <HOMEPAGE>
Use this text as the URL of the GitHub repository.
-o, --browse
......
......@@ -10,17 +10,17 @@ import (
var cmdFork = &Command{
Run: fork,
Usage: "fork [--no-remote] [--remote-name=<REMOTE>] [--org=<ORGANIZATION>]",
Usage: "fork [--no-remote] [--remote-name <REMOTE>] [--org <ORGANIZATION>]",
Long: `Fork the current project on GitHub and add a git remote for it.
## Options:
--no-remote
Skip adding a git remote for the fork.
--remote-name=<REMOTE>
--remote-name <REMOTE>
Set the name for the new git remote.
--org=<ORGANIZATION>
--org <ORGANIZATION>
Fork the repository within this organization.
## Examples:
......
......@@ -38,22 +38,22 @@ With no arguments, show a list of open issues.
List the labels available in this repository.
## Options:
-a, --assignee=<ASSIGNEE>
-a, --assignee <ASSIGNEE>
In list mode, display only issues assigned to <ASSIGNEE>.
-a, --assign=<USERS>
-a, --assign <USERS>
A comma-separated list of GitHub handles to assign to the created issue.
-c, --creator=<CREATOR>
-c, --creator <CREATOR>
Display only issues created by <CREATOR>.
-@, --mentioned=<USER>
-@, --mentioned <USER>
Display only issues mentioning <USER>.
-s, --state=<STATE>
-s, --state <STATE>
Display issues with state <STATE> (default: "open").
-f, --format=<FORMAT>
-f, --format <FORMAT>
Pretty print the contents of the issues using format <FORMAT> (default:
"%sC%>(8)%i%Creset %t% l%n"). See the "PRETTY FORMATS" section of
git-log(1) for some additional details on how placeholders are used in
......@@ -109,14 +109,14 @@ With no arguments, show a list of open issues.
%%: a literal %
-m, --message=<MESSAGE>
-m, --message <MESSAGE>
The text up to the first blank line in <MESSAGE> is treated as the issue
title, and the rest is used as issue description in Markdown format.
If multiple <MESSAGE> options are given, their values are concatenated as
separate paragraphs.
-F, --file=<FILE>
-F, --file <FILE>
Read the issue title and description from <FILE>.
-e, --edit
......@@ -128,26 +128,26 @@ With no arguments, show a list of open issues.
-c, --copy
Put the URL of the new issue to clipboard instead of printing it.
-M, --milestone=<ID>
-M, --milestone <ID>
Display only issues for a GitHub milestone with id <ID>.
When opening an issue, add this issue to a GitHub milestone with id <ID>.
-l, --labels=<LABELS>
-l, --labels <LABELS>
Display only issues with certain labels.
When opening an issue, add a comma-separated list of labels to this issue.
-d, --since=<DATE>
-d, --since <DATE>
Display only issues updated on or after <DATE> in ISO 8601 format.
-o, --sort=<SORT_KEY>
-o, --sort <KEY>
Sort displayed issues by "created" (default), "updated" or "comments".
-^ --sort-ascending
Sort by ascending dates instead of descending.
-L, --limit=<LIMIT>
-L, --limit <LIMIT>
Display only the first <LIMIT> issues.
--include-pulls
......
......@@ -30,18 +30,18 @@ pr checkout <PR-NUMBER> [<BRANCH>]
## Options:
-s, --state=<STATE>
-s, --state <STATE>
Filter pull requests by <STATE>. Supported values are: "open" (default),
"closed", "merged", or "all".
-h, --head=<BRANCH>
-h, --head <BRANCH>
Show pull requests started from the specified head <BRANCH>. The
"OWNER:BRANCH" format must be used for pull requests from forks.
-b, --base=<BRANCH>
-b, --base <BRANCH>
Show pull requests based off the specified <BRANCH>.
-f, --format=<FORMAT>
-f, --format <FORMAT>
Pretty print the list of pull requests using format <FORMAT> (default:
"%sC%>(8)%i%Creset %t% l%n"). See the "PRETTY FORMATS" section of
git-log(1) for some additional details on how placeholders are used in
......@@ -117,13 +117,13 @@ pr checkout <PR-NUMBER> [<BRANCH>]
%%: a literal %
-o, --sort=<SORT_KEY>
-o, --sort <KEY>
Sort displayed issues by "created" (default), "updated", "popularity", or "long-running".
-^, --sort-ascending
Sort by ascending dates instead of descending.
-L, --limit=<LIMIT>
-L, --limit <LIMIT>
Display only the first <LIMIT> issues.
## See also:
......
......@@ -27,7 +27,7 @@ pull-request -i <ISSUE>
-f, --force
Skip the check for unpushed commits.
-m, --message=<MESSAGE>
-m, --message <MESSAGE>
The text up to the first blank line in <MESSAGE> is treated as the pull
request title, and the rest is used as pull request description in Markdown
format.
......@@ -39,13 +39,13 @@ pull-request -i <ISSUE>
Use the message from the first commit on the branch as pull request title
and description without opening a text editor.
-F, --file=<FILE>
-F, --file <FILE>
Read the pull request title and description from <FILE>.
-e, --edit
Further edit the contents of <FILE> in a text editor before submitting.
-i, --issue=<ISSUE>
-i, --issue <ISSUE>
Convert <ISSUE> (referenced by its number) to a pull request.
You can only convert issues authored by you or that which you have admin
......@@ -62,28 +62,28 @@ pull-request -i <ISSUE>
-p, --push
Push the current branch to <HEAD> before creating the pull request.
-b, --base=<BASE>
-b, --base <BASE>
The base branch in the "[<OWNER>:]<BRANCH>" format. Defaults to the default
branch of the upstream repository (usually "master").
See the "CONVENTIONS" section of hub(1) for more information on how hub
selects the defaults in case of multiple git remotes.
-h, --head=<HEAD>
-h, --head <HEAD>
The head branch in "[<OWNER>:]<BRANCH>" format. Defaults to the currently
checked out branch.
-r, --reviewer=<USERS>
-r, --reviewer <USERS>
A comma-separated list of GitHub handles to request a review from.
-a, --assign=<USERS>
-a, --assign <USERS>
A comma-separated list of GitHub handles to assign to this pull request.
-M, --milestone=<NAME>
-M, --milestone <NAME>
The milestone name to add to this pull request. Passing the milestone number
is deprecated.
-l, --labels=<LABELS>
-l, --labels <LABELS>
Add a comma-separated list of labels to this pull request. Labels will be
created if they do not already exist.
......
......@@ -66,20 +66,20 @@ With '--exclude-prereleases', exclude non-stable releases from the listing.
-p, --prerelease
Create a pre-release.
-a, --attach=<FILE>
-a, --attach <FILE>
Attach a file as an asset for this release.
If <FILE> is in the "<filename>#<text>" format, the text after the '#'
character is taken as asset label.
-m, --message=<MESSAGE>
-m, --message <MESSAGE>
The text up to the first blank line in <MESSAGE> is treated as the release
title, and the rest is used as release description in Markdown format.
If multiple <MESSAGE> options are given, their values are concatenated as
separate paragraphs.
-F, --file=<FILE>
-F, --file <FILE>
Read the release title and description from <FILE>.
-e, --edit
......@@ -91,11 +91,11 @@ With '--exclude-prereleases', exclude non-stable releases from the listing.
-c, --copy
Put the URL of the new release to clipboard instead of printing it.
-t, --commitish=<TARGET>
-t, --commitish <TARGET>
A commit SHA or branch name to attach the release to, only used if <TAG>
does not already exist (default: main branch).
-f, --format=<FORMAT>
-f, --format <FORMAT>
Pretty print releases using <FORMAT> (default: "%T%n"). See the "PRETTY
FORMATS" section of git-log(1) for some additional details on how
placeholders are used in format. The available placeholders for issues are:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册