Skip to content

Commit

Permalink
update list/copy cobra short docs to reflect clip default commands
Browse files Browse the repository at this point in the history
By default, when run without any subcommands or args, `clip` will
execute the `list` command, and when run with 1 arg, `clip` will execute
the `copy` command.

This behavior is already documented in the README, but this should help
make it more obvious to the user how things work when running `clip
help`/`clip --help`.
  • Loading branch information
tjhop committed Apr 29, 2019
1 parent 2ff9eed commit 643e2ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
var copyCmd = &cobra.Command{
Use: "copy <Clip template>",
Aliases: []string{"load", "in"},
Short: "Copy a Clip template to your clipboard",
Short: "Copy a Clip template to your clipboard (default if just running `clip $arg`)",
Long: `Copy a Clip template to your clipboard`,
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Example:
clip list
clip list --tags-only
clip list --tags personal,work`,
Short: "List available Clip templates/tags",
Short: "List available Clip templates/tags (default if just running `clip`)",
Run: func(cmd *cobra.Command, args []string) {
list()
},
Expand Down

0 comments on commit 643e2ed

Please sign in to comment.