Skip to content

Latest commit

 

History

History
138 lines (108 loc) · 2.17 KB

File metadata and controls

138 lines (108 loc) · 2.17 KB
id MDS066
name commands-show-output
status ready
description A fenced code block whose every non-blank line begins with `$ ` and shows no output must drop the prompt.
nature style
category code
maintainability
markdownlint
id name partial default
MD014
commands-show-output
false
true
rumdl
id name partial default
MD014
commands-show-output
false
true
mado
id name partial default
MD014
commands-show-output
false
true
panache
obsidian-linter
gomarklint

MDS066: commands-show-output

A fenced code block whose every non-blank line begins with $ and shows no output must drop the prompt.

Config

Enable (default):

rules:
  commands-show-output: true

Disable:

rules:
  commands-show-output: false

Autofix

mdsmith fix strips the leading $ from every non-blank content line of the offending block. Blank lines pass through unchanged. Only fenced code blocks are inspected; indented blocks are out of scope.

Examples

Good — block shows output

# Title

A block that shows both commands and their output is fine:

```sh
$ ls
foo bar
$ pwd
/home/user
```

Good — no $ prompts

# Title

A block that has no `$ ` prefixes is fine:

```sh
ls
pwd
```

Bad — only commands, no output

# Title

Commands shown with `$` and no output:

```sh
$ ls
$ pwd
```

Meta-Information

  • ID: MDS066
  • Name: commands-show-output
  • Status: ready
  • Default: enabled
  • Fixable: yes
  • Implementation: source
  • Category: code
  • markdownlint: MD014 (commands-show-output)
  • rumdl: MD014 (commands-show-output)
  • mado: MD014 (commands-show-output)