Mdformat plugin to beautify Bash scripts
Low maintenance activity. Last release 13 months ago, commits in 0 of the last 26 weeks. Weaker on commit activity and recent releases.
pip install mdformat-beautyshmdformat-beautysh
Mdformat plugin to beautify Bash scripts
Description
mdformat-beautysh is an mdformat plugin
that makes mdformat format Bash scripts with Beautysh.
Fenced code blocks labeled as either sh or bash are formatted.
Usage
Install with:
pip install mdformat-beautysh
When using mdformat on the command line, Beautysh formatting will be automatically enabled after install.
When using mdformat Python API, code formatting for Bash scripts will have to be enabled explicitly:
import mdformat
unformatted = """```bash
function bad_func()
{
echo "test"
}
```
"""
formatted = mdformat.text(unformatted, codeformatters={"bash", "sh"})
assert formatted == """```bash
function bad_func()
{
echo "test"
}
```
"""