Hi, <br><br>This isn&#39;t actually a problem with racket, but just a helpful tip for OS X user who want to use the racket system commands for exectables they have installed themselves. (I found it looking at the documentation for an OS X GIT tool)<br>
<br>My problem was I couldn&#39;t get (system command) to call newly installed executables. <br> - adding it to the $PATH doesn&#39;t work for OSX (I believe it does work for windows, though I don&#39;t know the situation on linux?)<br>
<br>The attached script adds the path /usr/local/fossil/bin to the ~/.MacOSX/environment.plist,  making the executables in that folder available to DrRacket, as demonstrated by the keybinding.rkt user-defined-keybindings file attached as a demonstration/test.<br clear="all">
<br>User defined keybindings are a excellent way to extend DrRacket, and this little tip should help any OS X users who want to use them with their own tools. (git?)<br><br>Cheers,<br><br>Stephen<br><br><br>-- <br><br>#!/bin/sh<br>
<br>append_path () {<br>  input=&quot;$1&quot;<br>  value=&quot;$2&quot;<br>  if ! echo $input | /usr/bin/egrep -q &quot;(^|:)$value($|:)&quot; ; then<br>     if [ &quot;$3&quot; = &quot;after&quot; ] ; then<br>        echo $input:$value<br>
     else<br>        echo $value:$input<br>     fi<br>  else<br>    echo $input<br>  fi<br>}<br><br>append_plist_var() {<br>  name=&quot;$1&quot;<br>  append_value=&quot;$2&quot;<br>  default_value=&quot;$3&quot;<br>  current_value=&quot;`defaults read $HOME/.MacOSX/environment ${name}`&quot;<br>
  [ ! &quot;$current_value&quot; ] &amp;&amp; current_value=&quot;$default_value&quot;<br>  new_value=&quot;`append_path &quot;$current_value&quot; &quot;$append_value&quot; after`&quot;<br>  defaults write $HOME/.MacOSX/environment &quot;$name&quot; &quot;$new_value&quot;<br>
  if [ &quot;$current_value&quot; == &quot;$new_value&quot; ]; then<br>    echo &quot;No change to $name in ~/.MacOSX/environment.plist&quot;<br>  else<br>    echo &quot;Variable $name in ~/.MacOSX/environment.plist changed from &#39;$current_value&#39; to &#39;$new_value&#39;&quot;<br>
  fi<br>}<br><br>append_plist_var PATH &quot;/usr/local/fossil/bin&quot; &quot;/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin&quot;<br><br>pushd &quot;$HOME&quot;<br><br>popd<br><br>