Jump to content




Extended Shell - Advanced Tab-completion and Suggestions, Command History, Lua, Find, Cat. v3.0 - Rewritten.

utility

17 replies to this topic

#1 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 06 November 2013 - 09:02 PM

Extanded Shell project has been canceled due to addition of auto-complete to standard shell in ComputerCraf versions past 1.73. This post is for people using older versions.

There is a program called Shell Utility Extended that is basically a new child/sibling of this thing. To read more about it look here


Extended Shell - Advanced Tab-completion and Suggestions, Command History, Lua, Find, Cat. v3.0 - Rewritten.

Complete rewrite for versions 1.6 up.

Extended Shell if extension/modification of standard ComputerCraft Shell. Included are many new and useful features that make coding and working with shell much easier. Works perfect on Portable Computers as well as on all other devices :D.

Download Here: http://pastebin.com/wJVmXZv7
Or ingame by using command:
pastebin get wJVmXZv7 filename
(requires http-api to be active)

Posted Image
Posted Image
Posted Image

Features List:
  • Tab-Completion of commands. Lists default vanilla programs system commands and filesystem itself. Also lists possible arguments for vanilla programs. When you press Tab it will ether fill out whole name(if one possible) or print out list of possibles and fill out common part. If you are pointing at folder it will print out all files in said folder.
  • Ghost suggestions - If there is a common part of word or only one word to write out it will show it in gray on advanced computers and in black (visible on large monitors) on bw ones. If you have yet to write something it will tell you what it needs next if it knows.
  • Intelligent suggestions - for programs its coded for it has advanced abilities - in case of chat it lookups hostnames in area and lists them for you, in case of programs that need diskdrive/monitors it lists only sides that have them (includes wired modem systems detection of peripherals)
  • Build in lua interface - type "!lua" followed by lua command to execute it. Type "!rlua" to reset shell lua environment. For fast command testing.
  • Build in cat. Simply write "!cat" followed my paths to files (can be one can be many) and it will write contents of those files to console. If needed result gets paged. For fast file lookup
  • File search. Use "!find" to look for file on computer by name.
  • Permanent Command History - Last 100 commands that you called are stored in shell log file. Don't store empty enters for even more practical space.
  • Whole Shell is written to allow live use. If placed anywhere not in rom it will store history in hidden file next to it. That allows you to keep in of floppy and take with you everywhere.!
  • Also Written in way that allows to use it as main shell on computer. Simply replace "rom/programs/shell" with this file and you will have Extended Shell on all Computers.
Change-log:
Spoiler

Plans For Future:
Spoiler

Any Comment and Suggestions how to improve Code are appreciated.

Pre 1.6 archived 2.1 version

Edited by wojbie, 04 October 2015 - 01:45 PM.


#2 lewanator1

  • Members
  • 34 posts

Posted 07 November 2013 - 11:07 AM

New stuff :D

#3 NeverCast

  • Members
  • 400 posts
  • LocationChristchurch, New Zealand

Posted 07 November 2013 - 02:24 PM

I love it! This needs more exposure.

#4 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 07 November 2013 - 02:47 PM

View Postlewanator1, on 07 November 2013 - 11:07 AM, said:

New stuff :D

View PostNeverCast, on 07 November 2013 - 02:24 PM, said:

I love it! This needs more exposure.

I am happy people like it.
I just posted new update - few small tweaks and "cat<" command! Hope it will be useful for you!

#5 TheGamerOfAction

  • Members
  • 20 posts
  • LocationIn a mysterious world of 1s and 0s

Posted 12 November 2013 - 11:27 AM

An advanced shell? I've always wanted one!

#6 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 25 November 2013 - 05:51 PM

UPDATE v2.0

Added command-line commands:
  • find< - prints list of files matching given name from whole file-system. All magic characters are treated as normal.
  • findpattern< - same as above but uses pattern system from lua string library for advanced search. That means magic characters matter.
  • help<,?< - lists all command-line commands that are added in ext-shell.
As for findpatter< - by using patterns outlined in string library you can do complicated file-searches.
Example:
findpatter< ^aaa
will find only files that have aaa at front of filename - not in middle or end.

Edited by wojbie, 12 January 2014 - 05:14 PM.


#7 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 27 November 2013 - 05:04 AM

Tab completion! YES! This NEEDS to be added to the default shell.

#8 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 12 January 2014 - 05:25 PM

UPDATE v2.1

Removed whole virtual file-system part - it was shoddy and buggy.

Moved Pastebin integration into shell itself - its available using commands plogin<,plogout<,pget<,plist<. For more info on how to use it see spoiler about it in main post.

This is technical update cause i needed to clean up code for versions 3.0 - Sorry to people that liked virtual file-system but it was not working as i wanted.

EDIT: Also small fix in cat< and how shell moves to next line after program finishes.

Edited by wojbie, 12 January 2014 - 05:42 PM.


#9 Zoidberg

  • New Members
  • 2 posts

Posted 21 March 2014 - 06:01 PM

First of all: We really like your shell :P
I've put your shell as autostart on all our turtle (small private server with some mods ;) using a resourcepack. It works perfect on standard and advance computers.

Some ideas from us: (Of course the fuel display you mentioned ;)
It would be nice to see the id of the computer/turtle especially if no label is set. For example when you first boot the computer or after every start. (We often take a lot of turtles to our trips and don't assign labels in order to stack them and have more free inventory.)
It would be really nice if there were a possibility to configure the things displayed. Nothing fancy just some variable in a file to turn off the clock and maybe turn something other on instead. Some people don't care about the time if they are in there houses :P

#10 Csstform

  • Members
  • 410 posts
  • LocationU.S.A.

Posted 25 March 2014 - 06:11 PM

If you want a fun terminal-based game, feel free to add this - you may want yo remove the term.clear()s though.

I really like this, especially the tab-completion, I tend to shy away from GUIs, so this fits me perfectly.

#11 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 25 March 2014 - 07:37 PM

I am working on new version using all newest features
Some stuff will get torn away some stuff will stay but i thing that cow-say would make a great easter egg :P
If you don't mind me tearing code apart and hiding it in my code. You would get all credits of-course.

Right now i am working on implementing tab-completition that takes into account new *-wildcard system in its calculation
also working on adding scroll ability to shell using custom window handler - it would allow you to scroll up to stuff that happened before (assuming that it was not cleared) that would make it more like terminal window in graphical linux distros.
Have a lot of quirks and functionalities to work out with this stuff and i am kinda weary of coding too many lines considering that latest version is still indev and stuff can change at any moment.
Turtle fuel gauge (in % or number) is in plans. Also real-time clock using Greenwitch time servers(if http enabled - you can tell it what timezone you want it to have. Can you imagine shell.realtime()?).
Also got some nice ideas that could be implemented into Multishell (like scrolling of tablist it when there is more tabs then screen-size)

You can expect extended-shell and extended-Multishell coming some time after newest vearsion of CC hits.

On personal notes i am amazed that this topic got dig up after that time of inactivity.
:D

#12 Csstform

  • Members
  • 410 posts
  • LocationU.S.A.

Posted 25 March 2014 - 10:09 PM

Sure, rip it apart! If you want to wait a day or two, I'll have an update that includes a few more features.

#13 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 21 April 2014 - 08:25 PM

Rewrite! v3.0

Look up there!

Whole shell got rewritten, upgraded and rethink - Tab-competition is more advanced and intelligent, code looks better :D . It is 120% of its original Awesomeness!

Some parts of older versions got dropped. They may come back in future or not.

Hope you test it them!

Also special tx to Graypup for bug-testing!! Love you!

#14 vifino

  • Members
  • 7 posts
  • LocationEarth

Posted 24 April 2014 - 07:42 AM

Wub Wub! Fanciness cubed!

I like it, its..... FANCY!

gg Wojbie.

#15 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 24 February 2015 - 04:11 PM

Cool. If ever I write an OS, I will include it. With your permission of course!

#16 minebuild02

  • Members
  • 97 posts

Posted 16 March 2015 - 01:04 PM

Can I use this in my OS?

#17 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 16 March 2015 - 02:07 PM

Well its here for people to use it. Don't know what exactly you mean by use in your os but as long as credit is given feel free to use it.

If i get some free time in future i plan to rewrite/update it but don't wait for it. My timetable is in half-year intervals.

#18 Uncertified Robot

  • Members
  • 11 posts

Posted 17 March 2015 - 06:55 PM

Damn this is awesome!
Thanks for this!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users