> As I have given --from-here argument, it should be showing only the definition
> from the same file (as the function is declared static).
>
> Expected result:
> src/my-source.c
Sorry but --from-here is not such option. Normally it is not used on the command line.
I am sorry that the description of the online manual is inadequate.
> Alternatly, if it is hard to track the return type of functions, the result
> can be sorted that the first item shown is from the same file (when there is a
> match).
>
> Ie, The result then would be:
> src/my-source.c
> src/my-first-source.c
Rather, --nearness option has a close meaning to your suggestion.
The --nearness option displays tags closer to the current position first.
However, at present, only directory can be specified as an argument.
Present specification: --nearness=<directory>
How about changing the spec to accept a file as an argument of it?
New specification: --nearness=<file or directory>
If a file is specified, global gives it the highest priority.
Does this meet your requirements?