From 33f319cf6ae051d0634536475dcd9b7fcd974b9d Mon Sep 17 00:00:00 2001 From: David Anson Date: Sun, 14 Aug 2022 01:17:13 +0000 Subject: [PATCH] Add example of terminating variadic argument list with "--" to README.md (fixes #312). --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index baf5d1ff..28f35bf9 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,9 @@ Or run using [Docker](https://www.docker.com) and [GitHub Packages](https://gith docker run -v $PWD:/workdir ghcr.io/igorshubovych/markdownlint-cli:latest "*.md" ``` +> **Note** +> Because `--enable` and `--disable` are [variadic arguments that accept multiple values][commander-variadic], it is necessary to end the list by passing `--` before the `` argument like so: `markdownlint --disable MD013 -- README.md`. + ### Globbing `markdownlint-cli` supports advanced globbing patterns like `**/*.md` ([more information][globprimer]). @@ -149,6 +152,7 @@ MIT © Igor Shubovych [actions-badge]: https://github.com/igorshubovych/markdownlint-cli/workflows/CI/badge.svg?branch=master [actions-url]: https://github.com/igorshubovych/markdownlint-cli/actions?query=workflow%3ACI +[commander-variadic]: https://github.com/tj/commander.js#variadic-option [markdownlint]: https://github.com/DavidAnson/markdownlint [markdownlint-jsonc]: https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.jsonc [markdownlint-yaml]: https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml