sh icon indicating copy to clipboard operation
sh copied to clipboard

A shell parser, formatter, and interpreter with bash support; includes shfmt

Results 129 sh issues
Sort by recently updated
recently updated
newest added

Hi, I'm using `shfmt -f .` to list files I want to format. However, many files aren't found as they don't have a .sh/.bash extension, but are named something like...

Take this piece of shell: ``` $ cat f.sh if true \ ; then echo yes fi $ bash f.sh yes $ shfmt f.sh if true \ ; then echo...

`shfmt` is a great tool, and it would be fantastic if it was more widely adopted. Unfortunately many potential users don't have an easy way to run it: the only...

help wanted

> IsIncomplete reports whether a Parser error could have been avoided with extra input bytes. For example, if an io.EOF was encountered while there was an unclosed quote or parenthesis....

`shfmt --minify` is inserting a backslash `\` and a newline if there’s an assignment following a closing parenthesis `)`. For example: ```sh $ cat example.sh #!/bin/sh case $1 in option)...

See https://lwn.net/Articles/909596/. Quoting below the bits that may require changes in our parser. ``` e. Here-document parsing now handles $'...' and $"..." quoting when reading the here-document body. l. The...

bash

I've never used `go` before, so I this is a naive, but working approach to support `simplify` and `minify` in editorconfig files. I have not looked at adding tests yet,...

I use in some scripts multiple commands in one line, e.g. variables with initial values. ACTION=0; TOCLIP=0; AMON=""; GEOM="" shfmt -d suggests following - is there a way to keep...

With the increase of Windows ARM64 based system, I am requesting the addition of a precompiled binary for ease of distribution.

When a backslash is present inside [here-doc](https://tldp.org/LDP/abs/html/here-docs.html) it is not preserved in the output(input). See the difference with bash below: ``` gosh $ cat test \" test > EOF test...