Re: Feature request: file list

Marcus Harnisch <[email protected]>
Newsgroups gmane.comp.gnu.global.bugs
Message-ID <CAAmKruVPeqTf-qh4=DYmVYSEKgVm11ZmD81PH5BpddZNSo9EUw@mail.gmail.com>
Hi Shigio

That would be a very powerful facility indeed and certainly enable me to
achieve what I intend. Perhaps you could consider passing the skip list
(perhaps any config variables that make sense) from gtags.conf to the hook
by means of environment variables, so users could reference a standard
generator and maintain their skip lists inside a local config file.

Best regards
Marcus

On Tue, Oct 11, 2016 at 12:41 AM, Shigio YAMAGUCHI <[email protected]> wrote:

> Hi,
> I will add new config variable 'gtags_hook' for gtags(1).
>
> gtags_hook (command line)
> Specify a command line which should be executed before the gtags's
> job.  "./" in it always means the project root directory, since
> gtags is always invoked there.
>
> This hook might realize your requirement.
>
> ------------------------------------------------
> [gtags.conf]
> ------------------------------------------------
> :gtags_hook=./gen.sh < spec.in > gtags.files:
>
> ------------------------------------------------
> [gen.sh]
> ------------------------------------------------
> #!/bin/sh
> while read line
> do
> case $line in
> */) line=`echo $line | sed 's!/$!!'` # remove '/'
>                 find $line -type f -print
> ;;
> *) eval "echo $line"
> ;;
> esac
> done
>
> ------------------------------------------------
> [spec.in]
> ------------------------------------------------
> src/lib/test.c
> src/$VAR/test.h
> src/system/
>
> ------------------------------------------------
>
> The contents of the 'gtags.files' will be something like this.
>
> src/lib/test.c
> src/bbbbb/test.h
> src/system/a.c
> src/system/b.h
>
> What do you think?
>
> Regards,
> Shigio
>
>
> 2016-10-10 23:23 GMT+09:00 Marcus Harnisch <[email protected]>:
>
>> Hi Shigio
>>
>> Working on a large, fragmented project, I would like to see two features:
>> 1. The file list requires each record to be a file name. Would it be
>> possible making names ending in ‘/’ start a new search hierarchy
>> (respecting skip rules) etc? That way the list itself wouldn't have to
>> change when updating.
>> 2. Could the file list expand environment variables of the form $VAR and
>> ${VAR}?
>>
>> Best regards
>> Marcus
>>
>>
>> _______________________________________________
>> Bug-global mailing list
>> [email protected]
>> https://lists.gnu.org/mailman/listinfo/bug-global
>>
>>
>
>
> --
> 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.