Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hukkin/mdformat-shfmt
Mdformat plugin to format shell code blocks
https://github.com/hukkin/mdformat-shfmt
bash markdown mdformat shfmt
Last synced: about 1 month ago
JSON representation
Mdformat plugin to format shell code blocks
- Host: GitHub
- URL: https://github.com/hukkin/mdformat-shfmt
- Owner: hukkin
- License: mit
- Created: 2021-01-25T18:06:24.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-23T11:39:30.000Z (over 2 years ago)
- Last Synced: 2024-09-14T09:59:24.592Z (2 months ago)
- Topics: bash, markdown, mdformat, shfmt
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 15
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://github.com/hukkinj1/mdformat-shfmt/workflows/Tests/badge.svg?branch=master)]()
[![PyPI version]()]()# mdformat-shfmt
> Mdformat plugin to format shell code blocks## Description
mdformat-shfmt is an [mdformat](https://github.com/executablebooks/mdformat) plugin
that makes mdformat format shell code blocks embedded in Markdown with [shfmt](https://github.com/mvdan/sh).
The plugin invokes shfmt in a subprocess so having either shfmt or Docker installed is a requirement.## Installing
1. Install either [shfmt](https://github.com/mvdan/sh#shfmt) or [Docker](https://docs.docker.com/get-docker/)
1. Install mdformat-shfmt
```bash
pip install mdformat-shfmt
```## Usage
```bash
mdformat YOUR_MARKDOWN_FILE.md
```## Limitations
The Docker fallback is only tested on Linux.
If you experience issues with it on Windows or macOS, please install shfmt.