Add kubectl and yaml conf file

This commit is contained in:
Isaias Pina 2018-08-09 22:13:41 -05:00
parent e9fc71c699
commit 1d07328d38
No known key found for this signature in database
GPG Key ID: CE80D641186B6F3D
5 changed files with 104 additions and 1 deletions

63
colourfiles/conf.kubectl Normal file
View File

@ -0,0 +1,63 @@
# Green Words
regexp=\b(Ready|Running|[Tt]rue|Active|Available|Approved|created)\b
colour=unchanged,green
-
# Master
regexp=\smaster\s
colour=on_green bold white
-
# Red Words
regexp=\b([Dd]isabled?|[Ee]rrors?|[Ss]topped|[Ff]alse|none|CrashLoopBackOff|ErrImagePull|ImagePullBackOff)\b
colour=unchanged,red
-
# Yellow Words
regexp=\b([Ww]arning|[Pp]ending|[Ww]aiting|ContainerCreating|Released|Bound|already exists)\b
colour=unchanged,yellow
-
# Completed Jobs
regexp=\b(Completed)\b
colour=unchanged,dark green
-
# Misc IP
regexp=\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(/\d{1,2})?
colour=cyan,magenta
-
# Ports
regexp=(\d+)(:\d+)?/(TCP|UDP)
colour=unchanged,yellow,bold green,magenta
-
# Type/Name
regexp=^([^/ ]+)/(\S+)
colour=unchanged,yellow,bright_white
-
# No running Instances
regexp=\s(0/[1-9]+)\b
colour=unchanged,bold red
-
# Labels
regexp=([\w\d\-_.]+)=([\w\d\-_./]+)(,| |$)
colour=unchanged,blue,bright_yellow
-
# YAML First level (PSEUDO)
regexp=^([^\s][\w\d \-]+):
colours=unchanged,bright_blue
-
# YAML Nested
regexp=^[ \-]+(\S+):
colours=unchanged, blue
-
# YAML number
regexp=: (\d+)$
colours=unchanged, yellow
-
# Explicit String
regexp="(\S*)(?=")
colours=default,cyan
-
# HELP Highlight
regexp=( --[^= ]+| -[a-zA-Z]( |,))
colour=bright_green
-
# Higlight (Tested in kubectl config get-contexts)
regexp=^\*.+$
colour=bold white

35
colourfiles/conf.yaml Normal file
View File

@ -0,0 +1,35 @@
# Document
regexp=---
colours=bold yellow
-
# First level
regexp=^(\S+):
colours=unchanged,blue
-
# Nested
regexp=^ +(\S+):
colours=unchanged,blue
-
# Set Var
regexp=&\S+
colours=bold green
-
# Use Var
regexp=\*\S+
colours=on_green black
-
# Array
regexp=-\s
colours=bold magenta
-
# << Inheritance
regexp=<<
colours=bold red
-
# Explicit String
regexp="(\S*)(?=")
colours=default,cyan
-
# Explicit Number
regexp= (\d*)$
colours=unchanged,yellow

View File

@ -38,5 +38,6 @@ if [ "$TERM" != dumb ] && [ -n "$GRC" ]; then
alias semanage='colourify semanage'
alias getsebool='colourify getsebool'
alias ifconfig='colourify ifconfig'
alias kubectl='colourify kubectl'
fi

View File

@ -287,3 +287,7 @@ conf.lolcat
(^|[/\w\.]+/)whois\s?
conf.whois
# KubeCTL
(^|[/\w\.]+/)kubectl\s?
conf.kubectl

View File

@ -11,7 +11,7 @@ set -U grc_plugin_execs cat cvs df diff dig gcc g++ ls ifconfig \
wdiff blkid du dnf docker docker-machine env id ip iostat \
last lsattr lsblk lspci lsmod lsof getfacl getsebool ulimit uptime nmap \
fdisk findmnt free semanage sar ss sysctl systemctl stat showmount \
tcpdump tune2fs vmstat w who
tcpdump tune2fs vmstat w who kubectl
for executable in $grc_plugin_execs
if type -q $executable