This is a modification of the original shell program with added TAB-completion functionality.
There's also an alternative download which injects the modified read() function into the already running shell.
Details:
Spoiler
If there is more than one match it will fill up as much as it can on first TAB.If you TAB again, it'll show a list of all possible matches.
I also added the "–More–" functionality if there are more than [screen-height] matches.
Keys for the "More" functionality are:
- ENTER - Scroll a line
- SPACE - Scroll a page
- BACKSPACE - Cancel
Known Limitations:
- TAB completion doesn't work inbetween arguments, but only on the last.
- There's only list-view (instead of the separate column-view for small numbers of completions).
Installation:
Spoiler
Installation for all computers:- Download the "Shell file".
- Save the downloaded file as "shell" into the following folder (create folders where necessary): .minecraft/mods/ComputerCraft/lua/rom/programs
- Reboot your CC computer(s).
- Done!
Installation for individual computers:
- Variant: Read-Override
- Download the "Read-Override file".
- Save the downloaded file on a CC computer.
- Run it (needs to be done on every startup)
- Done!
- Variant: Shell file
- Download the "Shell file".
- Save the downloaded file on a CC computer.
- Run it (will start a new shell on top of the old one)
- Done!
- (Type "exit" to get back to the old shell.)
Download:
Pastebin: Shell file ( to start a new shell or to replace shell for all computers )
Pastebin: Read-Override file ( runtime override of read() )
Changelog:
Spoiler
- v2.2 Fixed: Entering a folder name completely and then pressing TAB didn't append a slash.
- v2.1 Added: Directory-Matches now have slashes appended to them. Changed: COMPLETION_QUERY_ITEMS was hardcoded to 19, is now height of respective terminal. Fixed: Pressing SPACE for listing multiple pages of matches "blanked out" the screen. Fixed: TAB completion was engaged even if cursor was not at the end of the line. Fixed: Path-resolving for directory-detection wasn't quite right.
- v2.0 - Changed the previously mixed Windows<->Linux TAB completion behaviour completely to Linux-style (except for column-display). Added: Display of all possible matches. Added: MORE-functionality for displaying possibilities greater than a certain number ( COMPLETION_QUERY_ITEMS )
- v1.2 Added: a separate program to to allow runtime-injection of the custom read() into the running shell of an individual computer. Thanks @BigSHinyToys for making me aware of the global table's dropped protection. ^_^/>
- v1.12 - Fixed: Pressing Tab without entering anything threw an error.
- v1.11 - Removed previously introduced, but now unnecessary parameter from read()
- v1.1 - Path traversal implemented
- v1.0 - Initial release