Re: diffman(1)

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

 



Hi Alejandro,

On Mon Nov 25, 2024 at 1:44 PM CET, Alejandro Colomar wrote:
> You may find it useful for development of manual pages.  If so, please
> let me know any feedback you have for it.  I was wondering if I should
> pipe to less -R, just like man(1) does.  For now, having doubts, I kept
> it simple, which would allow wrapping this in fancier scripts that for
> exaple diff an entire repository of manual pages (although that maybe
> calls for running groff(1) and diff(1) directly).

less simply pipes the data through if it's not at the end of a pipeline,
so piping the diff's output to less -R shouldn't complicate use in
scripts in any way (except perhaps for escape sequences if you use
color).

  $ less -R /usr/include/stdio.h | grep -E '^#' | wc -l
  241
  $ sed -E "s/^/$(printf '\033[1m')/; s/\$/$(printf '\033[m')/" \
      /usr/include/stdio.h | less -R | wc -l
  985

~ onf





[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux