Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Nice and quick alias' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Nice and quick alias
Authored by: vasi on May 15, '02 10:04:51AM

Here's a tcsh alias so you can use this more easily (this should be on one line):

alias htman '(groff -Thtml -man `man -w \\!* | head -n1` > "/tmp/htman.`echo \\!* | sed -e s/\\W/_/g`.html") >& /dev/null && open "/tmp/htman.`echo \\!* | sed -e s/\\W/_/g`.html"'

Just put this in your .cshrc, and then you'll be able to type "htman ls" or "htman 2 open" and the appropriate manpage will launch in your default browser (well actually whichever browser you set to open .html files).



[ Reply to This | # ]