Launching app dirs from the shell

An easy way to launch App Dirs from your shell without patching the shell.

This only works with httpzsh
Add to your /.zshrc:

  alias rehash="rehash; . ~/bin/"
  [ "$DISPLAY" ] && . ~/bin/

Create this /bin/

  if [ -f $APPDIR_CACHE ]; then
    cat $APPDIR_CACHE | while read item; do hash $item; done

And this /bin/update-appdir-cache:

  echo Updating AppDir cache... >/dev/stderr
  echo -n > $APPDIR_CACHE
  find /ROX-Apps ~/Apps -name AppRun | while read app; do
    echo "$(basename $(dirname $app))=$app" >> $APPDIR_CACHE

Make sure to change /ROX-Apps to where your appdirs live, like /usr/local/apps
Then make this script executable:

  chmod +x ~/bin/update-appdir-cache

And put it in your Auto Start folder:

ln -sf ~/bin/update-appdir-cache ~/Choices/ROX-Session/AutoStart/

Can shells such as bash be made application directory aware?

You can use httpthis patch to add support to bash.