Skip to content

Commit

Permalink
add remotes shorthand and call help when no args passed
Browse files Browse the repository at this point in the history
  • Loading branch information
a-camarillo committed Apr 9, 2024
1 parent 0de12b5 commit ce0314d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ var rootCmd = &cobra.Command{
"Includes options for viewing remote references.\n" +
"Documentation can be found at https://pkg.go.dev/github.com/a-camarillo/broom.",
Run: func(cmd *cobra.Command, args[]string) {
//TODO add commands lmao
//TODO add commands lmao
if len(args) == 0 {
cmd.Help()
}
},
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var Remotes bool

func init() {
rootCmd.AddCommand(runCmd)
runCmd.Flags().BoolVar(&Remotes,"with-remotes",false,"Additionally show remote branches")
runCmd.Flags().BoolVarP(&Remotes,"with-remotes","w",false,"Additionally show remote branches")
}

var runCmd = &cobra.Command{
Expand Down

0 comments on commit ce0314d

Please sign in to comment.