Running a command line tool based on its extension I use Leo for structured editing of my code, and Leo has the extension of .leo.

In order to run Leo, I use the following alias


alias leo='arch -x86_64 /usr/bin/python2.6 /Users/bin/Leo-4.7.1-final/launchLeo.py --gui=qt'


It works well to launch leo with leo file as follows.


leo -f hello.leo


However, I need to find a way to launch Leo by clicking the leo file in the Finder/Path Finder. 

What might be the solution to this problem?

ADDED

Mankoff's advice on using Automator works.
For running PyQt with -f option, I set "Pass input : as argument", and have the following bash code, which launches with/without -f option depending a file is dragged on or not.

if [ -z $1 ]
then
  arch -x86_64 /usr/bin/python2.6 /Users/smcho/smcho/bin/Leo-4.8-b1/launchLeo.py --gui=qt 
else
  arch -x86_64 /usr/bin/python2.6 /Users/smcho/smcho/bin/Leo-4.8-b1/launchLeo.py --gui=qt -f $1
fi
I would use Automator. Make an app that takes an argument (file dropped on it, file double-clicked associated with that app, whatever), and runs the command you have above.