Linux in a Nutshell, Third Edition
by Ellen Siever, Stephen Spainhour, Jessica P. Hekman, Stephen Figgins
Name
etags
Synopsis
etags [options] files
Description
Create a list of function and macro names that are defined in the specified C, Pascal, FORTRAN, yacc, or flex source files. The output list (named tags by default) contains lines of the form:
name file contextwhere name is the function or macro name, file is the source file in which name is defined, and context is a search pattern that shows the line of code containing name. After the list of tags is created, you can invoke Emacs on any file and type:
ESC-x visit-tags-table
You will be prompted for the name of the tag table; the default is TAGS. To switch to the source file associated with the name listed in tagsfile, type:
ESC-x find-tag
You will be prompted for the tag you would like Emacs to search for. ctags produces an equivalent tags file for use with vi.
Options
- -a, --append
Append tag output to existing list of tags.
- -d, --defines
Include tag entries for C preprocessor definitions.
- -i file, --include= file
Add a note to the tags file that file should be consulted in addition to the normal input file.
- -l language, --language= language
Consider the files that follow this option to be written in language. Use the -h option for a list of languages and their default filename extensions.
- -o file, --output= file
Write to file.
- -r regexp, --regex= regexp
Include a tag for each line that matches regexp in the files following this option.
- -C, --c++
Expect .c and .h files to contain C++, not C, code.
- -D, --no-defines
Do not include tag ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access