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:
9250bd7
)
Made README more concise and added examples
author
adithyasunil26
<adithyasunil26@gmail.com>
Sun, 10 Jan 2021 09:37:24 +0000
(13:37 +0400)
committer
AJ ONeal
<aj@therootcompany.com>
Tue, 19 Jan 2021 08:00:14 +0000
(08:00 +0000)
shfmt/README.md
patch
|
blob
|
history
diff --git
a/shfmt/README.md
b/shfmt/README.md
index 4756e264de61337d08c495dc3255709466b142ab..40eef2d57652cc590ea0cf8f933a45c42b935b02 100644
(file)
--- a/
shfmt/README.md
+++ b/
shfmt/README.md
@@
-17,9
+17,9
@@
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:
+### F
requently used f
lags:
-```
`
txt
+```txt
-version
Show version and exit.
-version
Show version and exit.
@@
-35,42
+35,22
@@
used.
-s
Simplify the code.
-s
Simplify the code.
--mn
- Minify the code to reduce its size (implies -s).
-
--ln <str>
- Language variant to parse (bash/posix/mksh/bats, default "bash").
-
--p
- Shorthand for -ln=posix.
-
--filename <str>
- Provide a name for the standard input file.
-
--i <uint>
- Indent: 0 for tabs (default), >0 for number of spaces.
-
--bn
- Binary ops like && and | may start a line.
-
--ci
- Switch cases will be indented.
+-f
+ Recursively find all shell files and print the paths.
+```
--sr
- Redirect operators will be followed by a space.
+### Examples
--kp
- Keep column alignment paddings.
+To list files being formatted and write directly to file
--fn
- Function opening braces are placed on a separate line.
+```bash
+shfmt -l -w <filepath>
+```
--f
- Recursively find all shell files and print the paths.
+To show differences between shfmt formatting and original file formatting
--tojson
- Print syntax tree to stdout as a typed JSON.
-```
txt
+```bash
+shfmt -d <filepath>
+```
See https://github.com/mvdan/sh for more info.
See https://github.com/mvdan/sh for more info.
-````