// plugins

Shuck Plugin

Wrapper 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.

See also the shfmt plugin, which formats exactly like the shfmt CLI.

Install and Setup

In your project's directory with a dprint.json file, run:

dprint add shuck

This will update your config file to have an entry for the plugin. Then optionally specify a "shuck" property to add configuration:

{
  "shuck": {
    // shuck config goes here
  },
  "plugins": [
    "npm:@dprint/shuck@x.x.x"
  ]
}

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"
    }
  }
}

Source

See https://github.com/dprint/dprint-plugin-shuck