[BRLTTY] Prompt matching.

Nicolas Pitre nico at fluxnic.net
Mon Oct 8 19:49:09 EDT 2018


On Mon, 8 Oct 2018, Dave Mielke wrote:

> I'm finally having a look at implementing using regular expressions to match
> prompts.
> 
> The easiest way to specify the regular expressions would be to add a blrty.conf
> directive (e.g. prompt-pattern). For historical reasons, doing it this way
> would mean that a pattern wouldn't be able to contain a comma. There are at
> least two cases:
> 
> * The prompt itself contains a comma.
> * A repetition count range within {braces} is needed.
> 
> How unreasonable would such a restriction be?

It could be annoying. Especially for the second case.
What about making the blrty.conf parser recognize quotes? Quoted 
directives should be taken verbatim. So:

# foo's argument is a list of bar and baz
foo bar,baz 

# foo's argument is a literal bar,baz
foo "bar,baz"

# and for the escaped case:
foo " \" "

In the last case, the argument to foo is a space, a quote and another 
space. Such quoting rules are pretty common already.


Nicolas


More information about the BRLTTY mailing list