From: p DOT dalgaard AT biostat DOT ku DOT dk (Peter Dalgaard BSA) Subject: Re: What's the best (easiest) way to view man pages? 31 Jan 1998 15:30:53 -0800 Message-ID: References: <001c01bd2e14$da720110$b2e2e3d0 AT caliban DOT teamparadigm DOT com> Mime-Version: 1.0 Content-Type: Text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit To: "Tim Fisher" Cc: "Tim Fisher" writes: > (it's almost impossible to read them that way). The groff package was > supposed to contain a man implementation, but alas there was none. > Suggestions? > > I would think man would be a high priority for CygWin. Emacs and vi be > damned--we already have more text editors than we can handle under Win32. We > need a man page viewer. These are not in the same league... "man" is trivial to do, but perhaps someone should take the time and put a version in a visible place? I'm getting a bit rusty on cygwin these days, mainly just listening in on the conversations, but once upon a time I rolled up a simple shell script doing essentially groff | less with the relevant options stuffed in. It's somewhere in the mailing list archives, but I can't locate it right now. So was this more elaborate one, due to "Charles S. Bowman" : Quote>> #! /bin/sh # Filename : man # Author : Steve Bowman # Created : 970323N # Modified : 970724R # crude - the following are known bugs/omissions: # doesn't handle multiple arguments (use shift) # doesn't break search when file found # doesn't check extension match # doesn't handle pager environment # doesn't handle flag to alter search path without resetting # MANPATH # assumes groff and less are in PATH if [ $# -eq 0 ]; then echo "Usage: man " exit 1 fi if [ x$MANPATH = x ]; then MANPATH=/usr/man:/usr/gnuwin32/b18/man fi for i in `echo $MANPATH | sed s/:/\ /g`; do if [ -d $i ]; then cd $i if [ -f man?/$1.1 ]; then if [ $? -eq 0 ]; then groff -man -Tascii -Wall man?/$1.? | less fi fi fi done exit 0 --- cut --- And finally, to launch it I put a function in /etc/profile: man () { sh /usr/bin/man $@; } Since that version of bash wouldn't recognize /usr/bin/man as executable. I don't know if that's still a problem or not. <