etags(1)

NAME

etags, gnuctags - generate tag file for Emacs, vi

SYNOPSIS

etags [-aCDGImRVh] [-i file] [-l language]
[-o tagfile] [-r regexp] [--parse-stdin=file]
[--append] [--no-defines] [--no-globals] [--include=file]
[--ignore-indentation] [--language=language] [--members]
[--output=tagfile] [--regex=regexp] [--no-regex] [--help]
[--version] file ...
gnuctags [-aCdgImRVh] [-BtTuvwx] [-l language]
[-o tagfile] [-r regexp] [--parse-stdin=file]
[--append] [--backward-search] [--cxref] [--defines]
[--forward-search] [--globals] [--ignore-indentation]
[--language=language] [--members] [--output=tagfile]
[--regex=regexp] [--typedefs] [--typedefs-and-c++]
[--update] [--no-warn] [--help] [--version] file ...

DESCRIPTION

The etags program is used to create a tag table file, in a
format understood by emacs(1); the gnuctags program is used to create a similar table in a format understood by
vi(1). Both forms of the program understand the syntax of
C, Objective C, C++, Java, Fortran, Ada, Cobol, Erlang,
HTML, LaTeX, Emacs Lisp/Common Lisp, makefiles, Pascal,
Perl, PHP, Postscript, Python, Prolog, Scheme and most as
sembler-like syntaxes. Both forms read the files speci
fied on the command line, and write a tag table (defaults:
TAGS for etags, tags for gnuctags) in the current working directory. Files specified with relative file names will
be recorded in the tag table with file names relative to
the directory where the tag table resides. Files speci
fied with absolute file names will be recorded with abso
lute file names. Files generated from a source file--like
a C file generated from a source Cweb file--will be
recorded with the name of the source file. The programs
recognize the language used in an input file based on its
file name and contents. The --language switch can be used to force parsing of the file names following the switch
according to the given language, overriding guesses based
on filename extensions.

OPTIONS

Some options make sense only for the vi style tag files
produced by gnuctags; etags does not recognize them. The
programs accept unambiguous abbreviations for long option
names.

Array_(ATTRIBUTE_|ENTITY_|FUNCTION_|PACKAGE_( BODY_)?_ _|PROCEDURE_|PROCESS_|TYPE_)[ _t]+_([^ _t(]+_)/_3/' Tag TCL files (this last example shows the usage of
a tagregexp):
--lang=none --regex='/proc[ _t]+_([^ _t]+_)/_1/'

A regexp can be preceded by {lang}, thus restrict
ing it to match lines of files of the specified
language. Use etags --help to obtain a list of the recognised languages. This feature is particularly
useful inside regex files. A regex file contains one regex per line. Empty lines, and those lines
beginning with space or tab are ignored. Lines be
ginning with @ are references to regex files whose
name follows the @ sign. Other lines are consid
ered regular expressions like those following
--regex.
For example, the command
etags --regex=@regex.file *.c reads the regexes contained in the file regex.file.
-R, --no-regex
Don't do any more regexp matching on the following
files. May be freely intermixed with filenames and
the --regex option.
-t, --typedefs
Record typedefs in C code as tags. Since this is
the default behavior of etags, only gnuctags ac cepts this option.
-T, --typedefs-and-c++
Generate tag entries for typedefs, struct, enum,
and union tags, and C++ member functions. Since
this is the default behavior of etags, only gnuc tags accepts this option.
-u, --update
Update tag entries for files specified on command
line, leaving tag entries for other files in place.
Currently, this is implemented by deleting the ex
isting entries for the given files and then rewrit
ing the new entries at the end of the tags file.
It is often faster to simply rebuild the entire tag
file than to use this. Only gnuctags accepts this option.
-v, --vgrind
Instead of generating a tag file, write index (in
vgrind format) to standard output. Only gnuctags accepts this option.
-w, --no-warn
Suppress warning messages about duplicate entries.
The etags program does not check for duplicate en
tries, so this option is not allowed with it.
-x, --cxref
Instead of generating a tag file, write a cross
reference (in cxref format) to standard output.
Only gnuctags accepts this option.
-h, -H, --help
Print usage information.
-V, --version
Print the current version of the program (same as
the version of the emacs etags is shipped with).

SEE ALSO

`emacs' entry in info; GNU Emacs Manual, Richard Stallman. ctags(1), cxref(1), emacs(1), gnuctags(1), vgrind(1), vi(1).

COPYING

Copyright (c) 1999, 2001 Free Software Foundation, Inc.

Permission is granted to make and distribute verbatim
copies of this document provided the copyright notice and
this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified ver
sions of this document under the conditions for verbatim
copying, provided that the entire resulting derived work
is distributed under the terms of a permission notice
identical to this one.

Permission is granted to copy and distribute translations
of this document into another language, under the above
conditions for modified versions, except that this permis
sion notice may be stated in a translation approved by the
Free Software Foundation.
Copyright © 2010-2025 Platon Technologies, s.r.o.           Index | Man stránky | tLDP | Dokumenty | Utilitky | O projekte
Design by styleshout