[quoted lines by Aura Kelloniemi on 2018/03/13 at 13:49 +0200]

>I'm missing a feature which would allow me to define a regular expression
>pattern that would be matched to decide what content on screen is a prompt and
>what is not for NXPROMPT/PRPROMPT commands. This would most likely be
>defined in brltty.conf.

I think you'd discover, very quickly, that it wouldn't work very well because 
you'd only be able to configure it, for all practical purposes, for one command 
environment (presumably your favourite shell). The moment you're within some 
other command environment this approach would become entirely useless.

>Currently I think that when using the above mentioned commands, brltty uses
>whatever there is on the currently displayed line (from the beginning up to
>the first space) as the prompt string which it then compares to beginnings of
>other lines.

Yes, that's correct.

>This approach does not work, if the prompt does not end in a space, or if the
>prompt is constantly changing (e.g. if it displays a line number, time, exit
>status of last process, etc.).

Yes, I understand.

>The default prompt could be set to be something like "^[^ ]+ " to match
>current behaviour, 

That wouldn't match current behaviour at all. In fact, it'd match any line at 
all whose first space isn't in column 1. Current behaviour considers the 
content of the current line in order to know exactly what to match.

>or something more complicated, e.g. "^[^ >]*[ >]".

Maybe your shell prompt looks like that, but, since a shell's prompt is 
configurable, I'm sure it's far from a common case. Would we really want every 
single brltty user to need to understand the complexities and pitfalls of 
regular expressons in order to benefit from the PR/NXPROMPT functionality?

Additionally, do we really want to make it extremely difficult, if not entirely 
impossible, for an average brltty user to benefit from PR/NXPROMPT 
functionality within more than just a single command environment?

-- 
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: d...@mielke.cc | Ottawa, Ontario   | Twitter: @Dave_Mielke
Phone: 1-613-726-0014 | Canada  K2A 1H7   |
_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@brltty.com
For general information, go to: http://brltty.com/mailman/listinfo/brltty

Reply via email to