diff --git a/main.go b/main.go index b46d0c7..b6b1e1a 100644 --- a/main.go +++ b/main.go @@ -19,13 +19,13 @@ func main() { code := getopt.StringLong("code", 'c', "", "Code to enter") course := getopt.IntLong("course", 'C', -1, "Canvas course number") - list_all := getopt.BoolLong("list-all", 0, "List all courses") - list_favorites := getopt.BoolLong("list-favorites", 0, "List favorite courses") - help := getopt.BoolLong("help", 0, "Help") + list_all := getopt.BoolLong("list-all", 'L', "List all courses") + list_favorites := getopt.BoolLong("list-favorites", 'F', "List favorite courses") + help := getopt.BoolLong("help", 'h', "Help") getopt.Parse() - if *help { + if *help || (*list_all == false && *list_favorites == false && *code == "" && *course == -1) { getopt.Usage() os.Exit(0) }