This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
MudkipTheEpic's profile picture

[MudDev] A shell for developers!

Started by MudkipTheEpic, 07 May 2013 - 07:05 PM
MudkipTheEpic #1
Posted 07 May 2013 - 09:05 PM
MudDev is a custom shell (doesn't work as rom/programs/shell for some reason… :/) for developers to use to make their lives easier. Press Alt while in the shell to get to the main menu, where there are some options you can choose by pressing keys. Currently, there is nothing "special" to it, but ideas for the menu would be appreciated. This will NEVER have a GUI, because that breaks the feeling of having it be for developers (most developers, from my experience, prefer a command-line interface). NOTE: There are not any REALLY useful dev features (yet)! I need some help for ideas!

Features:
Reboot key in main: "R"
Shutdown key in main: "S"
Idea Generator key in main: "I"

Download:
pastebin get rsfEZq1b muddev

(or startup)


Credits:
  • Credit to Espen for his epic tab completing read.
  • Credit to the ComputerCraft team for making the original shell.
Constructive criticism is welcome.
Zudo #2
Posted 08 May 2013 - 12:58 PM
Rednet Cheesecake Derpcake? ._.
EDIT: Like constructive criticism? So do I!
Kingdaro #3
Posted 08 May 2013 - 06:41 PM
It would be cool if the auto-completion worked in searching through more files and directories than just the current.
Espen #4
Posted 08 May 2013 - 08:42 PM
@Kingdaro:
Well, I oriented myself on the TAB behaviour of Linux and, as far as I can recall, it always shows you only the files and directories of the directory you're entering.
I.e. if you are in /rom/programs and you start to enter ../ap then after hitting tab it correctly shows ../apis

It doesn't traverse subdirectories because doing that could potentially take very long and show very long completion-paths, depending on how deep the match is "buried" within subfolders.
Just imagine you'd have 10 subfolders; each of them have to be traversed and searched for matches.
Then, if there are subfolders within the subfolders, you'd have to traverse them as well, and on and on.
And then imagine how long the completion-path might become. Something like /somefolder/fil could suddenly be completed as /somefolder/somesubfolder/someothersubfolder/andyetanothersubfolder/file

So for most cases it would be too impractical to search within subfolders and could (given enough subfolders and files) take ages to complete.
With TAB completion you usually already have an idea where a file or folder is located and also how it begins. Looking through all subfolders for a file or directory would be overkill here.
An actual search program would be a better fit for that kind of functionality.

Maybe someone even made one? I'm not up to date on that. If there isn't, then that would probably be something for the idea topic. ^_^/>

Edit: Whadda ya know? As soon as I finished posting, the next topic I had open was "[topic='12666']Search for files[/topic]".^^
Edited on 08 May 2013 - 06:45 PM
theoriginalbit #5
Posted 09 May 2013 - 12:27 AM
@Kingdaro:
Well, I oriented myself on the TAB behaviour of Linux and, as far as I can recall, it always shows you only the files and directories of the directory you're entering.
I.e. if you are in /rom/programs and you start to enter ../ap then after hitting tab it correctly shows ../apis
Its how Windows deals with it too. It doesn't make sense that you're typing 'rom/programs/a' and it suggests 'rom/apis/' for you instead of 'rom/programs/apis'
superaxander #6
Posted 09 May 2013 - 06:51 AM
Ehm I can't seem to enable tab completion in the menu also maybe change alt to a different key because alt opens up some stuff on my computer(sort of a command prompt) on windows it will get you a little thing where you can choose to close minimize maximize