grc icon indicating copy to clipboard operation
grc copied to clipboard

Add colorization for route

Open codenyte opened this issue 1 year ago • 3 comments

Add colorization for the route command on Linux

codenyte avatar Dec 12 '23 23:12 codenyte

The problem with route command is that the command is a bit slow. GRC colorizes after the command exits.

TLDR; You will have no output until the command finishes. In my tests, about 17 seconds

iax7 avatar Dec 13 '23 17:12 iax7

I did a quick mock up: image

This is the file I used:

# Network DEFAULT
regexp=\bdefault\b
colours=on_green bold black
-
# IP
regexp=\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}
colours=magenta
-
# Mask
regexp=(?<=255)((\.0)+)
colours=bold magenta
-
# all host
regexp=0\.0\.0\.0
colours=bright_black
-
# Flags
regexp=\b[UHGRDMAC!]+\b
colours=yellow
-
# iface
regexp=(?<=\d\s)\b[-\w\d]+$
colours=cyan

iax7 avatar Dec 13 '23 19:12 iax7

This is great, thanks

codenyte avatar Dec 13 '23 21:12 codenyte