Tente isto:
PATH=$PATH:~/bin
javatools() {
if [ $# -eq 0 ]
then
echo $'\nComplete list of tools:'
ls /Users/username/tools/javatools/
else
local toolToRun=/Users/username/tools/javatools/$1
java -Xmx4g -jar $toolToRun ${@:2}
}