Skip to content

Commit 5c333a0

Browse files
committed
try some win32 fixes
1 parent f4e26e1 commit 5c333a0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/p6doc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ my class X::P6doc is Exception {
1010

1111
constant DEBUG = %*ENV<P6DOC_DEBUG>;
1212
sub findbin() returns Str {
13-
$*PROGRAM_NAME.subst(rx{<-[/]>+$}, '');
13+
$*PROGRAM_NAME.subst(rx{<-[/\\]>+$}, '');
1414
}
1515

1616
sub tempfile() {
@@ -45,10 +45,10 @@ sub locate-module(Str $modulename) {
4545
}
4646

4747
sub show-docs(Str $path, :$section) {
48-
my $pager = %*ENV<PAGER> // 'less';
48+
my $pager = %*ENV<PAGER> // ($*OS eq 'MSWin32 ?? 'more' !! 'less');
4949
if $section.defined {
5050
%*ENV<PERL6_POD_HEADING> = $section;
51-
my $i = findbin() ~ '../lib';
51+
my $i = findbin() ~ '../lib';
5252
say "launching 'perl6 -I$i --doc=SectionFilter $path | $pager'" if DEBUG;
5353
shell "perl6 -I$i --doc=SectionFilter $path | $pager";
5454
}

0 commit comments

Comments
 (0)