[BRLTTY] Prompt matching.

Dave Mielke Dave at mielke.cc
Mon Oct 8 21:00:33 EDT 2018


[quoted lines by Aura Kelloniemi on 2018/10/09 at 02:33 +0300]

>To me it feels quite arbitrary from user's point of view. Still I probably
>would not suffer a lot - none of my prompts at the moment contain any commas.

Which is, of course, why I asked. I don't like it either, but it's a trade-off
between eitehr writing a bunch of extra code for (so far) this one special case
or just using existing code. The issue is that a comma is used to separate
multiple values for the same property.

>1. string quoting in brltty.conf

This could be done except for the case of escaping a quote (see below).

>2. somma-escaping on the config file level

This would create confusion since regular expressions do their own escaping.
The mechanism that splits the regular expressions apart mustn't be able to
accidentally interfere with the regular expressions themselves.

>3. escaping commas (and other characters) on regex pattern level - e.g. \u002C
>instead of comma?

This would have the same problem.

>It would be a good idea to implement number three in any case as nowadays
>there are fancy REPLs with fancy prompts - like Idris' prompt which contains
>lambda and pi followed by closing angle bracket.

I'm curious to see some examples of these. Right now my plan is to use POSIX
extended regular expressions. Does what you're referring to require a fancier
syntax?

-- 
I believe the Bible to be the very Word of God: http://Mielke.cc/bible/
Dave Mielke            | 2213 Fox Crescent | WebHome: http://Mielke.cc/
EMail: Dave at Mielke.cc  | Ottawa, Ontario   | Twitter: @Dave_Mielke
Phone: +1 613 726 0014 | Canada  K2A 1H7   |


More information about the BRLTTY mailing list