shellex: fix aliasing and colorize grep

This commit is contained in:
kepler155c@gmail.com
2019-05-13 09:30:27 -04:00
parent 9f3070bbdc
commit 180f0f9b93
5 changed files with 132 additions and 26 deletions

View File

@@ -8,12 +8,23 @@ local cmap = {
[ 0x44CC00 ] = colors.lime,
[ 0xB0B00F ] = colors.yellow,
[ 0xFFFFFF ] = colors.white,
[ 0xb000b0 ] = colors.purple,
[ 0x00FF00 ] = colors.green,
[ 0xFF0000 ] = colors.red,
[ 0x00FFFF ] = colors.cyan,
[ 0x000000 ] = colors.black,
}
return {
gpu = function()
local current = 0xFFFFFF
return {
setForeground = function(c) term.setTextColor(cmap[c]) end,
setForeground = function(c)
current = c
term.setTextColor(cmap[c])
end,
getForeground = function() return current end,
}
end,
getViewport = term.getSize,