Overview Version History Q & A Rating & Review
[!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
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.