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.
This commit is contained in:
Johannes Altmanninger 2021-10-29 18:14:22 +02:00
parent d2e2caaae6
commit 068623e1c8

View File

@ -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 `<flag text>` must be
escaped as `\|` or `\\`.
*completions*::
a list of `<text>|<select cmd>|<menu text>` candidates,
except for the first element which follows the