Skip to main content

Mdformat plugin to beautify Bash scripts

Project description

Build Status PyPI version

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mdformat_beautysh-1.0.0.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mdformat_beautysh-1.0.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file mdformat_beautysh-1.0.0.tar.gz.

File metadata

  • Download URL: mdformat_beautysh-1.0.0.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for mdformat_beautysh-1.0.0.tar.gz
Algorithm Hash digest
SHA256 10bb22859ffed2a433f2b9b30de4faf7fcdebb9f9d95bd39ecbd437c6a3c686e
MD5 787af995ea6e6fdd2929cfb10bfc909e
BLAKE2b-256 a3e9f2b37a54442a2e59278b486a6e1b83e6ea140e7ba6bce8392ca9e2b99c5e

See more details on using hashes here.

File details

Details for the file mdformat_beautysh-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mdformat_beautysh-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9209b42e87dd94c44615669b613ea6cf704c6fd25b6ace5a9ce1e0452088faf2
MD5 4e76f29d5888057342d9743d91a99933
BLAKE2b-256 d0ace12f4aef06c7db4b6c35cd513c91ce9461b8f61ae954ef6f8c710135d43e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page