749 posts
Location
BOO!!
Posted 05 December 2016 - 12:28 AM
I need to softLink a program to all working directories, so the user doesn't have to type
../../../../program argz
Kinda like edit, rm, help, programs, lua, cp, reboot, etc
Is this possible?
3057 posts
Location
United States of America
Posted 05 December 2016 - 01:23 AM
How about we take a look at how
it's done by computercraft. Looking at the lua files can be very informative.
756 posts
Posted 05 December 2016 - 02:00 AM
The shell has the same concept of
paths.
shell.setPath(shell.path()..":"..directory)
Adding "directory" to your path variable will make every executables in that folder runnable from everywhere.
However you have to run it everytime you boot up the computer, so it needs to be put in a startup file.
2427 posts
Location
UK
Posted 05 December 2016 - 10:05 AM
if you want a single item instead of the directory you may want to use an alias instead:
http://computercraft.info/wiki/Shell.setAlias
749 posts
Location
BOO!!
Posted 05 December 2016 - 11:52 AM
Thx