Skip to content

Commit 84ced52

Browse files
committed
Update cmd docs to match other commands
1 parent 06c06c8 commit 84ced52

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

pkg/cmd/codespace/root.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
package codespace
22

33
import (
4+
"github.com/MakeNowJust/heredoc"
45
"github.com/spf13/cobra"
56
)
67

7-
var version = "DEV" // Replaced in the release build process (by GoReleaser or Homebrew) by the git tag version number.
8-
98
func NewRootCmd(app *App) *cobra.Command {
109
root := &cobra.Command{
1110
Use: "codespace",
1211
SilenceUsage: true, // don't print usage message after each error (see #80)
1312
SilenceErrors: false, // print errors automatically so that main need not
14-
Long: `Unofficial CLI tool to manage GitHub Codespaces.
15-
16-
Running commands requires the GITHUB_TOKEN environment variable to be set to a
17-
token to access the GitHub API with.`,
18-
Version: version,
13+
Short: "List, create, delete and SSH into codespaces",
14+
Long: `Work with GitHub codespaces`,
15+
Example: heredoc.Doc(`
16+
$ gh codespace list
17+
$ gh codespace create
18+
$ gh codespace delete
19+
$ gh codespace ssh
20+
`),
1921
}
2022

2123
root.AddCommand(newCodeCmd(app))

0 commit comments

Comments
 (0)