[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unexpected behaviour of GTAGSLIBPATH
From: |
Mandar Mitra |
Subject: |
Re: Unexpected behaviour of GTAGSLIBPATH |
Date: |
Fri, 28 Feb 2020 08:57:17 +0530 |
Shigio YAMAGUCHI wrote (Fri, Feb 28, 2020 at 07:39:43AM +0900):
> Hello,
> Probably because there are no tag files there.
> Global(1) must always be run in any project.
Ok, thank you. In order to get around the restriction that global must always
be run in a project, I'm using the following hack for now:
/usr/bin/global "$@" 2> /dev/null || (cd $global_home; /usr/bin/global -a "$@")
$global_home is a dummy project with one empty file called dummy.c (a dummy
project with no files at all does not work).
Suggestion: if there are other users like me who expect this behaviour, you
could consider changing the behaviour + documentation of GTAGSLIBPATH from
----- Existing -----
GTAGSLIBPATH
If this variable is set, it is used as the path to search for
library functions. If the given symbol is not found in the
project, global also searches in these paths. Since only
´GTAGS´ is targeted in the retrieval, this variable is ignored
when -r or -s is specified.
---------------------------------------------------------------------------
to
----- Suggested -----
GTAGSLIBPATH
If this variable is set, it is used as the path to search for
library functions. If the given symbol is not found in the CURRENT
project, OR IF GLOBAL IS NOT BEING RUN FROM WITHIN ANY PROJECT,
global also searches in these paths. Since only ´GTAGS´ is
targeted in the retrieval, this variable is ignored when -r or -s
is specified.
---------------------------------------------------------------------------
Thanks again,
-mandar.
> 2020年2月27日(木) 23:50 Mandar Mitra <address@hidden>:
> >
> > I'd be grateful for any suggestions regarding where I may be goofing up
> > below.
> >
> > xps12$ export GTAGSLIBPATH=/home/mandar/ir/smart/src
> > xps12$ echo $GTAGSLIBPATH
> > /home/mandar/ir/smart/src
> > xps12$ global -i textloc
> > h/textloc.h
> > xps12$ pwd
> > /home/mandar/ir/smart/src
> > xps12$ cd
> > xps12$ global -i textloc
> > global: GTAGS not found.
> > xps12$
> >
> > Why can global not find the GTAGS file when I run the last command?
> >
> > Thanks!
>
>
>