mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-05-16 21:56:33 +00:00
Stacked on the modifications PR. Now that no live code path references
the per-package fetchers, the shared HTTP/parsing helpers, the
in-process normalizer, or the example template, delete them. Pure
deletion — no behavior change.
- ~93 per-package <pkg>/releases.js fetcher modules.
- _common/{brew,fetcher,git-tag,gitea,github,github-source,
githubish,githubish-source}.js shared HTTP/parsing helpers.
- _webi/normalize.js in-process normalization layer (cache files
arrive normalized from webicached).
- _example/releases.js fetcher template for new packages.
The Go cache daemon (webicached) is now the sole producer of release
metadata; the Node process never makes an upstream request.
title, homepage, tagline
| title | homepage | tagline |
|---|---|---|
| shfmt | https://github.com/mvdan/sh | shfmt: Format shell programs |
To update or switch versions, run webi shfmt@stable or webi shfmt@beta, etc.
Files
These are the files / directories that are created and/or modified with this install:
~/.config/envman/PATH.env
~/.local/opt/shfmt/
~/.local/bin/shfmt
Cheat Sheet
shfmt is a shell parser, formatter and interpretter that supports POSIX Shell, Bash and mksh.
Usage: shfmt <flags> <filepath>
Note: If given path is directory, all shell scripts in the directory will be used.
Frequently used flags:
-version
Show version and exit.
-l
List files whose formatting differs from shfmt's.
-w
Write result to file instead of stdout.
-d
Error with a diff when the formatting differs.
-s
Simplify the code.
-f
Recursively find all shell files and print the paths.
Examples
To list files being formatted and write directly to file
shfmt -l -w <filepath>
To show differences between shfmt formatting and original file formatting
shfmt -d <filepath>
See https://github.com/mvdan/sh for more info.