1
1
mirror of https://github.com/walles/moar.git synced 2024-10-26 21:13:11 +03:00

Print MANROFFOPT in usage message

If set.
This commit is contained in:
Johan Walles 2024-01-19 09:46:03 +01:00
parent 0feb87ee37
commit d391bab3b1

View File

@ -113,6 +113,12 @@ func printUsage(flagSet *flag.FlagSet, colors twin.ColorType) {
printUsageEnvVar("LESS_TERMCAP_us", "man page underline style", colors)
printUsageEnvVar("LESS_TERMCAP_so", "search hits and footer style", colors)
// Requested here: https://github.com/walles/moar/issues/170#issuecomment-1891154661
manroffopt := os.Getenv("MANROFFOPT")
if manroffopt != "" {
fmt.Printf(" MANROFFOPT: %s\n", manroffopt)
}
absMoarPath, err := absLookPath(os.Args[0])
if err == nil {
absPagerValue, err := absLookPath(os.Getenv("PAGER"))