Skip Menu |

This queue is for tickets about the PerlIO-via-EscStatus CPAN distribution.

Report information
The Basics
Id: 43742
Status: resolved
Priority: 0/
Queue: PerlIO-via-EscStatus

People
Owner: Nobody in particular
Requestors: GAISSMAI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Feature Request, no bug!
Hi Kevin, thanks a lot for your Regexp::Common::ANSIescape. I use it for network device automation. The HP Procurve switches send a lot of ANSIescapes and you have no chance to stop it on the CLI. Therefore I use your module for filtering off this line noise. But even worse, the HP Procurves also uses a lot of the private ANSI escape sequences, not yet handled in your module. Question: Could you please add the often used (in VT100 compatible terminals) CSI ? ... (DEC Private Mode Set (DECSET)) patterns as an additional switch in your Regexp pattern? Best Regards Charly
CC: bug-PerlIO-via-EscStatus [...] rt.cpan.org
Subject: Re: [rt.cpan.org #43742] Feature Request, no bug!
Date: Mon, 02 Mar 2009 09:39:26 +1100
To: GAISSMAI [...] cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
"Karl Gaissmaier via RT" <bug-PerlIO-via-EscStatus@rt.cpan.org> writes: Show quoted text
> > thanks a lot for your Regexp::Common::ANSIescape. I use it for network > device automation.
Glad you like it. (Incidentally, it's only bundled with my EscStatus stuff because I wasn't sure it'd have a wider audience :-) Show quoted text
> Question: Could you please add the often used (in VT100 compatible > terminals) > CSI ? ... (DEC Private Mode Set (DECSET))
Yep, I think that's feasible. In fact my reading of the ANSI/ECMA would be that all I should do is allow < = > ? characters in the parameter part ... whereas now I've just got "[0-9;]" (in the pattern() func). Spec 5.4.1(b) says when it starts with a ? the parameters are private and unspecified, but I'm guessing they're still only chars 0x30 to 0x3F. Does that sound right to you? I see there's other DEC vt escapes which are not CSI style. Are you suffering under some of them too? I'm not sure I want to visit the obscure features of every terminal type in the world! :-)
On So. 01. Mär. 2009, 17:41:05, user42@zip.com.au wrote: Show quoted text
> "Karl Gaissmaier via RT" <bug-PerlIO-via-EscStatus@rt.cpan.org> writes:
> > > > thanks a lot for your Regexp::Common::ANSIescape. I use it for network > > device automation.
> > Glad you like it. (Incidentally, it's only bundled with my EscStatus > stuff because I wasn't sure it'd have a wider audience :-)
It has, sure. A lot of people need regexes for ANSI escape sequences. Show quoted text
>
> > Question: Could you please add the often used (in VT100 compatible > > terminals) > > CSI ? ... (DEC Private Mode Set (DECSET))
> > Yep, I think that's feasible. In fact my reading of the ANSI/ECMA would > be that all I should do is allow < = > ? characters in the parameter > part ... whereas now I've just got "[0-9;]" (in the pattern() func). > > Spec 5.4.1(b) says when it starts with a ? the parameters are private > and unspecified, but I'm guessing they're still only chars 0x30 to 0x3F. > Does that sound right to you?
Uups, I'm really no ANSI or VT expert, I'm a network fuzzy and perl programmer. Show quoted text
> > I see there's other DEC vt escapes which are not CSI style. Are you > suffering under some of them too?
No, I'm not suffering of them, but the question is how you mark them in your Regexp::Common namespace right. If you find a well known subset you can spend a proper name, but if you only support an unspecified subset, how will you name this? Show quoted text
> ... I'm not sure I want to visit the > obscure features of every terminal type in the world! :-)
Yep, that's clear ;-) Best Regards and many thanks for your time and effort Charly
CC: bug-PerlIO-via-EscStatus [...] rt.cpan.org
Subject: Re: [rt.cpan.org #43742] Feature Request, no bug!
Date: Tue, 03 Mar 2009 08:33:14 +1100
To: GAISSMAI [...] cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
"Karl Gaissmaier via RT" <bug-PerlIO-via-EscStatus@rt.cpan.org> writes: Show quoted text
> > Uups, I'm really no ANSI or VT expert, I'm a network fuzzy and > perl programmer.
:-) I uploaded a version 4 which may do the trick. Missing the "private parameter" chars was a bug really. The string width calculation where I use the regexps certainly should match and ignore such forms, including the DEC ones. Show quoted text
> No, I'm not suffering of them, but the question is how you mark > them in your Regexp::Common namespace right.
I suppose, but mainly I wondered if ansi-only is enough for what you want. There's nothing to stop anyone crunching out non-ansi forms separately of course. I'll leave that to others to worry about, and what it might be called or whatnot.
Believe fixed in version 4 now uploaded.