From 6126fd6d9db21c644754282029d0e1f7f44aa0d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Sun, 10 Mar 2019 21:23:57 +0000 Subject: [PATCH] README: add v2 and v3 install instructions In preparation for joining the master.v3 branch back into master. --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e85886354..30f5ad3c1 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,14 @@ For high-level operations like performing shell expansions on strings, see the ### shfmt - go get -u mvdan.cc/sh/v3/cmd/shfmt +Go 1.11 and later can download the latest v2 stable release: + + cd $(mktemp -d); go mod init tmp; go get mvdan.cc/sh/cmd/shfmt + +The latest v3 pre-release can be downloaded in a similar manner, using the `/v3` +module: + + cd $(mktemp -d); go mod init tmp; go get mvdan.cc/sh/v3/cmd/shfmt `shfmt` formats shell programs. It can use tabs or any number of spaces to indent. See [canonical.sh](syntax/canonical.sh) for a quick look at its default