Add a clean exit for not providing a keymap to use

This commit is contained in:
lordwelch 2020-03-05 23:56:51 -08:00
parent c2f2d16097
commit d1b2d5623a

View File

@ -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 != "-" {