Add man page to assets#263
Add man page to assets#263lhecker merged 6 commits intomicrosoft:mainfrom rhubarb-geek-nz:242-add-man-page
Conversation
assets/edit.1
Outdated
| .SH OPTIONS | ||
| Pass the name of the file to edit. |
There was a problem hiding this comment.
| .SH OPTIONS | |
| Pass the name of the file to edit. | |
| .SH ARGUMENTS | |
| .TP | |
| \fIFILE[:LINE[:COLUMN]]\fP | |
| The file to open, optionally with line and column (e.g., \fBfoo.txt:123:45\fP). | |
| .SH OPTIONS | |
| .TP | |
| \fB\-h\fP, \fB\-\-help\fP | |
| Print the help message. | |
| .TP | |
| \fB\-v\fP, \fB\-\-version\fP | |
| Print the version number. |
There was a problem hiding this comment.
Actually, since #143 it now accepts multiple files, so [FILE[:LINE[:COLUMN]] ...]?
(Not sure how this should be formatted in the man page.)
There was a problem hiding this comment.
@ivanovkirilg The suggested synopsis section above already indicates that edit can accept multiple positional arguments (\fBedit\fP [\fIOPTIONS\fP]... [\fIFILE\fP]...). So I don't think it's necessary to indicate again in the arguments section that edit can take multiple arguments. I think [FILE[:LINE[:COLUMN]] ...] is a bit complicated.
There was a problem hiding this comment.
Right, I missed that, sorry. I noticed it was missing from the quoted main.rs usage message and the ARGUMENTS section was worded in the singular. (I also didn't enjoy typing [FILE[:LINE[:COLUMN]] ...].)
There was a problem hiding this comment.
Thank you folks, I have changed it to
\fBedit\fP [\fIOPTIONS\fP]... [\fIARGUMENTS\fP]...
So we can still include column and line info. Is that simple enough or too non-standard?
Have tested on both MacOSX and Linux.
assets/manpage/edit.1
Outdated
| .SH SEE ALSO | ||
| https://github.com/microsoft/edit | ||
| .SH AUTHOR | ||
| Leonard Hecker |
There was a problem hiding this comment.
I think it'd be unfair to just credit me for all the work. 😅 Perhaps it's better to just remove this line.
I checked man find and above "SEE ALSO" they have a "COPYRIGHT" section. I think we should add the following there:
Copyright (c) Microsoft Corporation.
Licensed under the MIT License.
It's brief and matches the license headers in the source files.
There was a problem hiding this comment.
man-pages(7) — Linux manual page may be helpful for the order of sections.
There was a problem hiding this comment.
I put the copyright before the see also, just like find.
microsoft/edit#263 Use ${RLN} instead of ${LN} (*) Reported by: danfe and arrowd (*)
microsoft/edit#263 Use ${RLN} instead of ${LN} (*) Reported by: danfe and arrowd (*)
In response to microsoft#242 this is a simple starting template for a man page.
In response to #242 this is a simple starting template for a man page.