bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] Variable substitution in gtags.conf


From: Shigio YAMAGUCHI
Subject: Re: [RFC] Variable substitution in gtags.conf
Date: Tue, 1 Dec 2015 07:06:44 +0900

Hi,
>  In thre current implementation, "gtags --config=name" expands  variables,
> but "gtags --config" does not.
> Is this an intention?

Yes, it is.

gtags --config
        Only 'tc=name' is estimated.
gtags --config=xxx
        'tc=name' and variable referece is estimated.

I think it is practical, because 'gtags --config' is handy length, and
is possible to change the variables.

Regards,
Shigio

2015-11-30 22:52 GMT+09:00 Hideki IWAMOTO <address@hidden>:
Hi. Yamaguchi san.

 In thre current implementation, "gtags --config=name" expands  variables, but "gtags --config" does not.
Is this an intention?

$ gtags --config=gtags_parser
fortran:/home/iwamoto/global/lib/gtags/exuberant-ctags.la,pascal:/home/iwamoto/global/lib/gtags/exuberant-ctags.la,c#:/home/iwamoto/global/lib/gtags/exuberant-ctags.la,lisp:/home/iwamoto/global/lib/gtags/exuberant-ctags.la,scheme:/home/iwamoto/global/lib/gtags/exuberant-ctags.la,awk:/home/iwamoto/global/lib/gtags/exuberant-ctags.la,ruby:/home/iwamoto/global/lib/gtags/exuberant-ctags.la,perl:/home/iwamoto/global/lib/gtags/exuberant-ctags.la,python:/home/iwamoto/global/lib/gtags/exuberant-ctags.la,vim:/home/iwamoto/global/lib/gtags/exuberant-ctags.la,sh:/home/iwamoto/global/lib/gtags/exuberant-ctags.la

$ gtags --config
:skip=HTML/,HTML.pub/,tags,TAGS,ID,y.tab.c,y.tab.h,gtags.files,cscope.files,cscope.out,cscope.po.out,cscope.in.out,SCCS/,RCS/,CVS/,CVSROOT/,{arch}/,autom4te.cache/,*.orig,*.rej,*.bak,*~,#*#,*.swp,*.tmp,*_flymake.*,*_flymake:langmap=c\:.c.h,yacc\:.y,asm\:.s.S,java\:.java,cpp\:.c++.cc.hh.cpp.cxx.hxx.hpp.C.H,php\:.php.php3.phtml:langmap=fortran\:.f.for.f77.f90.f95,pascal\:.p.pas,c#\:.cs,lisp\:.l.el.lisp,scheme\:.scm:langmap=awk\:.awk,ruby\:.rb,perl\:.pl,python\:.py,vim\:.vim,sh\:.sh:ctagslib=$libdir/gtags/exuberant-ctags.la:gtags_parser=fortran\:$ctagslib:gtags_parser=pascal\:$ctagslib:gtags_parser=c#\:$ctagslib:gtags_parser=lisp\:$ctagslib:gtags_parser=scheme\:$ctagslib:gtags_parser=awk\:$ctagslib:gtags_parser=ruby\:$ctagslib:gtags_parser=perl\:$ctagslib:gtags_parser=python\:$ctagslib:gtags_parser=vim\:$ctagslib:gtags_parser=sh\:$ctagslib:HTAGS_OPTIONS=-aDfFIos --line-number=5 --table-list --disable-idutils --colorize-warned-line --no-order-list:



On Mon, 23 Nov 2015 15:39:19 +0900
Shigio YAMAGUCHI <address@hidden> wrote:

> 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 <address@hidden>
> PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

--
岩本 秀樹 <address@hidden>




--
Shigio YAMAGUCHI <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

reply via email to

[Prev in Thread] Current Thread [Next in Thread]