From 53b1bb63acaa93a1c41a22a5c6ac1204b6140aed Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 29 Aug 2021 19:42:10 +0300 Subject: [PATCH] Ticket #4272: nc.ext: fix recognition of plain and compressed man pages. Support various versions of file utility which output is changed from one version to another: $ file --version file-4.26 magic file from /etc/magic:/usr/share/file/magic $ file mc.1 mc.1: ASCII troff or preprocessor input text $ file -z -L mc.1.gz mc.1.gz: ASCII troff or preprocessor input text (gzip compressed data, was "mc.1", last modified: Tue Aug 24 08:17:47 2021, from Unix) $ file --version file-5.40 magic file from /etc/file/magic eccomp support included $ file mc.1 mc.1: troff or preprocessor input, ASCII text $ file -z -L -S mc.1.gz mc.1.gz: troff or preprocessor input, ASCII text (gzip compressed data, was "mc.1", last modified: Wed Aug 18 04:41:29 2021, from Unix) Signed-off-by: Andrew Borodin --- misc/mc.ext.in | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/misc/mc.ext.in b/misc/mc.ext.in index b0286cfe1..e821900b8 100644 --- a/misc/mc.ext.in +++ b/misc/mc.ext.in @@ -373,28 +373,23 @@ shell/.ms View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view nroff.ms %var{PAGER:more} # Manual page - compressed -type/^(ASCII )?troff.*gzip compressed +type/troff.*gzip compressed Open=@EXTHELPERSDIR@/text.sh open man.gz %var{PAGER:more} View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.gz %var{PAGER:more} -type/^(ASCII )?troff.*bzip compressed +type/troff.*bzip compressed Open=@EXTHELPERSDIR@/text.sh open man.bz %var{PAGER:more} View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.bz %var{PAGER:more} -type/^(ASCII )?troff.*bzip2 compressed +type/troff.*bzip2 compressed Open=@EXTHELPERSDIR@/text.sh open man.bz2 %var{PAGER:more} View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.bz2 %var{PAGER:more} # Manual page -type/^(ASCII )?troff +type/troff or preprocessor input Open=@EXTHELPERSDIR@/text.sh open man %var{PAGER:more} View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man %var{PAGER:more} -# Perl pod page -shell/.pod - Open=@EXTHELPERSDIR@/text.sh open pod %var{PAGER:more} - View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view pod %var{PAGER:more} - regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lz$ Open=@EXTHELPERSDIR@/text.sh open man.lz %var{PAGER:more} View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.lz %var{PAGER:more} @@ -415,6 +410,11 @@ regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.zst$ Open=@EXTHELPERSDIR@/text.sh open man.zst %var{PAGER:more} View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.zst %var{PAGER:more} +# Perl pod page +shell/.pod + Open=@EXTHELPERSDIR@/text.sh open pod %var{PAGER:more} + View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view pod %var{PAGER:more} + # CHM shell/i/.chm Open=@EXTHELPERSDIR@/text.sh open chm