e9cf9789b7
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.
19 lines
561 B
Lua
19 lines
561 B
Lua
local shellcfg = import("/halyde/config/shell.cfg")
|
|
import("termlib")
|
|
local event = import("event")
|
|
|
|
_G.shell = {}
|
|
_G.shell.workingDirectory = "/"
|
|
|
|
print("\n │\n │ ".._OSVERSION..'\n │ Welcome! Type "help" to get started.\n │\n ')
|
|
while true do
|
|
coroutine.yield()
|
|
-- print(shell.workingDirectory .. " >")
|
|
print(shellcfg["prompt"]:format(shell.workingDirectory),false)
|
|
-- termlib.cursorPosX = #(shell.workingDirectory .. " > ")
|
|
-- termlib.cursorPosY = termlib.cursorPosY - 1
|
|
read()
|
|
termlib.cursorPosX = 1
|
|
print("no shell parser yet")
|
|
end
|