diff --git a/cmd/shfmt/main.go b/cmd/shfmt/main.go index d5e48893..18e5bee9 100644 --- a/cmd/shfmt/main.go +++ b/cmd/shfmt/main.go @@ -136,12 +136,12 @@ directory, all shell scripts found under that directory will be used. -s, --simplify simplify the code -mn, --minify minify the code to reduce its size (implies -s) --apply-ignore always apply EditorConfig ignore rules + --filename str provide a name for the standard input file Parser options: -ln, --language-dialect str bash/posix/mksh/bats, default "auto" -p, --posix shorthand for -ln=posix - --filename str provide a name for the standard input file Printer options: @@ -158,7 +158,9 @@ Utilities: --to-json print syntax tree to stdout as a typed JSON --from-json read syntax tree from stdin as a typed JSON -For more information, see 'man shfmt' and https://github.com/mvdan/sh. +Formatting options can also be read from EditorConfig files; see 'man shfmt' +for a detailed description of the tool's behavior. +For more information and to report bugs, see https://github.com/mvdan/sh. `) } flag.Parse() diff --git a/cmd/shfmt/shfmt.1.scd b/cmd/shfmt/shfmt.1.scd index def8d6e9..c490c138 100644 --- a/cmd/shfmt/shfmt.1.scd +++ b/cmd/shfmt/shfmt.1.scd @@ -54,6 +54,12 @@ predictable. Some aspects of the format can be configured via printer flags. Should be useful to any tools or editors which format stdin or a single file. When printing results to stdout, an ignored file results in no output at all. +*--filename* str + Provide a name for the standard input file. + + Use of this flag is necessary for EditorConfig support to work with stdin, + since EditorConfig files are found relative to the location of a script. + ## Parser flags *-ln*, *--language-dialect* @@ -70,12 +76,6 @@ predictable. Some aspects of the format can be configured via printer flags. *-p*, *--posix* Shorthand for *-ln=posix*. -*--filename* str - Provide a name for the standard input file. - - Use of this flag is necessary for EditorConfig support to work with stdin, - since EditorConfig files are found relative to the location of a script. - ## Printer flags *-i*, *--indent*