From: AJ ONeal Date: Sat, 9 Jan 2021 22:10:04 +0000 (+0000) Subject: format updates for shfmt README.md X-Git-Url: https://git.josue.xyz/?a=commitdiff_plain;h=b2df2277d69c73db0550dba7050f188a250b82c2;p=webi-installers%2F.git format updates for shfmt README.md --- diff --git a/shfmt/README.md b/shfmt/README.md index 9b9f2ff..4756e26 100644 --- 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. -# 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 ` -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. -*-l* +-l List files whose formatting differs from shfmt's. -*-w* +-w Write result to file instead of stdout. -*-d* +-d Error with a diff when the formatting differs. -*-s* +-s Simplify the code. -*-mn* +-mn Minify the code to reduce its size (implies -s). -*-ln* +-ln Language variant to parse (bash/posix/mksh/bats, default "bash"). -*-p* +-p Shorthand for -ln=posix. -*-filename* str +-filename Provide a name for the standard input file. -*-i* +-i Indent: 0 for tabs (default), >0 for number of spaces. -*-bn* +-bn Binary ops like && and | may start a line. -*-ci* +-ci Switch cases will be indented. -*-sr* +-sr Redirect operators will be followed by a space. -*-kp* +-kp Keep column alignment paddings. -*-fn* +-fn Function opening braces are placed on a separate line. -*-f* +-f Recursively find all shell files and print the paths. -*-tojson* +-tojson 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. +````