9 // Log is used for debugging purposes
10 // since complete is running on tab completion, it is nice to
11 // have logs to the stderr (when writing your own completer)
12 // to write logs, set the COMP_DEBUG environment variable and
13 // use complete.Log in the complete program
16 func getLogger() func(format string, args ...interface{}) {
17 var logfile = ioutil.Discard
18 if os.Getenv(envDebug) != "" {
21 return log.New(logfile, "complete ", log.Flags()).Printf