I have a script ("foo") that gets installed as an executable command on the path.  I can invoke foo on the commandline to get the currently installed version. 
But sometimes I like to run a development version by running path/to/script/home/foo.
Is there a way that I can tell if foo was invoked by calling foo or if it was called using the full path?
 
     
    