mcjack123 / cash Goto Github PK
View Code? Open in Web Editor NEWComputerCraft Advanced Shell - A Bourne-compatible shell for CraftOS
ComputerCraft Advanced Shell - A Bourne-compatible shell for CraftOS
With the latest changes, the terminal is not being correct set for resume/terminate.
You might want to use something like this in order to support programs that do term redirection:
local previousTerm = term.redirect(self.terminal)
local ok, result = coroutine.resume(self.co, event, ...)
self.terminal = term.current()
term.redirect(previousTerm)
This keeps a terminal handle associated with each coroutine (multishell does something similar as well).
This is the code for opus task coroutine manager: [https://github.com/kepler155c/opus/blob/1e675a2e3523411b45655e450be62b137f41230a/sys/kernel.lua#L85]
I have been testing this shell with Opus OS checking for compatibility. If you wanted to give it a shot, you would run pastebin run uzghlbnc
I would suggest having some boolean at the start to determine if you are running within your custom kernel. Also check more than just if the global kernel exists (ie. kernelMode = kernel and users and kernel.getPID).
Also, when a program is run under this shell, the terminate event is not being processed correctly. An example would be if the program being run is waiting for read() to finish and receives a terminate event. Currently, both the program and the shell are terminated.
Doing which system
is returning a directory instead of system.lua (which is in the path).
All is looking good but I have one last issue. If I run cash.lua, I am not able to terminate it directly - I must use the exit command. I believe the cash process should handle the terminate event and exit accordingly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.