I am trying to create a tag file manually for C sources (*.c and *.h) using ctags command. Unfortunately the tag file is not having entries of all files, specially the header files.
I am using following command on the command prompt:
find . -name \*.[ch] -exec ctags {} \;
Kindly point out if I am missing some flag or something else above.
If you execute (your version):
then
findexecutesctagsonce for each file that is found. Thetagsfile is overwritten each time, and only the tags for the last file remain.Instead, you need to tell
findto executectagsexactly once, and specify all the matching files in one call. This is how you do that:OR (I like
trojanfoe‘s version from the comment below because it is easier to read):