// plugins
Shell Plugin
Adapter plugin that formats shell scripts via shuck-formatter.
Formats .sh, .bash, .zsh, .ksh, .mksh, .dash, and .bats files, along with shell dotfiles such as .envrc, .bashrc, .bash_profile, .profile, .zshrc, and .zshenv.
Install and Setup
In your project's directory with a dprint.json file, run:
dprint add kachick/sh
# or install from npm
dprint add npm:@kachick/dprint-plugin-sh
This will update your config file to have an entry for the plugin. Then optionally specify an "sh" property to add configuration:
{
"sh": {
// sh config goes here
},
"plugins": [
"https://plugins.dprint.dev/kachick/sh-x.x.x.wasm"
]
}
Configuration
See Configuration.
Formatting Shell Code Blocks in Markdown
Use the tags option of the Markdown plugin to map a code block's language tag to a file extension this plugin formats:
{
"markdown": {
"tags": {
"sh": "sh",
"bash": "bash",
"zsh": "zsh",
"shell": "sh"
}
}
}