Skip Menu |

This queue is for tickets about the IO-Pager CPAN distribution.

Report information
The Basics
Id: 133663
Status: stalled
Priority: 0/
Queue: IO-Pager

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

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



Subject: Windows support?
Hi, just asking: is there any chance that tp will support Windows anytime soon?
On Tue Nov 03 00:40:43 2020, PERLANCAR wrote: Show quoted text
> Hi, just asking: is there any chance that tp will support Windows > anytime soon?
Maybe. It's been on the to-do list since Windows is someplace that would clearly benefit from a decent pager. The problem is that it either requires a major rearchitecting to use Win32::Console, or that the user have ANSI.SYS loaded. The latter would be simpler to implement, but means that it's use requires a bit of configuration from the user, which I was not sure could be replied upon.
On Tue, 3 Nov 2020 12:43:58 GMT, JPIERCE wrote: Show quoted text
> On Tue Nov 03 00:40:43 2020, PERLANCAR wrote:
> > Hi, just asking: is there any chance that tp will support Windows > > anytime soon?
> > Maybe. It's been on the to-do list since Windows is someplace that > would > clearly benefit from a decent pager. The problem is that it either > requires > a major rearchitecting to use Win32::Console, or that the user have > ANSI.SYS > loaded. > > The latter would be simpler to implement, but means that it's use > requires a > bit of configuration from the user, which I was not sure could be > replied upon.
Would Win32::Console::ANSI help?
Subject: Re: [rt.cpan.org #133663] Windows support?
Date: Tue, 03 Nov 2020 07:58:14 -0500
To: bug-IO-Pager [...] rt.cpan.org
From: Jerrad Pierce <belg4mit [...] pthbb.org>
Perhaps, I've had it bookmarked as a possibility, but haven't gotten around to trying it out. I'll see what I can do.
On Tue Nov 03 07:58:23 2020, belg4mit@pthbb.org wrote: Show quoted text
> Perhaps, I've had it bookmarked as a possibility, but haven't gotten around > to trying it out. I'll see what I can do.
2.10 is on its way to mirrors now. tp itself now works on Windows, but IO::Pager::less does not at the moment, nor some of the interactive tests; in some cases they only appear to fail because more.com exits at end of file so it can be hard to tell if content
On Thu, 5 Nov 2020 00:19:03 GMT, JPIERCE wrote: Show quoted text
> On Tue Nov 03 07:58:23 2020, belg4mit@pthbb.org wrote:
> > Perhaps, I've had it bookmarked as a possibility, but haven't gotten > > around > > to trying it out. I'll see what I can do.
> > 2.10 is on its way to mirrors now. > > tp itself now works on Windows, but IO::Pager::less does not at the > moment, nor some of the interactive tests; in some cases they only > appear to fail because more.com exits at end of file so it can be hard > to tell if content
Just tried it. Great! A couple of things: Show quoted text
> tp FILE.TXT
works, but using it in pipeline doesn't work yet: Show quoted text
> dir | tp
No such file or directory at c:\Strawberry\...\bin/tp line 94 ... Also horizontal scrolling (left/right arrow) doesn't work yet. I'm not seeing garbled output as in RT#133662 though.
Subject: Re: [rt.cpan.org #133663] Windows support?
Date: Wed, 04 Nov 2020 19:40:54 -0500
To: bug-IO-Pager [...] rt.cpan.org
From: Jerrad Pierce <belg4mit [...] pthbb.org>
I'm not sure why horizontal scrolling would fail, up and down arrows work. As a workaround you can toggle line folding As for pipes, I think you can replace line 94 of tp with the following and it should hopefully work: open(STDIN, '<', $^O =~ /MSWin/ ? 'CON' : '/dev/tty') or die $!;
On Wed Nov 04 19:41:06 2020, belg4mit@pthbb.org wrote: Show quoted text
> I'm not sure why horizontal scrolling would fail, up and down arrows work. > As a workaround you can toggle line folding > > As for pipes, I think you can replace line 94 of tp with the following and > it should hopefully work: > > open(STDIN, '<', $^O =~ /MSWin/ ? 'CON' : '/dev/tty') or die $!;
That patch would work except for a problem in Term::ReadKey. Piped input on Windows awaits a remedy to this: https://rt.cpan.org/Ticket/Display.html?id=133682