diff --git a/cmd/zoekt-index/main.go b/cmd/zoekt-index/main.go index 458f18c08..4e4ee0216 100644 --- a/cmd/zoekt-index/main.go +++ b/cmd/zoekt-index/main.go @@ -63,6 +63,13 @@ func main() { ignoreDirs := flag.String("ignore_dirs", ".git,.hg,.svn", "comma separated list of directories to ignore.") flag.Parse() + if flag.NArg() == 0 { + fmt.Fprintf(flag.CommandLine.Output(), "USAGE: %s [options] PATHS...\n", filepath.Base(os.Args[0])) + fmt.Fprintln(flag.CommandLine.Output(), "Options:") + flag.PrintDefaults() + os.Exit(1) + } + // Tune GOMAXPROCS to match Linux container CPU quota. _, _ = maxprocs.Set()