Skip to content

Commit

Permalink
chore: tweak commands
Browse files Browse the repository at this point in the history
  • Loading branch information
j178 committed Feb 20, 2023
1 parent ac2fc69 commit 1971b91
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Available Commands:
contest Generate contest questions
cache Manage local questions cache
config Show configurations
open open one or multiple questions in browser
open Open one or multiple question pages in a browser
help Help about any command
Flags:
Expand Down
2 changes: 1 addition & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Available Commands:
contest Generate contest questions
cache Manage local questions cache
config Show configurations
open open one or multiple questions in browser
open Open one or multiple question pages in a browser
help Help about any command
Flags:
Expand Down
11 changes: 4 additions & 7 deletions cmd/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@ var gitCmd = &cobra.Command{
}

var gitPushCmd = &cobra.Command{
Use: "push [qid]",
Short: "Add, commit and push your code to remote repository",
Args: cobra.MaximumNArgs(1),
Use: "push qid",
Short: "Add, commit and push your solution to remote repository",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
c := leetcode.NewClient()
qid := "today"
if len(args) > 0 {
qid = args[0]
}
qid := args[0]
qs, err := leetcode.ParseQID(qid, c)
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions cmd/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (

var openCmd = &cobra.Command{
Use: "open qid",
Short: "open one or multiple questions in browser",
Short: "Open one or multiple question pages in a browser",
Example: `leetgo open today
leetgo open 549
leetgo open two-sum`,
leetgo open w330/`,
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
cred := leetcode.CredentialsFromConfig()
Expand Down

0 comments on commit 1971b91

Please sign in to comment.