1. Generate gtags for source code
$ cd $source_folder $ gtags
$ ls G*
GPATH GRTAGS GTAGS
Definitions:
- `GTAGS' definition database
- `GRTAGS' reference database
- `GPATH' path name database
2. lookup a certain FUNCNAME definitions
$ global FUNCNAME --> show up a path/xxx.c which defines FUNCNAME
3. lookup a certain FUNCNAME references
$ global -r FUNCNAME
$ global -rx FUNCNAME --> 'x' option will show details.
4. lookup a pattern PATTERN
$ global -go PATTERN --> search PATTERN in source codes and text files.
$ global -gO PATTERN --> search PATTERN only in text files.
$ global -g1 PATTERN --> search PATTERN in current directory
沒有留言:
張貼留言