diff --git a/cmd/zoekt/main.go b/cmd/zoekt/main.go index f513c320..47564efe 100644 --- a/cmd/zoekt/main.go +++ b/cmd/zoekt/main.go @@ -23,6 +23,7 @@ import ( "os" "path/filepath" "runtime/pprof" + "strings" "time" "github.com/felixge/fgprof" @@ -164,7 +165,7 @@ func main() { flag.Usage = func() { name := os.Args[0] fmt.Fprintf(os.Stderr, "Usage:\n\n %s [option] QUERY\n"+ - "for example\n\n %s 'byte file:java -file:test'\n\n", name, name) + "for example\n\n %s byte file:java -file:test\n\n", name, name) flag.PrintDefaults() fmt.Fprintf(os.Stderr, "\n") } @@ -175,7 +176,7 @@ func main() { flag.Usage() os.Exit(2) } - pat := flag.Arg(0) + pat := strings.Join(flag.Args(), " ") if !*verbose { log.SetOutput(io.Discard)