Closed ZaxonXP closed 1 year ago
Hello Piotr!
I did this and it got me some highlighting:
perldoc -M Pod::Perldoc::ToANSI perldsc
Here's a list of what I think are all supported formatters: https://metacpan.org/dist/Pod-Perldoc
What this does is that it makes perldoc
add ANSI SGR codes to its output which moar
then renders accordingly.
Does this solve your problem?
Regards /Johan
It is one way to use it. Thanks!
In a meantime I found a workaround:
#!/bin/sh
# file 'pdoc'
tmp=$(mktemp).pl
perldoc $1 > $tmp
moar $tmp
rm $tmp
So moar will open *.pl
files correctly, which is what I wanted. :)
I tried to display Perl documentation using
perldoc perldsc
, but I do not have a Perl code syntax highlighted. On the other hand when usingmoar
with perl script, then the syntax is shown correctly. How to force perldoc output to highlight the code?Regards, Piotr