Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

Vinilux

Members
  • Posts

    4
  • Joined

  • Last visited

About Vinilux

  • Rank
    Newbie
    Newbie

Contact Methods

  • Minecraft
    Dimon6
  • GitHub
    https://github.com/Vinilux
  1. Yes, I did that exactly, but when I try to use opts it doesnt have anything, but yes args.
  2. Hello everyone. I want to use shell.parse in order to pass arguments and options to my program. I saw in the shell api guide than shell.parse can read arguments and options if they are preceded by a -. I can take arguments but if a call my program with -p etc doesnt do anything. Do I have to use the standard local args = ... or local args = {...}? Another question is, what is the correct way of validating arguments and options? Do I have to force an order for arguments? For example, there are arguments that could be written without options but another arguments can only be passed if the correct option for that argument it's passed.
  3. Lua not much. Programming in general counting since I started learning, for 4 years more or less, but I've never done anything too big yet. By passing the sublevel as an optional parameter, with the purpse of not using it as a closure, right? Also I noticed that when there are no more items in one parent, and childrens are displayed, lines for those parents continue to be displayed even though they have no more direct items. I don't know how to explain it. For example I create this structure, and you'll see what i meen folder1 -> item1, item2, item3 folder2 - item1 If displayed in order, line for folder 1 will continue to be drawn even though all items will have been printed, while folder 2 items draw, and that line will have no connection, I don't know if this matters a lot.
  4. TREE command Updated Added a new rewritten file called tree2.lua. You can test both tree.lua and tree2.lua. tree2.lua is a bit slower version but it shows the tree properly unlike the other version (tree.lua). At the moment the command does not sopport parameters. You can help to add things to the command if you like. Even though this is a little program, you could give some ideas for display or parameters. @GreaseMonkey Thank you for your comment There is still one problem with piping even thouth I changed to io library from "term". I thought "tree | more" or "tree | less" would work here but in OC it says the command is "more <filename>" but if you do that obviously it prints the file, not the output. I thinkinf if it's possible to make the program create a file with the output instead of outputting the result directly and then more the file and once finished destroy the file maybe. Instructions Everyone knows this, but just in case, you have to copy the tree.lua or tree2.lua in /bin/ in order for the program to work from every directory. Download https://github.com/Vinilux/OpenComputers---tree
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.