Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
monolinie
ml
6 changes: 6 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cmd
import (
"fmt"
"os"
"path/filepath"

"github.com/spf13/cobra"
)
Expand All @@ -14,6 +15,11 @@ var rootCmd = &cobra.Command{
}

func Execute() {
// Allow invoking as "ml" (short alias) or "monolinie"
if name := filepath.Base(os.Args[0]); name == "ml" {
rootCmd.Use = "ml"
}

if err := rootCmd.Execute(); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
Expand Down