Shigio YAMAGUCHI wrote (Fri, Feb 28, 2020 at 03:46:43PM +0900):
> > /usr/bin/global "$@" 2> /dev/null || (cd $global_home; /usr/bin/global -a 
> > "$@")
> 
> If your target is GTAGSLIBPATH, how about a more direct approach which
> does not require dummy project such as:
> 
> [libsearch]
> -------------------------------------------------------------------
> #!/bin/sh
> for d in `echo "$GTAGSLIBPATH" | sed -e 's/^:/.:/' -e 's/:$/:./' \
>         -e 's/::/:.:/' -e 's/:/ /g'`
> do
>         (cd $d && global -a "$@")
> done
> -------------------------------------------------------------------

:-) :-) unimportant bug in the above: if I have k directories on GTAGSLIBPATH, 
one match will get printed k times, I think?


> That word was missing. I will fix it.
> Thank you!

👍 

Maybe also consider at some later point of time the suggestion that 
GTAGSLIBPATH could be consulted if global is not being run from within any 
project.

Thanks for your help with this, and thanks for a great tool!
-mandar

Reply via email to