diff --git a/main.go b/main.go index da94c79..73f3c7b 100644 --- a/main.go +++ b/main.go @@ -30,6 +30,10 @@ func main() { flag.StringVar(&filePath, "f", "-", "The file to read content from. Defaults to stdin") flag.StringVar(&filePath, "file", "-", "The file to read content from. Defaults to stdin") flag.Parse() + if flag.NArg() < 0 { + flag.Usage() + os.Exit(1) + } fmt.Println(keymapPath) if filePath != "-" {