[RFC] Variable substitution in gtags.conf

Shigio YAMAGUCHI <[email protected]>
Newsgroups gmane.comp.gnu.global.bugs
Message-ID <CADJmJYq0bhReW3ZCzmvYFoMBKFBm2k7nQ6oyM7_0bLuTcq9iXw@mail.gmail.com>
Hi,
I'm thinking enabling variable substitution in gtags.conf.
It is simillar to sh(1).

'$name' is replaced with the value of variable 'name'.

Example1: Making meaning clear

[gtags.conf]
+-------------------------------------------
|default:tc=definitions:tc=main\
|definitions:\
| fgcolor=32:\
| bgcolor=44:
|main:\
| :GREP_COLOR='${fgcolor};${bgcolor};4':

$ gtags --conf=fgcolor
32
$ gtags --conf=bgcolor
44
$ gtags --conf=GREP_COLOR
'32;44;4'

Example2: Removal of repeats of same definition

[gtags.conf]
+-------------------------------------------
|default:library=/usr/local/lib/gtags/exuberant-ctags.la:\
|       :gtags_parser=C\:$library:\
|       :gtags_parser=C++\:$library:

$ gtags --conf=gtags_parser
C:/usr/local/lib/gtags/exuberant-ctags.la,C++:/usr/local/lib/gtags/
exuberant-ctags.la

Is it useful?
Is there any problem?

Regards,
Shigio


-- 
Shigio YAMAGUCHI <[email protected]>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

_______________________________________________
Bug-global mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-global
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.