Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
github
hub
提交
ca320f40
H
hub
项目概览
github
/
hub
大约 1 年 前同步成功
通知
3
Star
22523
Fork
2406
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hub
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
ca320f40
编写于
12月 19, 2018
作者:
M
Mislav Marohnić
提交者:
GitHub
12月 19, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1971 from github/cli-long-form
Clarify long-form CLI options
上级
68210c84
b54179a6
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
52 addition
and
51 deletion
+52
-51
commands/browse.go
commands/browse.go
+4
-4
commands/ci_status.go
commands/ci_status.go
+1
-1
commands/compare.go
commands/compare.go
+3
-3
commands/create.go
commands/create.go
+3
-3
commands/issue.go
commands/issue.go
+14
-14
commands/pr.go
commands/pr.go
+11
-11
commands/pull_request.go
commands/pull_request.go
+11
-10
commands/release.go
commands/release.go
+5
-5
未找到文件。
commands/browse.go
浏览文件 @
ca320f40
...
...
@@ -15,10 +15,10 @@ var cmdBrowse = &Command{
Long
:
`Open a GitHub repository in a web browser.
## Options:
-u
-u
, --url
Print the URL instead of opening it.
-c
-c
, --copy
Put the URL in clipboard instead of opening it.
[<USER>/]<REPOSITORY>
...
...
@@ -52,8 +52,8 @@ var (
)
func
init
()
{
cmdBrowse
.
Flag
.
BoolVarP
(
&
flagBrowseURLPrint
,
"url
-only
"
,
"u"
,
false
,
"URL"
)
cmdBrowse
.
Flag
.
BoolVarP
(
&
flagBrowseURLCopy
,
"copy
-only
"
,
"c"
,
false
,
"COPY"
)
cmdBrowse
.
Flag
.
BoolVarP
(
&
flagBrowseURLPrint
,
"url"
,
"u"
,
false
,
"URL"
)
cmdBrowse
.
Flag
.
BoolVarP
(
&
flagBrowseURLCopy
,
"copy"
,
"c"
,
false
,
"COPY"
)
CmdRunner
.
Use
(
cmdBrowse
)
}
...
...
commands/ci_status.go
浏览文件 @
ca320f40
...
...
@@ -16,7 +16,7 @@ var cmdCiStatus = &Command{
Long
:
`Display status of GitHub checks for a commit.
## Options:
-v
-v
, --verbose
Print detailed report of all status checks and their URLs.
<COMMIT>
...
...
commands/compare.go
浏览文件 @
ca320f40
...
...
@@ -16,13 +16,13 @@ var cmdCompare = &Command{
Long
:
`Open a GitHub compare page in a web browser.
## Options:
-u
-u
, --url
Print the URL instead of opening it.
-c, --copy
Put the URL to clipboard instead of opening it.
-b
<BASE>
-b
, --base=
<BASE>
Base branch to compare.
[<START>...]<END>
...
...
@@ -56,7 +56,7 @@ var (
func
init
()
{
cmdCompare
.
Flag
.
BoolVarP
(
&
flagCompareCopy
,
"copy"
,
"c"
,
false
,
"COPY"
)
cmdCompare
.
Flag
.
BoolVarP
(
&
flagCompareURLOnly
,
"url
-only
"
,
"u"
,
false
,
"URL only"
)
cmdCompare
.
Flag
.
BoolVarP
(
&
flagCompareURLOnly
,
"url"
,
"u"
,
false
,
"URL only"
)
cmdCompare
.
Flag
.
StringVarP
(
&
flagCompareBase
,
"base"
,
"b"
,
""
,
"BASE"
)
CmdRunner
.
Use
(
cmdCompare
)
...
...
commands/create.go
浏览文件 @
ca320f40
...
...
@@ -17,13 +17,13 @@ var cmdCreate = &Command{
Long
:
`Create a new repository on GitHub and add a git remote for it.
## Options:
-p
-p
, --private
Create a private repository.
-d
<DESCRIPTION>
-d
, --description=
<DESCRIPTION>
Use this text as the description of the GitHub repository.
-h
<HOMEPAGE>
-h
, --homepage=
<HOMEPAGE>
Use this text as the URL of the GitHub repository.
-o, --browse
...
...
commands/issue.go
浏览文件 @
ca320f40
...
...
@@ -38,25 +38,25 @@ With no arguments, show a list of open issues.
List the labels available in this repository.
## Options:
-a, --assignee
<ASSIGNEE>
-a, --assignee
=
<ASSIGNEE>
Display only issues assigned to <ASSIGNEE>.
When opening an issue, this can be a comma-separated list of people to
assign to the new 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
the
git-log
manual
for some additional details on how placeholders are used in
"%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
format. The available placeholders for issues are:
%I: issue number
...
...
@@ -105,14 +105,14 @@ With no arguments, show a list of open issues.
%uI: updated date, ISO 8601 format
-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
...
...
@@ -124,26 +124,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
=
<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
...
...
commands/pr.go
浏览文件 @
ca320f40
...
...
@@ -30,21 +30,21 @@ 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
[<OWNER>:]
<BRANCH>
Show pull requests started from the specified head <BRANCH>. The
default
value for <OWNER> is taken from the current repository
.
-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>
Show pull requests based o
n
the specified <BRANCH>.
-b, --base
=
<BRANCH>
Show pull requests based o
ff
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
the
git-log
manual
for some additional details on how placeholders are used in
"%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
format. The available placeholders are:
%I: pull request number
...
...
@@ -113,13 +113,13 @@ pr checkout <PR-NUMBER> [<BRANCH>]
%mI: merged date, ISO 8601 format
-o, --sort
<SORT_KEY>
-o, --sort
=
<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:
...
...
commands/pull_request.go
浏览文件 @
ca320f40
...
...
@@ -28,7 +28,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.
...
...
@@ -40,14 +40,15 @@ 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>, <ISSUE-URL>
(Deprecated) Convert <ISSUE> to a pull request.
-i, --issue=<ISSUE>
(Deprecated) Convert an issue to a pull request. <ISSUE> may be an issue
number or a URL.
-o, --browse
Open the new pull request in a web browser.
...
...
@@ -58,24 +59,24 @@ 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 "[OWNER:]BRANCH" format. Defaults to the default branch
(usually "master").
-h, --head
<HEAD>
-h, --head
=
<HEAD>
The head branch in "[OWNER:]BRANCH" format. Defaults to the current 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 don't already exist.
...
...
commands/release.go
浏览文件 @
ca320f40
...
...
@@ -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>
doesn't 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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录