Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for manpage highlighting syntax #50

Open
GoogleCodeExporter opened this issue Apr 19, 2016 · 3 comments
Open

Support for manpage highlighting syntax #50

GoogleCodeExporter opened this issue Apr 19, 2016 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Write a man page and upload it to SVN 
2. Go to the "Source" tab and ether click on "Browse" or "Changes"
3. Find and view the man page
(Please include HTML, not just your source code)


What is the expected output?  What do you see instead?
It would be nice to have color syntax highlighting, instead of everything
being the same color.

What version are you using?  On what browser?
vendion@SE-03:~> man --version
man 2.5.1

My OS is openSUSE 11.0

Browser information:
Konqueror 4.0.4 (KDE 4.0.4 >= 20080505)
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0) Gecko/2008061600
SUSE/3.0-0.2 Firefox/3.0
Konqueror 3.5.9

Please provide any additional information below.
To hopefully make things easier here is a link to the man page for one of
my projects
<a href="http://code.google.com/p/backup-
make things easier here is a link to the man page for one of
my projects
http://code.google.com/p/backup-light/source/browse/trunk/%20backup-http://code.
google.com/p/backup-light/source/browse/trunk/%20backup-light/trunk/backup-light
.1</a>

Original issue reported on code.google.com by vendion on 17 Jul 2008 at 1:36

@GoogleCodeExporter
Copy link
Author

The nroff man page doesn't shed much light, but
http://www.linuxfocus.org/English/November2003/article309.shtml has an informal 
intro
to man page grammar.

Vendion,
What would you like to see highlighted?
I assume nroff macros of the form .FOO and escape sequences like \-.

Are quoted string significant?  What about angle bracket strings like <foo>?

Is there any convention for commenting within a manpage?

Original comment by mikesamuel@gmail.com on 17 Jul 2008 at 4:12

@GoogleCodeExporter
Copy link
Author

The things that would be nice to have highlighted:  I am going off of the Troff
Mandoc syntax Kwrite uses for man pages.
.TH, .SH, .B, .BI Can be one color
.TP A differnt color
Chapers like: NAME, SYNOPSIS, DESCRIPTION so one and so fourth should also be
highlighted.
\- should be once color, this causes the command arugment to be formatted bold 
font.

This is my first man page that I wrote so I can not tell you for certain if 
angle
bracket strings do anything, from what I can tell it is a way of making email
addresses and URL stick out better.  As far as I know there is no way of 
commenting
within a manpage, outside of the Google Code review system.


Quoted strings are not significant, when the man page is displayed the quotes 
are
also shown.

I have a screen shot of what my man page looks like with Troff Mandoc syntax
highlighting so you can see what I am talking about.
http://img233.imageshack.us/img233/6070/manpage1le5.png
http://img144.imageshack.us/img144/1961/manpage2bl6.png
http://img144.imageshack.us/img144/3494/manpage3qt7.png (I blurred out the email
addresses because it is hosted on a public server)

I hope I answered some of your questions here.

Original comment by vendion on 17 Jul 2008 at 1:22

@GoogleCodeExporter
Copy link
Author

Ok.  It looks like the syntax highlighting is, to some degree, dependent on the
particular macro.

Also, it looks like quoted strings are highlighted.  See 'Excludes the directory
called "music"...' in your second screenshot.

But angle-bracketed sections are not highlighted.

Original comment by mikesamuel@gmail.com on 17 Jul 2008 at 7:02

  • Changed state: Accepted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant