diff --git a/main.go b/main.go index f9ee1b6..572fdef 100644 --- a/main.go +++ b/main.go @@ -3,6 +3,7 @@ package main import ( "context" "os" + "strings" ghrecon "github.com/anotherhadi/gh-recon/gh-recon" "github.com/charmbracelet/log" @@ -10,6 +11,15 @@ import ( flag "github.com/spf13/pflag" ) +func wordSepNormalizeFunc(f *flag.FlagSet, name string) flag.NormalizedName { + from := []string{".", "_"} + to := "-" + for _, sep := range from { + name = strings.ReplaceAll(name, sep, to) + } + return flag.NormalizedName(name) +} + func main() { var username string var token string @@ -59,6 +69,7 @@ func main() { "", "Exclude repos from deep scan (comma-separated list)", ) + flag.CommandLine.SetNormalizeFunc(wordSepNormalizeFunc) flag.Parse() styles := log.DefaultStyles()