Thank you :-)<p>You can also do the following (take out the leading spaces...):<p><pre><code>  mkdir -p ~&#x2F;xcls&#x2F;usr&#x2F;bin
  cat &lt;&lt;EOF &gt; ~&#x2F;xcls&#x2F;usr&#x2F;bin&#x2F;xcrun
  #!&#x2F;bin&#x2F;sh
  if [ &quot;\$1&quot; = &quot;git&quot; ];
  then
     shift 1
     ls &quot;\$@&quot;
     exit \$?
  fi
    
  unset DEVELOPER_DIR
  shift 1
  xcrun &quot;\$@&quot;
  exit \$?
  EOF
  chmod a+x ~&#x2F;xcls&#x2F;usr&#x2F;bin&#x2F;xcrun

</code></pre>
I get the following:<p><pre><code>  630188s-iMac:~ 5K$ mkdir ~&#x2F;testrun
  630188s-iMac:~ 5K$ touch ~&#x2F;testrun&#x2F;testfile
  630188s-iMac:~ 5K$ cd ~&#x2F;testrun
  630188s-iMac:testrun 5K$ DEVELOPER_DIR=~&#x2F;xcls&#x2F; git -l
  total 0
  -rw-r--r--  1 5K  staff  0  8 May 12:03 testfile
</code></pre>
As you can see, no need for sudo. :-)