0.5.0 - ANSI color escape code support
I got asked to do the ANSI escape codes for color because Wahlolly couldn't find a way to get them to work. This involved making some kind of TTY, and let me be clear, i didn't know it would be so tedious to develop one. This implementation has support for dark and bright colors by using a color palette. There isn't 8-bit and 24-bit color yet, nor is there a shell parser, so please wait a bit more when it gets implemented.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
local loadfile = ...
|
||||
local filesystem = loadfile("/halyde/lib/filesystem.lua")(loadfile)
|
||||
|
||||
_G._OSVERSION = "Halyde 0.4.1"
|
||||
_G._OSVERSION = "Halyde 0.5.0"
|
||||
|
||||
function _G.import(module, ...)
|
||||
local args = table.pack(...)
|
||||
@@ -28,4 +28,4 @@ end
|
||||
--assert(handle:write("Bazinga!"))
|
||||
--handle:close()
|
||||
|
||||
import("/halyde/core/cormgr.lua")
|
||||
import("/halyde/core/cormgr.lua")
|
||||
|
||||
@@ -35,7 +35,7 @@ local function runCoroutines()
|
||||
end
|
||||
end
|
||||
|
||||
local handle = filesystem.open("/halyde/config/startupapps.txt", "r")
|
||||
local handle = filesystem.open("/halyde/config/startupapps.cfg", "r")
|
||||
local data = ""
|
||||
local tmpdata
|
||||
repeat
|
||||
@@ -58,4 +58,4 @@ while true do
|
||||
if #_G.cormgr.corList == 0 then
|
||||
computer.shutdown()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -19,4 +19,4 @@ function table.copy(orig)
|
||||
copy = orig
|
||||
end
|
||||
return copy
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
local shellcfg = import("/halyde/config/shell.cfg")
|
||||
import("termlib")
|
||||
local event = import("event")
|
||||
|
||||
@@ -7,10 +8,11 @@ _G.shell.workingDirectory = "/"
|
||||
print("\n │\n │ ".._OSVERSION..'\n │ Welcome! Type "help" to get started.\n │\n ')
|
||||
while true do
|
||||
coroutine.yield()
|
||||
print(shell.workingDirectory .. " >")
|
||||
termlib.nextPosX = #(shell.workingDirectory .. " > ")
|
||||
termlib.nextPosY = termlib.nextPosY - 1
|
||||
-- print(shell.workingDirectory .. " >")
|
||||
print(shellcfg["prompt"]:format(shell.workingDirectory),false)
|
||||
-- termlib.cursorPosX = #(shell.workingDirectory .. " > ")
|
||||
-- termlib.cursorPosY = termlib.cursorPosY - 1
|
||||
read()
|
||||
termlib.nextPosX = 1
|
||||
termlib.cursorPosX = 1
|
||||
print("no shell parser yet")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user