浅谈Manpage

在linux中会有man git,则显示相应git的帮助文档,这类帮助文档通过一些tag来书写,本文对其用法进行简要概述

man文件的后缀为1,运行man xx.1即运行该man

 

 

man git -w 查看该help doc的源文件位置

.SH tag

.TH title

\ 取消特殊含义

.B bold

.RS x indent x

.RE end of RS

这一组联用可以多次缩进,

以上就能完成大部分的man page操作

下面给出一个示例

 

2 .TH CVC-MODULE 1 "29 July 2015" "cvc-module 1.0" "CVC Tool Manual"
3 .SH NAME
4 cvc-module \- manage modules of system
5 .SH SYNOPSIS
6 .nf
7 \fBcvc-module\fR [\-\-add]
8 [\-\-update]
9 [\-\-delete]
10 [\-\-show]
11 [\-\-help]
12 .fi
13 .SH DESCRIPTION
14 This \fIcvc-module\fR allows ReleaseManager to manage modules (including
15 add, update, delete modules). Then you can use \fIcvc-ci\fR to checkin
16 files into new modules
17 .SH OPTIONS
18 .PP
19 .B \-\-add
20 .RS 4
21 ReleaseManager can add new modules into system\&.
22
23 .B \-\-module
24 .RS 4
25 Specify module name you want to add\&.
26 .RE

 

posted @ 2015-08-03 16:55  Ray.Yang  阅读(211)  评论(0编辑  收藏  举报