Hi,
> As you can see sqlite3.c and sqlite3.h files results are mixed-up.
> It would be great if those could be ordered - first all results
> from sqlite3.c are listed and then all sqlite3.h follow (or vice-versa).

Global(1) sorts the output by 1. tag name, 2. file name, 3. line number
in this priority. Since '--result=grep' omits tag name, maybe it looks
unnatural.
If you invoke global(1) with the -x option, it will bring the following
result.

sqlite_int64      371 libglibc/sqlite3.c   typedef SQLITE_INT64_TYPE
sqlite_int64;
sqlite_int64      374 libglibc/sqlite3.c   typedef __int64 sqlite_int64;
sqlite_int64      377 libglibc/sqlite3.c   typedef long long int
sqlite_int64;
sqlite_int64      247 libglibc/sqlite3.h   typedef SQLITE_INT64_TYPE
sqlite_int64;
sqlite_int64      250 libglibc/sqlite3.h   typedef __int64 sqlite_int64;
sqlite_int64      253 libglibc/sqlite3.h   typedef long long int
sqlite_int64;
sqlite_uint64     372 libglibc/sqlite3.c   typedef unsigned
SQLITE_INT64_TYPE sqlite_uint64;
sqlite_uint64     375 libglibc/sqlite3.c   typedef unsigned __int64
sqlite_uint64;
sqlite_uint64     378 libglibc/sqlite3.c   typedef unsigned long long int
sqlite_uint64;
sqlite_uint64     248 libglibc/sqlite3.h   typedef unsigned
SQLITE_INT64_TYPE sqlite_uint64;
sqlite_uint64     251 libglibc/sqlite3.h   typedef unsigned __int64
sqlite_uint64;
sqlite_uint64     254 libglibc/sqlite3.h   typedef unsigned long long int
sqlite_uint64;

> Can I also disable somehow regexp search for definitions and references?
> Being able to do "literal" definition/reference search would be very
valuable.

That's on the head of the TODO list already.
(http://www.gnu.org/software/global/plans.html)

Regards,
Shigio


2015-04-02 21:16 GMT+09:00 Pavel Nedev <[email protected]>:

> Hi again,
>
> While using global recently two questions popped out:
>
> 1 - I didn't know that global reference and definition search is actually
> using regexp. Is that on purpose?
> 2 - Are the global search results supposed to be ordered by file name?
>
> If you do
>
> gtags -c
>
> on global sources and then run
>
> global -d --result=grep int.
>
> then definition search is performed on regular expression "int."
> Here are part of the results, just at the end:
>
> libglibc/sqlite3.c:371:  typedef SQLITE_INT64_TYPE sqlite_int64;
> libglibc/sqlite3.c:374:  typedef __int64 sqlite_int64;
> libglibc/sqlite3.c:377:  typedef long long int sqlite_int64;
> libglibc/sqlite3.h:247:  typedef SQLITE_INT64_TYPE sqlite_int64;
> libglibc/sqlite3.h:250:  typedef __int64 sqlite_int64;
> libglibc/sqlite3.h:253:  typedef long long int sqlite_int64;
> libglibc/sqlite3.c:372:  typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;
> libglibc/sqlite3.c:375:  typedef unsigned __int64 sqlite_uint64;
> libglibc/sqlite3.c:378:  typedef unsigned long long int sqlite_uint64;
> libglibc/sqlite3.h:248:  typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;
> libglibc/sqlite3.h:251:  typedef unsigned __int64 sqlite_uint64;
> libglibc/sqlite3.h:254:  typedef unsigned long long int sqlite_uint64;
>
> As you can see sqlite3.c and sqlite3.h files results are mixed-up. It
> would be great if those could be ordered - first all results from sqlite3.c
> are listed and then all sqlite3.h follow (or vice-versa).
>
> Can I also disable somehow regexp search for definitions and references?
> Being able to do "literal" definition/reference search would be very
> valuable.
>
> Thanks!
>
> Best Regards,
> Pavel
>
> _______________________________________________
> 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

Reply via email to