From 9b119866dd0e2d5054abd992f4dfbf346ac81b0d Mon Sep 17 00:00:00 2001 From: ratijas Date: Thu, 12 Nov 2020 21:32:17 +0300 Subject: refactor(colored-man-pages): move nroff wrapper and refactor logic in `colored` function (#9437) --- plugins/colored-man-pages/nroff | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 plugins/colored-man-pages/nroff (limited to 'plugins/colored-man-pages/nroff') diff --git a/plugins/colored-man-pages/nroff b/plugins/colored-man-pages/nroff new file mode 100755 index 000000000..4ae155d29 --- /dev/null +++ b/plugins/colored-man-pages/nroff @@ -0,0 +1,12 @@ +#!/bin/sh + +# The whole point of this wrapper is to replace emboldening factor -u0 with +# -u1 under certain circumstances on Solaris. + +if [ "$1,$2,$3" = "-u0,-Tlp,-man" ]; then + shift + exec /usr/bin/nroff -u1 "$@" +else + # Some other invocation of nroff + exec /usr/bin/nroff "$@" +fi -- cgit v1.2.3-70-g09d2