Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Shell-like Formatter SecureNew to Visual Studio Code? Get it now.
Shell-like Formatter Secure

Shell-like Formatter Secure

vs-shell-format

|
3 installs
| (0) | Free
Revision of shell-format: A formatter for shell-like scripts, Dockerfile, gitignore, dotenv, /etc/hosts, jvmoptions, and other file types
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Shell-like Formatter For VS Code

Visual Studio Marketplace Version Downloads Installs Rating

[!Note]

This is a fork of foxundermoon/vs-shell-format.

Since the original package is no longer maintained, I just try to fork this package, fix this issue and re-publish new package to marketplace.

See https://github.com/foxundermoon/vs-shell-format/issues/396.

Supported file types or languages

language extension description
shellscript .sh .bash, bash dotfiles, PKGBUILD, APKBUILD, *.ebuild, *.eclass shell script files
dockerfile Dockerfile, Dockerfile.*, *.dockerfile dockerfile
dotenv .env .env.* env dotenv files
ignore .gitignore .dockerignore ignore files
properties .properties (also spring-boot-properties) java properties files
jvmoptions .vmoptions , jvm.options jvm options file
hosts hosts hosts file
azcli .azcli Azure CLI script files
bats .bats Bats test file
zsh .zsh .zshrc .zshenv .zprofile .zlogin .zlogout zsh script files
mksh .mksh .mkshrc mksh script files
dash .dash dash / posix shell

screenshot

Usage

shift+alt+f (Windows/Linux) or shift+option+f (Mac)

ctrl+shift+p (Windows/Linux) or command+shift+p (Mac), then type Format Document

Dependencies

  • shfmt — downloaded automatically on first use (pinned version in src/config.ts, checksum-verified). Set shellformat.path only to use your own binary instead.
  • dockerfmt

Custom configuration

  • shellformat.path the shfmt fullpath example [mac,linux]: /usr/local/bin/shfmt [windows]: C:\bin\shfmt.exe. User setting only.
  • shellformat.flag shfmt -h to see detailed usage. User setting only. Ignored when shellformat.useEditorConfig is on. Do not use -w.
  • shellformat.effectLanguages the languages the formatter runs on. Default is all supported languages.
  • shellformat.useEditorConfig use .editorconfig for shfmt flags instead of shellformat.flag. Supported keys: indent_style, indent_size, shell_variant, binary_next_line, switch_case_indent, space_redirects, keep_padding, function_next_line.

Contributors of the original project

Code Contributors

This project exists thanks to all the people who contribute.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft