monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Please review nvm.man-page


From: Thomas Moschny
Subject: Re: [Monotone-devel] Please review nvm.man-page
Date: Mon, 23 Aug 2010 12:18:11 +0200

Stephen Leake <address@hidden>:
> This almost works (from bash under Emacs), but it loses all the
> headers:
> 
> function get_man_page_formatter_command()
>    local term_width = guess_terminal_width() - 2
>    local path = "c:/bin"
>    -- On MinGW, 'popen' runs 'cmd.exe' with the inherited path; run
> Cygwin bash from there return string.format("bash -c nroff -man
> -rLL=%dn | less -R", term_width) end

Problem is that you need to pass exactly one argument to the -c option,
so quoting is to be used:

return string.format(
  "bash -c 'nroff -man -rLL=%dn' | less -R", term_width)

works, at least under Linux. Otherwise, the -man and -r options are
consumed by bash, not nroff.

But then, me wonders where 'path' is used?

- Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]