Syntax Highlighting for Cisco/Arista/Juniper CLI
Syntax Highlighting for Cisco/Arista/Juniper CLI
If you have ever used the CLI on network devices, you probably have ended up frustrated trying to make sense of the long lines of configuration. Although nowadays the use of editors like vim/Sublime/Vscode/Atom can provide some really useful syntax highlighting, you still can find yourself struggling to read the config files or outputs while you are on live devices.
In this post, I would like to share a config that has helped me to work more efficiently in the CLI by providing some very useful syntax highlighting.
Examples
Next, you can see examples of the syntax highlighting:
Reading JunOS Firewall Rules
Figure 1 - JunOS Firewall Rules
Reading Show ip bgp summary (Arista/Cisco)
Figure 2 - (EOS/IOS) show ip bgp summary
Show interfaces (Arista/Cisco/Juniper)
Figure 3 - (EOS/IOS) show interfaces
Reading route-maps (EOS/IOS)
Figure 4 - (EOS/IOS) show route-maps
Reading Prefix Lists
Figure 5 - (EOS/IOS) Prefix Lists
How can I try this?
This setup uses a tool called chromaterm that basically matches some Regular Expressions and allows you to apply a style (Foreground/Background color) to the matched expression. It is super easy to use and read.
If you are interested in getting this config and information on how to use it, visit the following repository:
Hope you find it as useful as I do.
Have a great day and stay safe during this COVID-19 madness.