1HTAGS(1) General Commands Manual HTAGS(1)
2
3
4
6 htags - generate a hypertext from a set of source files
7
9 htags [-aDfFghInosTvw][-d dbpath][-m name][-t title][dir]
10
12 Htags generates a hypertext from a set of source files of C, C++, Yacc,
13 Java, PHP and Assembly.
14
15 In advance of using this command, you should execute gtags(1) in the
16 root directory of a source project. Then you can execute htags in the
17 same place. Htags makes a directory named ´HTML´, and puts a hypertext
18 in it. You can start browsing at ´HTML/index.html´.
19
20 Since htags generates a static hypertext as long as neither -D nor -f
21 option is not specified, you can move it anywhere and browse it by any
22 browser without any HTTP server. If you use -D or -f option, you need
23 to use HTTP server. Though any HTTP server is available, htags-
24 server(1) is recommended.
25
26 This command has so many options. If you are new to htags, it is rec‐
27 ommended to use --suggest option. With that option, htags chooses pop‐
28 ular options on your behalf.
29
31 The following options are available:
32
33 -a, --alphabet
34 Make an alphabetical index suitable for a large project.
35
36 --auto-completion[=limit]
37 Enable auto-completion facility for the input form. If limit is
38 specified, number of candidates is limited to the value. Please
39 note this function requires javascript language in your browser.
40
41 --caution
42 Display a caution message on the top page.
43
44 --cflow cflowfile
45 Add a call tree by cflow(1). cflowfile must be posix format. If
46 you use GNU cflow, invoke the command at the project root direc‐
47 tory with the --format=posix option. This option is deprecated;
48 please use --call-tree or --callee-tree instead.
49
50 --call-tree callfile
51 Add a call tree by cflow(1); callfile must be posix format. If
52 you use GNU cflow, invoke the command at the project root direc‐
53 tory with the --format=posix option.
54
55 --callee-tree calleefile
56 Add a callee tree by cflow(1); calleefile must be posix format.
57 If you use GNU cflow, invoke the command at the project root
58 directory with the --format=posix and --reverse options.
59
60 --colorize-warned-line
61 Use color to highlight warned lines.
62
63 --cvsweb url
64 Add a link to cvsweb; url is used as the base of URL. When
65 directory ´CVS´ exists in the root directory of the project, the
66 content of ´CVS/Repository´ is used as the relative path from
67 the base.
68
69 --cvsweb-cvsroot cvsroot
70 Specify cvsroot in cvsweb URL.
71
72 -D, --dynamic
73 Generate a tag list dynamically using CGI program. Though this
74 option decreases both the size and generation time of hypertext,
75 you need to start up HTTP server.
76
77 -d, --dbpath dbpath
78 Specify the directory in which ´GTAGS´ exists. The default is
79 the current directory.
80
81 --disable-grep
82 Disable grep in the search form (-f, --form).
83
84 --disable-idutils
85 Disable idutils in the search form (-f, --form).
86
87 -F, --frame
88 Use frames for the top page.
89
90 -f, --form
91 Add a search form using CGI program. You need to start a HTTP
92 server for it.
93
94 --fixed-guide
95 Put a fixed guide at the bottom of the screen of the browser.
96
97 --full-path
98 Use full path name in the file index. By default, use just the
99 last component of a path.
100
101 -g, --gtags
102 Execute gtags(1) before starting job. The -v, -w and dbpath
103 options are passed to gtags.
104
105 --gtagsconf file
106 Set environment variable GTAGSCONF to file.
107
108 --gtagslabel label
109 Set environment variable GTAGSLABEL to label.
110
111 -h, --func-header[=position]
112 Insert a function header for each function. By default, htags
113 doesn't generate them. You can choose the position using posi‐
114 tion, which allows one of ´before´, ´right´ or ´after´
115 (default).
116
117 --html-header file
118 Insert a header record derived from file into the HTML header of
119 each file.
120
121 -I, --icon
122 Use icons instead of text for some links.
123
124 --insert-footer file
125 Insert custom footer derived from file before </body> tag.
126
127 --insert-header file
128 Insert custom header derived from file after <body> tag.
129
130 --item-order spec
131 Specify the order of the items in the top page. The spec is a
132 string consisting of item signs in order. Each sign means as
133 follows: ´c´: caution; ´s´: search form; ´m´: mains; ´d´: defi‐
134 nitions; ´f´: files; ´t´: call tree. The default is ´csmdf´.
135
136 -m, --main-func name
137 Specify startup function name; the default is ´main´.
138
139 --map-file
140 Generate file ´MAP´.
141
142 -n, --line-number[=columns]
143 Print line numbers. By default, don't print line numbers. The
144 default value of columns is 4.
145
146 --no-order-list
147 Numbers are not given in list form.
148
149 -o, --other
150 Pick up not only source files but also other files for the file
151 index.
152
153 -s, --symbol
154 Make anchors not only for definitions and references but also
155 other symbols.
156
157 --show-position
158 Print the position string per function definition. The string
159 can be interpreted by general editors in UNIX. The default is
160 false.
161
162 --statistics
163 Print statistics information.
164
165 --suggest
166 Htags chooses popular options on behalf of beginners. It is
167 equivalent to -aghInosTxv --show-position --fixed-guide now.
168
169 --suggest2
170 Htags chooses popular options on behalf of beginners. This
171 option enables frame, AJAX and CGI facility in addition to the
172 facilities by the --suggest option. It is equivalent to --sug‐
173 gest -DfF --auto-completion --tree-view=filetree now.
174
175 -T, --table-flist[=rows]
176 Use <table> tag to display the file index. You can optionally
177 specify the number of rows; the default is 5.
178
179 -t, --title title
180 Title of the hypertext. The default is the last component of
181 the path of the current directory.
182
183 --tabs cols
184 Tab stops. The default is 8.
185
186 --table-list
187 Use <table> tag to display the tag list.
188
189 --tree-view[=type]
190 Use treeview for the file index. Please note this function
191 requires javascript language in your browser. Possible values
192 of type are as follows: treeview, filetree, treeview-red, tree‐
193 view-black, treeview-gray, treeview-famfamfam. The default is
194 treeview.
195
196 -v, --verbose
197 Verbose mode.
198
199 -w, --warning
200 Print warning messages.
201
202 dir The directory in which the result of this command is stored.
203 The default is the current directory.
204
206 $ gtags -v
207 $ htags -sanohITvt 'Welcome to XXX source tour!'
208 $ firefox HTML/index.html
209
210 $ htags --suggest2
211 $ htags-server >& log &
212 $ firefox http://127.0.0.1:8000
213
215 ´GTAGS´
216 Tag file for definitions.
217
218 ´GRTAGS´
219 Tag file for references.
220
221 ´GPATH´
222 Tag file for source files.
223
224 ´gtags.conf´, ´$HOME/.globalrc´
225 Configuration data for GNU GLOBAL. See gtags.conf(5).
226
227 ´HTML/FILEMAP´
228 Mapping file for converting file name into the path of the file.
229
230 ´HTML/GTAGSROOT´
231 If this file exists, CGI program ´global.cgi´ sets environment
232 variable GTAGSROOT to the contents of it. If you move directory
233 ´HTML´ from the original place, please make this file.
234
235 ´HTML/.htaccess´
236 Local configuration file for Apache. This file is generated when
237 the -f or -D options are specified.
238
239 ´HTML/index.html´
240 Start-up file.
241
242 ´HTML/MAP´
243 Mapping file for converting tag name into the path of tag list.
244
245 ´HTML/style.css´
246 Style sheet file.
247
248 ´/usr/local/share/gtags/style.css.tmpl´
249 The template of the style sheet file (´HTML/style.css´).
250
252 The following environment variables affect the execution of htags:
253
254 GTAGSCACHE
255 The size of the B-tree cache. The default is 50000000 (bytes).
256
257 GTAGSCONF
258 Configuration file.
259
260 GTAGSLABEL
261 Configuration label. The default is ´default´.
262
263 HTAGS_OPTIONS
264 The value of this variable is inserted in the head of arguments.
265
266 TMPDIR The location used to stored temporary files. The default is
267 ´/tmp´.
268
269 GTAGSFORCECPP
270 If this variable is set, each file whose suffix is ´.h´ is
271 treated as a C++ source file.
272
274 The following configuration variables affect the execution of htags:
275
276 datadir(string)
277 Shared data directory. The default is ´/usr/local/share´ but you
278 can change the value using configure script. Htags looks up
279 template files in the ´gtags´ directory in this data directory.
280
281 include_file_suffixes(comma separated list)
282 Suffixes of include files. The default is:
283 ´h,hh,hxx,hpp,H,inc.php´.
284
285 langmap(comma separated list)
286 Language mapping. Each comma-separated map consists of the lan‐
287 guage name, a colon, and a list of file extensions. Default
288 mapping is:
289 ´c:.c.h,yacc:.y,asm:.s.S,java:.java,cpp:.c++.cc.hh.cpp.cxx.hxx.hpp.C.H,php:.php.php3.phtml´.
290
292 Htags exits with a non-0 value if an error occurred, 0 otherwise.
293
295 htags-server(1), global(1), gtags(1), gtags.conf(5).
296
297 GNU GLOBAL source code tag system
298 (http://www.gnu.org/software/global/).
299
301 Generated hypertext is VERY LARGE. In advance, check the space of your
302 disk.
303
304 PHP support is far from complete.
305
306 The -f and -D options generate CGI programs. If you open the hypertext
307 to the public, please recognize security dangers.
308
309 Htags does not support plug-in parser.
310
312 Shigio YAMAGUCHI, Hideki IWAMOTO and others.
313
315 The htags command appeared in FreeBSD 2.2.2.
316
317
318
319GNU Project June 2013 HTAGS(1)