projects
/
webi-installers
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
49498cc
)
format updates for shfmt README.md
author
AJ ONeal
<aj@therootcompany.com>
Sat, 9 Jan 2021 22:10:04 +0000
(22:10 +0000)
committer
AJ ONeal
<aj@therootcompany.com>
Sat, 9 Jan 2021 22:10:04 +0000
(22:10 +0000)
shfmt/README.md
patch
|
blob
|
history
diff --git
a/shfmt/README.md
b/shfmt/README.md
index 9b9f2ff9e7275681100792862a34f82e8a859f84..4756e264de61337d08c495dc3255709466b142ab 100644
(file)
--- a/
shfmt/README.md
+++ b/
shfmt/README.md
@@
-7,65
+7,70
@@
tagline: |
To update or switch versions, run `webi shfmt@stable` or `webi shfmt@beta`, etc.
To update or switch versions, run `webi shfmt@stable` or `webi shfmt@beta`, etc.
-# Cheat Sheet
+#
#
Cheat Sheet
-> shfmt is a shell parser, formatter and interpretter that supports POSIX Shell, Bash and mksh.
+> shfmt is a shell parser, formatter and interpretter that supports POSIX Shell,
+> Bash and mksh.
Usage: `shfmt <flags> <filepath>`
Usage: `shfmt <flags> <filepath>`
-Note: If given path is directory, all shell scripts in the directory will be used.
+Note: If given path is directory, all shell scripts in the directory will be
+used.
-## Flags:
+##
#
Flags:
-*-version*
+````txt
+-version
Show version and exit.
Show version and exit.
-*-l*
+-l
List files whose formatting differs from shfmt's.
List files whose formatting differs from shfmt's.
-*-w*
+-w
Write result to file instead of stdout.
Write result to file instead of stdout.
-*-d*
+-d
Error with a diff when the formatting differs.
Error with a diff when the formatting differs.
-*-s*
+-s
Simplify the code.
Simplify the code.
-*-mn*
+-mn
Minify the code to reduce its size (implies -s).
Minify the code to reduce its size (implies -s).
-
*-ln*
<str>
+
-ln
<str>
Language variant to parse (bash/posix/mksh/bats, default "bash").
Language variant to parse (bash/posix/mksh/bats, default "bash").
-*-p*
+-p
Shorthand for -ln=posix.
Shorthand for -ln=posix.
-*-filename* str
+-filename <str>
Provide a name for the standard input file.
Provide a name for the standard input file.
-
*-i*
<uint>
+
-i
<uint>
Indent: 0 for tabs (default), >0 for number of spaces.
Indent: 0 for tabs (default), >0 for number of spaces.
-*-bn*
+-bn
Binary ops like && and | may start a line.
Binary ops like && and | may start a line.
-*-ci*
+-ci
Switch cases will be indented.
Switch cases will be indented.
-*-sr*
+-sr
Redirect operators will be followed by a space.
Redirect operators will be followed by a space.
-*-kp*
+-kp
Keep column alignment paddings.
Keep column alignment paddings.
-*-fn*
+-fn
Function opening braces are placed on a separate line.
Function opening braces are placed on a separate line.
-*-f*
+-f
Recursively find all shell files and print the paths.
Recursively find all shell files and print the paths.
-*-tojson*
+-tojson
Print syntax tree to stdout as a typed JSON.
Print syntax tree to stdout as a typed JSON.
+```txt
-See https://github.com/mvdan/sh for more info.
\ No newline at end of file
+See https://github.com/mvdan/sh for more info.
+````