Overview Version History Q & A Rating & Review
Zero-dependency shell script formatter for VSCode, powered by a WASM build of mvdan/sh (via sh-syntax ).
Why this fork exists. The popular foxundermoon.shell-format extension stopped working in v7.2.8 ([issue #396 ]bug ) and the author has been unresponsive for months. This extension drops the shfmt binary download entirely and runs the same formatter in-process as WebAssembly — no binary download, no permission prompts, no broken installs .
Install
From VSCode: search Shell Format (WASM) in the Extensions view, or:
code --install-extension MufanQiu.shell-format-wasm
Supported file types
language
extension
description
shellscript
.sh .bash
shell scripts
dockerfile
Dockerfile
Dockerfiles
ignore
.gitignore .dockerignore
ignore files
properties
.properties
Java properties files
jvmoptions
.vmoptions jvm.options
JVM options
hosts
/etc/hosts
hosts file
bats
.bats
Bats test files
Usage
shift+option+f (macOS) / shift+alt+f (Win/Linux), or
shift+cmd+p → Format Document
If VSCode asks which formatter to use, pick Shell Format (WASM) and click Configure Default .
Configuration
setting
type
default
description
shellformat.flag
string
null
Formatter flags, shfmt-compatible. E.g. -p -bn -ci -i 2. See shfmt flags .
shellformat.effectLanguages
array
all supported
Which languages this extension should format.
shellformat.useEditorConfig
boolean
false
Read formatting options from .editorconfig.
Supported flags (mapped to sh-syntax printer options):
flag
effect
-p
POSIX mode
-ln=<variant>
Language variant: bash, posix/sh, mksh, bats
-i=<n>
Indent width (0 = tabs)
-bn
Binary operators on next line
-ci
Indent switch cases
-sr
Space after redirects
-kp
Keep column-aligned padding
-fn
Function { on next line
-mn
Minify
Differences vs. upstream
foxundermoon.shell-format
MufanQiu.shell-format-wasm
shfmt binary
downloads from GitHub releases on activation
not needed , WASM in-process
Works on first install
broken in 7.2.8 due to missing one_ini_bg.wasm
✓
Windows ARM64
no binary released upstream
✓
shellformat.path
points at external shfmt binary
removed (no longer relevant)
Flags / EditorConfig
✓
✓
Credits
License
MIT. See LICENSE .