Trying to create a global command to launch lighttable (the editor) version 0.8.0
Initially I tried it the i thought easy way and moved the extracted lighttable folder to /opt and then created a symlink
sudo ln -s LightTable /usr/bin/Lt
When that didn't work I changed it to
sudo ln -s ./LightTable /usr/bin/Lt
That didn't work so I have tried to add the directory to my path and then create an alias from there.
The command to execute lighttable is
./Lighttable
so in my ~/.profile I have added
export LT_HOME=/opt/lighttable/
export PATH=$PATH:$LT_HOME
then I created my ~/.bash_aliases file and added
alias light="./LightTable"
I then restarted the shell and tried using the alias however it fails
sayth@:~$ light
bash: ./LightTable: No such file or directory
How can I achieve this?
Edit
Couldn't initial locate an answer, have now found
Neither command does what you think it will do. In both cases,
Lt
points to theLightTable
in the current directory relative to itself.What you should do is specify the full path of the link's target:
You're still running
LightTable
from the current directory (./
). When you provide a path, absolute or relative, to a command, then thePATH
isn't checked. You should have run justLightTable
, or the alias should be just: