Improve usage string

This clarifies that files to print can be given directly on the command
line.
This commit is contained in:
Thomas Bleher 2018-10-03 23:31:21 +02:00
parent 0b5d00df10
commit fcdf0ea009
1 changed files with 6 additions and 0 deletions

View File

@ -510,10 +510,16 @@ func (p *printer) start_job() {
p.jobs = p.jobs[1:]
}
func myUsage() {
fmt.Printf("Usage: %s [OPTIONS] files-to-print...\n", os.Args[0])
flag.PrintDefaults()
}
func main() {
printer_mac := flag.String("printer_mac", "", "MAC address of printer")
printer_ip := flag.String("printer_ip", CPNP_ADDR, "IP address of printer")
border := flag.Bool("border", false, "Allow white borders, don't crop")
flag.Usage = myUsage
flag.Parse()
p := new_printer()