Launching app dirs from the shell
An easy way to launch App Dirs from your shell without patching the shell.
This only works with zsh
Add to your /.zshrc:
alias rehash="rehash; . ~/bin/load-appdir-cache.sh" [ "$DISPLAY" ] && . ~/bin/load-appdir-cache.sh
Create this /bin/load-appdir-cache.sh:
APPDIR_CACHE=${HOME}/.appdir_cache if [ -f $APPDIR_CACHE ]; then cat $APPDIR_CACHE | while read item; do hash $item; done fi
And this /bin/update-appdir-cache:
#!/bin/sh APPDIR_CACHE=${HOME}/.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 done
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 this patch to add support to bash.
»
- Printer-friendly version
- Login to post comments
Recent comments
2 years 8 weeks ago
2 years 17 weeks ago
3 years 1 week ago
3 years 5 weeks ago
3 years 9 weeks ago
3 years 10 weeks ago
3 years 10 weeks ago
3 years 14 weeks ago
3 years 14 weeks ago
3 years 15 weeks ago