Skip to content

commands-show-output

Markdownstyleno fixdefault: offmarkdown/markdownlint

Reports a fenced code block in which every non-blank line starts with $ , so it shows commands without their output. A block that has any line without the prompt, such as an output line, is not reported.

A reader who selects and copies the block gets the $ with each command, and the shell then fails on the first character. Blocks that mix commands and output need the prompt to tell them apart, which is why they are left alone.

To fix, delete the $ prompts, or show the output below the commands.

Reported
```sh
$ npm install
$ npm test

…

</div>
## Configuration
```yaml
markdown:
lint:
rules:
commands-show-output: warn # off (default), warn, error

Enabled by the presets: markdown/markdownlint.

Suppress one line with sudsy-disable-next-line commands-show-output in a comment of the file’s language.

The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.

Tool Rule Match What differs
markdownlint MD014 partial Reported once on the block, markdownlint reports every command line (so no parity fixture); indented code blocks are not checked.