shell tools: globbing

This commit is contained in:
kepler155c@gmail.com
2019-05-10 08:08:49 -04:00
parent 8ea2598254
commit 86cba3b585
35 changed files with 303 additions and 432 deletions

23
shellex/apis/tty.lua Normal file
View File

@@ -0,0 +1,23 @@
local colors = _G.colors
local term = _G.term
local w, h = term.getSize()
local cmap = {
[ 0xCC2200 ] = colors.red,
[ 0x44CC00 ] = colors.lime,
[ 0xB0B00F ] = colors.yellow,
[ 0xFFFFFF ] = colors.white,
}
return {
gpu = function()
return {
setForeground = function(c) term.setTextColor(cmap[c]) end,
}
end,
getViewport = term.getSize,
window = {
width = w, height = h,
}
}