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,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