Aura Kelloniemi <kaura....@sange.fi> writes:
 > What I would want to have is a Perl-style (or sed-style) regex substitution,
 > where the original string is the current line. Like this:

 > s/^([^ ]+ ).*/\1/

 > Then the result of the substitution is compared to screen contents to find
 > other prompts.

No, even that does not work. It would allow for some extensibility, but would
not work when the prompt itself is changing, like it is doing in IRB.

It should be such that the result of the substitution is treated as a new
regular expression which is matched against other lines on the screen to find
other prompts. (This would require that the back-references are escaped before
substitution, which makes libpcre routines less useful.) And this admittedly
makes the whole feature complex to use, even for intermediate users. But at
least those who have experience doing programming could benefit from it and
the default setting could be tweaked such that it would take into account some
common cases, like irb.

Is there any other way to make NXPROMPT and PRPROMPT more generic?

-- 
Aura
_______________________________________________
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