diff --git a/cmd/jsonnet/cmd.go b/cmd/jsonnet/cmd.go index 913dcc3..88e55ef 100644 --- a/cmd/jsonnet/cmd.go +++ b/cmd/jsonnet/cmd.go @@ -53,33 +53,36 @@ func usage(o io.Writer) { fmt.Fprintln(o, " -s / --max-stack Number of allowed stack frames") fmt.Fprintln(o, " -t / --max-trace Max length of stack trace before cropping") fmt.Fprintln(o, " --version Print version") + fmt.Fprintln(o) fmt.Fprintln(o, "Available options for specifying values of 'external' variables:") - fmt.Fprintln(o, "Provide the value as a string:") + fmt.Fprintln(o, " Provide the value as a string:") fmt.Fprintln(o, " -V / --ext-str [=] If is omitted, get from environment var ") fmt.Fprintln(o, " --ext-str-file = Read the string from the file") - fmt.Fprintln(o, "Provide a value as Jsonnet code:") + fmt.Fprintln(o, " Provide a value as Jsonnet code:") fmt.Fprintln(o, " --ext-code [=] If is omitted, get from environment var ") fmt.Fprintln(o, " --ext-code-file = Read the code from the file") + fmt.Fprintln(o) fmt.Fprintln(o, "Available options for specifying values of 'top-level arguments':") - fmt.Fprintln(o, "Provide the value as a string:") + fmt.Fprintln(o, " Provide the value as a string:") fmt.Fprintln(o, " -A / --tla-str [=] If is omitted, get from environment var ") fmt.Fprintln(o, " --tla-str-file = Read the string from the file") - fmt.Fprintln(o, "Provide a value as Jsonnet code:") + fmt.Fprintln(o, " Provide a value as Jsonnet code:") fmt.Fprintln(o, " --tla-code [=] If is omitted, get from environment var ") fmt.Fprintln(o, " --tla-code-file = Read the code from the file") + fmt.Fprintln(o) fmt.Fprintln(o, "Environment variables:") - fmt.Fprintln(o, "JSONNET_PATH is a colon (semicolon on Windows) separated list of directories added") - fmt.Fprintln(o, "in reverse order before the paths specified by --jpath (i.e. left-most wins)") - fmt.Fprintln(o, "E.g. JSONNET_PATH=a:b jsonnet -J c -J d is equivalent to:") - fmt.Fprintln(o, "JSONNET_PATH=d:c:a:b jsonnet") - fmt.Fprintln(o, "jsonnet -J b -J a -J c -J d") + fmt.Fprintln(o, " JSONNET_PATH is a colon (semicolon on Windows) separated list of directories added") + fmt.Fprintln(o, " in reverse order before the paths specified by --jpath (i.e. left-most wins)") + fmt.Fprintln(o, " E.g. JSONNET_PATH=a:b jsonnet -J c -J d is equivalent to:") + fmt.Fprintln(o, " JSONNET_PATH=d:c:a:b jsonnet") + fmt.Fprintln(o, " jsonnet -J b -J a -J c -J d") fmt.Fprintln(o) fmt.Fprintln(o, "In all cases:") - fmt.Fprintln(o, " can be - (stdin)") - fmt.Fprintln(o, "Multichar options are expanded e.g. -abc becomes -a -b -c.") - fmt.Fprintln(o, "The -- option suppresses option processing for subsequent arguments.") - fmt.Fprintln(o, "Note that since filenames and jsonnet programs can begin with -, it is advised to") - fmt.Fprintln(o, "use -- if the argument is unknown, e.g. jsonnet -- \"$FILENAME\".") + fmt.Fprintln(o, " can be - (stdin)") + fmt.Fprintln(o, " Multichar options are expanded e.g. -abc becomes -a -b -c.") + fmt.Fprintln(o, " The -- option suppresses option processing for subsequent arguments.") + fmt.Fprintln(o, " Note that since filenames and jsonnet programs can begin with -, it is advised to") + fmt.Fprintln(o, " use -- if the argument is unknown, e.g. jsonnet -- \"$FILENAME\".") } func safeStrToInt(str string) (i int) {