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

> > 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.
>
>Oh, sorry, you are absolutely right.
>
>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/

You're helping me prove my point because even that isn't correct. If an expert 
has to work so hard and still get it wrong then I wouldn't want to inflict it 
on a regular user.

> > 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?
>
>No, not at all. This sed-like behaviour would resolve the problem. It does not
>need action from anybody, but allows for great configurability. libpcre
>supports doing this substitution out of the box. libpcre is anyways installed
>on almost all systems. I feel this would not be very difficult to add, and
>being able to use NXPROMPT and PRPROMPT in irb, GHCi, DOSEMU, Debian chroots
>(with their default PS1 settings), etc. would really make my life easier. And
>these are quite common applications.

I completely understand your reason and the convenience. I'm just not convinced 
that it'd actually work all that well as a general facility for the 
inexperienced.

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