Jump to content




SoftLink a program to all directories


  • You cannot reply to this topic
4 replies to this topic

#1 EveryOS

  • Members
  • 570 posts
  • LocationOver there ->

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?

#2 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited 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.

#3 Anavrins

  • Members
  • 775 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.

#4 Lupus590

  • Members
  • 2,028 posts
  • LocationUK

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.../Shell.setAlias

#5 EveryOS

  • Members
  • 570 posts
  • LocationOver there ->

Posted 05 December 2016 - 11:52 AM

Thx





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users