From 068623e1c8f864e595b2ee0a9d9948b57ac00e5c Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Fri, 29 Oct 2021 18:14:22 +0200 Subject: [PATCH] doc options: state that all |-separated tuples need escaping For the "completions" option type, the documentation states that | and \ need to be escaped as \| and \\. The same parser is for other option types that are lists-of-tuples: range-specs and line-specs, so they need escaping too. Document that. Only their last element can contain arbitrary data, so range-specs and line-specs could work without escaping if we tweaked the parser. --- doc/pages/options.asciidoc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/pages/options.asciidoc b/doc/pages/options.asciidoc index 4457abc5..f4032141 100644 --- a/doc/pages/options.asciidoc +++ b/doc/pages/options.asciidoc @@ -114,7 +114,7 @@ are exclusively available to built-in options. is empty, but still valid. * _string_ is an arbitrary string which is associated with - the range. + the range. Any `|` or `\` characters must be escaped as `\|` or `\\`. All numeric fields are 1-based. @@ -138,6 +138,9 @@ are exclusively available to built-in options. `set -add` appends the new specs to the list. + `set -remove` removes the given specs from the list. + + Any `|` or `\` characters that occur within `` must be + escaped as `\|` or `\\`. + *completions*:: a list of `|