The first argument selects a command. Each command can have its own FlagSet. ContinueOnError makes Parse return the error instead of exiting the process.
(defargs(seq*command-line-args*))(defcmd(firstargs))(defrest-args(restargs))(casecmd"hello"(let[flags(flag.NewFlagSet"hello"flag.ContinueOnError)name(.Stringflags"name""world""who")](.Parseflags(applygo/append(go/make(go/slice-ofgo/string))rest-args))(println"hello"(go/derefname)))"bye"(println"bye")(println"expected hello or bye"))
No command.
$ glj command-line-subcommands.glj
expected hello or bye
The hello command takes a flag.
$ glj command-line-subcommands.glj hello -name Ada
hello Ada