-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Labels
Description
package main
import (
"fmt"
"os"
docopt "github.com/docopt/docopt-go"
)
func main() {
usage := `cprint
Enhance terminal output without typing ANSI escape patterns
Usage:
cprint [--attr=<attr>] --color=<color> <word>...
cprint --showattrs
cprint --showcolors
Options:
--attr=<attr> Attribute
--color=<color> Desired color
--showattrs Show attributes
--showcolors Show colors`
args, err := docopt.Parse(usage, nil, true, "0.1", false)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
fmt.Println(args)
}
Print statements would indicate that somewhere along the way a parseSeq call attempts to call parseAtom and it fails because the ([ and )] characters are unbalanced in the tokenList. There is an extra ).
If I add a ) char after --showcolors the error goes away.