Files
Halyde/halyde/core/shell.lua
T
Ponali e9cf9789b7 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.
2025-04-19 16:09:27 +02:00

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