shellex: fix aliasing and colorize grep
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user