Hi,
Thank you for the patch and suggestion.
I'd like to separate this issue in two cases.
case1: Files under the specific directory like /usr/include/c++/4.2.1
Should that be written on the configuration file as a rule?
In fact shouldn't that be written on the command line of gtags?
$ gtags --language-force=C++:include --language-force=C++:project/include
--language-force=<language>:<file or directory>
If it is a file, it is considered <language> source file.
If it is a directory, all files under it are considered <language>
source file.
If needed, you can make this option default:
# Making project base gtags.conf
$ echo 'default: GTAGS_OPTIONS=--language-force=C++\:include \
--language-force=C++\:project/include' >gtags.conf
$ gtags # gtags is executed as 'gtags --language-force=...'
case2: Files which have a specific name like 'Makefile'
Since it is considered as a rule, it should be written on the configuration
file, I think. For example, 'Makefile' should be written like:
[gtags.conf]
# A pattern matches only to files.
:langmap=cpp\:([Mm]akefile).mk.mak:
'(<pattern>)' is a syntax of ctags(1)'s langmap. Since I borrowed 'langmap'
from ctags(1), I would like to copy that again.
What do you think?
Regards,
Shigio