[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#2072: MANOPT not parsed well?



Package: man
Version: 2.3.10-6

I can't seem to find a way to set MANOPT to change the default pager for
displaying man pages to "less -s".

I want to do this:

  MANOPT='-P "less -s"'

But man apparently doesn't parse the double quotes, and treats the -s as a new
man option. The man page for man hints that embedded spaces should be escaped
with \, so I tried:

  MANOPT="-P less\\ -s"

With this, running man I get:

  sh: less -s: command not found
  man: command exited with status 32512: /bin/gzip -dc
  '/var/catman/cat1/man.1.gz' | { export MAN_PN LESS; MAN_PN='man(1)';
  LESS="$LESS\$-Pm\:\$ix8mPm Manual page $MAN_PN ?ltline %lt?L/%L.:byte
  %bB?s/%s..?e (END):?pB %pB\\%..";  less\ -s; }

Apparently man correctly includes -s as part of the option, but doesn't strip
the \ so it gets passed down into the resulting shell command above. I've
tried many variations on quoting and backslashing, and none seem to give the
desired results. Any ideas, or can this be classified as a bug?

--
Robert Leslie
rob@advantage.org


Reply to: