mdformat-shfmt

Mdformat plugin to format shell code blocks


Keywords
mdformat, markdown, commonmark, formatter, bash, shell, shfmt
License
MIT
Install
pip install mdformat-shfmt==0.1.0

Documentation

Build Status PyPI version

mdformat-shfmt

Mdformat plugin to format shell code blocks

Description

mdformat-shfmt is an mdformat plugin that makes mdformat format shell code blocks embedded in Markdown with shfmt. The plugin invokes shfmt in a subprocess so having either shfmt or Docker installed is a requirement.

Installing

  1. Install either shfmt or Docker
  2. Install mdformat-shfmt
    pip install mdformat-shfmt

Usage

mdformat YOUR_MARKDOWN_FILE.md

Limitations

Formatting with Docker is not tested on Windows. If you experience issues on Windows, install shfmt.