Skip to content

Commit

Permalink
fix: cli
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktop committed Sep 4, 2023
1 parent 3b46190 commit 50c8fde
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cmd/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
var defaultCmd = &cobra.Command{
Use: "default",
Short: "Organize by default Apple app categories",
Args: cobra.MaximumNArgs(1),
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {

if Verbose {
Expand Down
2 changes: 1 addition & 1 deletion cmd/revert.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
var revertCmd = &cobra.Command{
Use: "revert",
Short: "Revert to launchpad settings backup",
Args: cobra.MaximumNArgs(1),
Args: cobra.NoArgs,
SilenceUsage: true,
SilenceErrors: true,
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
8 changes: 5 additions & 3 deletions cmd/save.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ import (

// saveCmd represents the save command
var saveCmd = &cobra.Command{
Use: "save",
Short: "Save current launchpad settings",
Args: cobra.MaximumNArgs(1),
Use: "save",
Short: "Save current launchpad settings",
Args: cobra.NoArgs,
SilenceUsage: true,
SilenceErrors: true,
RunE: func(cmd *cobra.Command, args []string) error {

if Verbose {
Expand Down
9 changes: 6 additions & 3 deletions cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ import (

// versionCmd represents the version command
var versionCmd = &cobra.Command{
Use: "version",
Aliases: []string{"v"},
Short: "Print the version number of lporg",
Use: "version",
Aliases: []string{"v"},
Short: "Print the version number of lporg",
Args: cobra.NoArgs,
SilenceUsage: true,
SilenceErrors: true,
Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("Version: %s, BuildTime: %s\n", strings.TrimSpace(AppVersion), strings.TrimSpace(AppBuildTime))
},
Expand Down

0 comments on commit 50c8fde

Please sign in to comment.