Fix conf files

Add conf.jobs file
Fix lsattr and df conf files
Fix dockerimages conf file
Update grc.fish
This commit is contained in:
Isaias Pina 2017-11-23 17:44:36 -06:00
parent ffd3b12a40
commit d927c5db24
No known key found for this signature in database
GPG Key ID: CE80D641186B6F3D
15 changed files with 183 additions and 152 deletions

View File

@ -1,7 +1,7 @@
# FS
#regexp=^.*?\s
regexp=^(?!Filesystem).*?\s
colours=green
regexp=^(?!Filesystem)(\/[-\w\d.]+)+\s
colours=blue,bold blue
======
# Size 'K'
regexp=\s\d*[.,]?\dKi?\s
@ -20,25 +20,25 @@ regexp=\s\d*[.,]?\dTi?\s
colours=bold red
======
# Mounted on
regexp=/[-\w\d./]*$
colours=bold green
regexp=\/$|(\/[-\w\d. ]+)+$
colours=green,bold green
======
# Use 0-60%
regexp=[1-6][0-9]?%|0%
regexp=[ 1-6][0-9]?%|0%
colours=green
======
# Use 70-90%
regexp=[7-9][0-9]%
colours=yellow
======
# Use 90-95
regexp=[9][0-5]%
# Use 90-97
regexp=9[0-7]%
colours=red
======
# Use 95-100
regexp=[9][5-9]%|100%
# Use 98-100
regexp=9[8-9]%|100%
colours=bold red
======
# tmpfs lines
regexp=^tmpfs.*
colours=bright_black

View File

@ -1,43 +1,63 @@
# HEADERS
regexp=(?:\s|^)(REPOSITORY|TAG|IMAGE ID|CREATED|SIZE)(?:\s|$)
colours=default,underline
=====
# REPO, TAG
regexp=^([a-z]+\/?[^\s]+)\s+([^\s]+)
colours=default,bold white,cyan,bold black
=======
# REPO, TAG, IMAGE ID
regexp=^([a-z]+\/?[^\s]+)\s+([^\s]+)\s+(\w+)
colours=default,bold white,bright_cyan,bright_black
=====
# latest
regexp=\s+(latest)\s+
colours=unchanged,cyan
regexp=(?<=\s)latest(?=\s+)
colours=dark cyan
=====
# REPOSITORY (Image name)
regexp=^(?:([a-z\-_0-9]+)/)*([a-z\-_0-9]+)\s
regexp=^(?:(\S+)\/)*(\S+)\s
colours=default,yellow,bright_white
=====
# images without name
regexp=^<none>.*$
colours=bold red
=====
# images without tag
regexp=\s+(<none>)\s+
colours=unchanged,bold red
=====
# Size 'K'
regexp=\s\d*[\.,]?\d*\sKB?
regexp=(?<=\s)\d+[.,]?\d*\s?(KB?|B)
colours=green
======
# Size 'M', 2 digits
regexp=\s\d{1,2}[\.,]?\d*\sMB?
regexp=(?<=\s)\d{1,2}[.,]?\d*\s?MB?
colours=green
======
# Size 'M' 3+ digits
regexp=\s\d{3,4}[\.,]?\d*\sMB?
regexp=(?<=\s)\d{3,4}[.,]?\d*\s?MB?
colours=yellow
======
# Size 'G'
regexp=\s\d*[\.,]?\d*\sGB?
regexp=(?<=\s)\d+[.,]?\d*\s?GB?
colours=red
=====
# CREATED seconds/minutes
regexp=[\da-f]{12}\s+((?:About a|\d+) (?:seconds?|minutes?) ago)
colours=unchanged,on_green bold white
======
# Date Ago
regexp=(?:\s{2}|^)(?:\w+\s)+ago
colours=cyan
# CREATED About a minute ago
regexp=\s+(About a minute ago)\s\w+
colours=unchanged,on_green bold white
======
# CREATED hours
regexp=\s+(\d+\shours\s\w+)
colours=unchanged,bright_green
======
# CREATED days
regexp=\s+(\d+\sdays\s\w+)
colours=unchanged,green
======
# CREATED weeks
regexp=\s+(\d+\sweeks\s\w+)
colours=unchanged,yellow
======
# CREATED months
regexp=\s+(\d+\smonths\s\w+)
colours=unchanged,red
=====
# HEADERS
regexp=(?:\s|^)(REPOSITORY|TAG|IMAGE ID|CREATED|SIZE)(?:\s|$)
colours=default,underline

View File

@ -1,9 +1,9 @@
# Main Nodes
regexp=^(\S[^:]+):\s(.*)$
regexp=^(\S[^:]+):\s?(.*)?$
colours=default,cyan
======
# Sub Nodes
regexp=^\s([^:]+):\s(.*)$
regexp=^\s([^:]+):\s?(.*)?$
colours=default,magenta
======
# Warning

View File

@ -1,23 +1,23 @@
# HEADERS
regexp=(?:\s|^)(NETWORK ID|NAME|DRIVER)(?:\s|$)
regexp=(?:\s|^)(NETWORK ID|NAME|DRIVER|SCOPE)(?:\s|$)
colours=default,underline
-
# Line
regexp=^(?!NETWORK)(\S+)\s+(\S+)
colours=default,green,bright_blue
colours=unchanged,bright_black,bright_blue
-
# Bridge
regexp=bridge\s+$
colours=cyan
# Driver BRIDGE
regexp=^\S+\s+\S+\s+(bridge)
colours=unchanged,bright_cyan
-
# host
regexp=host\s+$
colours=bright_cyan
# Driver HOST
regexp=^\S+\s+\S+\s+(host)
colours=unchanged,cyan
-
# overlay
regexp=overlay\s+$
colours=magenta
# Driver OVERLAY
regexp=^\S+\s+\S+\s+(overlay)
colours=unchanged,magenta
-
# null
regexp=null\s+$
colours=red
# Driver NULL
regexp=^\S+\s+\S+\s+(null)
colours=unchanged,on_red white

View File

@ -1,15 +1,18 @@
# This is for docker ps and docker-compose ps
# Headers
regexp=(?:\s{2}|^)(CONTAINER ID|IMAGE|COMMAND|CREATED|STATUS|PORTS|NAMES|Name|Command|State|Ports)(?:\s|$)
# HEADERS
regexp=(?:\s|^)(CONTAINER ID|IMAGE|COMMAND|CREATED|STATUS|PORTS|NAMES)(?:\s|$)
colours=default,underline
======
# Commands (docker ps)
regexp=(?:\s{2}|^)(?:\s\")(.*)(?:\")(?:\s{2}|$)
colours=magenta
=======
# Date Ago (docker ps)
regexp=(?:\s{2}|^)(?:\w+\s)+ago
colours=cyan
# IMAGE NAME (as docker image)
regexp=\s{2,}(?:([a-z\-_0-9]+)\/)*([a-z\-_0-9]+)(:\S+)?\s{2,}\"
colours=unchanged,yellow,bright_white,cyan
======
# IMAGE
regexp=^(?!CONTAINER)(\w+)\s+([^\s]+)\s+(".*")\s+(.*(?=(?:Up|Exited|Created|Restarting)))
colours=unchanged,bright_black,unchanged,bright_black,cyan
======
# Statuses - Created
regexp=\sCreated\s
colours=blue
======
# Statuses
# https://github.com/docker/docker/blob/e5a3f86e447dd659da3c2e759f3c088a0bfcfe3d/container/state.go#L40
@ -17,18 +20,18 @@ colours=cyan
regexp=(?:\s{2}|^)(?:Up|Restarting)(?:(?:\s[\w,\d,(,)]+)+)?
colours=bold green
======
# Exited
regexp=(?:\s{2}|^)(?:Exited|Exit|Dead|Removal In Progress)(?:(?:\s[\w,\d,(,)]+)+)?
colours=bold red
=======
# Statuses - Exited
regexp=Exited\s.(\d+).+?(?=\s{2,})
colours=bold red,red
======
# Statuses - Restarting
regexp=Restarting\s.(\d+).+?(?=\s{2,})
colours=bold blue
======
# Ip Addresses / Ports
regexp=(?:\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(\:)?(\d{1,5}))?(->)?(\d{1,5})(\/)(\w+)
colours=blue,default,bright_green,default,bright_green,default,bright_blue
=======
# Name and command in docker-compose ps.
regexp=(?:\s{2}|^)(?:[a-z\-_0-9]+)(?:\s{2}|$)(?:\s+(.+?)\s{2,})?
colours=bold yellow,magenta
=======
# Container ID / Image ID and Image. Need to be together to override the "name" regex.
regexp=(?:\s{2}|^)([a-z0-9]+)\s{2,}((?:(?:[a-z\-_0-9\.]+)+(\/|:)?)+)
colours=default,cyan,default
regexp=(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(\:)?(\d{1,5}))?(?:->)?(\d{1,5}(\/)\w+)
colours=default,blue,default,bright_green,bright_blue,default
======
# NAMES
regexp=(?:([a-z\-_0-9]+)\/)*([a-z\-_0-9]+)$
colours=default,yellow,on_blue white

9
colourfiles/conf.jobs Normal file
View File

@ -0,0 +1,9 @@
# BASH
regexp=\[(\d+)\](.) +(\d+)?\s?
colour=unchanged, cyan, yellow, magenta
-
regexp=Running.*
colour=bold green
-
regexp=Stopped.*
colour=red

View File

@ -5,15 +5,21 @@
# Example lines:
# -rw-r--r-- 1 user staff 344M Mar 22 22:51 MVI_8735.m4v
# -rw-r--r-- 1 user staff 360050327 Mar 22 22:51 MVI_8735.m4v
# -rw-r--r--. 1 user staff 1.0G Nov 23 16:13 testg
# -rw-r--r--. 1 user staff 1.0K Nov 23 16:13 testk
# -rw-r--r--. 1 user staff 1.0M Nov 23 16:13 testm
# -rw-r--r--. 1 user staff 1073741824 Nov 23 16:13 testg
# -rw-r--r--. 1 user staff 1024 Nov 23 16:13 testk
# -rw-r--r--. 1 user staff 1048576 Nov 23 16:13 testm
#
# The regexp uses lookahead to match a date following the size
# size: 1M <= size < 10M
regexp=\s+(\d{7}|\d([,\.]\d+)?M)(?=\s[A-Z][a-z]{2}\s)
regexp=\s+(\d{7}|\d(?:[,.]?\d+)?[KM])(?=\s[A-Z][a-z]{2}\s)
colours=green
=======
# size: 10M <= size < 100M
regexp=\s+(\d{8}|\d\d([,\.]\d+)?M)(?=\s[A-Z][a-z]{2}\s)
regexp=\s+(\d{8}|\d\d(?:[,.]?\d+)?M)(?=\s[A-Z][a-z]{2}\s)
colours=yellow
=======
# size: 100M <= size < 1G
@ -21,24 +27,17 @@ regexp=\s+(\d{9}|\d{3}M)(?=\s[A-Z][a-z]{2}\s)
colours=red
=======
# size: 1G <= size
regexp=\s+(\d{10,}|[\d\.,]+G)(?=\s[A-Z][a-z]{2}\s)
regexp=\s+(\d{10,}|[\d.,]+G)(?=\s[A-Z][a-z]{2}\s)
colours=bold red
=======
# device major minor numbers
regexp=\s(\d+),\s+(\d+)\s
colours=default,bright_yellow ,yellow
=======
# time
regexp=(\s|^)[0-2]?\d(:[0-5]\d)(?=[\s,]|$)
colours=white
# Date-Time => G1=Month G2=Day G3=Hour G4=Minutes G5=Year
regexp=([A-Z][a-z]{2})\s([ 1-3]\d)\s(?:([0-2]?\d):([0-5]\d)(?=[\s,]|$)|\s*(\d{4}))
colours=unchanged,cyan,cyan,cyan,cyan,bold magenta
=======
# month
#regexp=\s[A-Z][a-z]{2}\s
#colours=yellow
#=======
#regexp=(?<=\d):(?=\d)
#colours=bold yellow
#=======
# root
regexp=\s(root|wheel)(?=\s|$)
colours=unchanged,bold white on_red

View File

@ -1,7 +1,3 @@
# Filename
regexp=\S+\s(\S+)
colours=bold
-
# Normal
regexp=[aAcCdDeijsStTu]
colours=cyan
@ -12,8 +8,16 @@ colours=bright_green
-
# Read Only
regexp=[EhINXZ]
colours=red
colours=bold red
-
# Separators
regexp=[\-]
colours=dark
-
# Error
regexp=(lsattr:) \w.*
colours=default, bold red
-
# Filename
regexp=(\/[-\w\d. ]+)+$
colours=yellow,bold

View File

@ -11,23 +11,23 @@ regexp=\s+([├└─│]+|[\|\`\-]+)(\S+)
colours=default,default,bright_cyan
======
# Type crypt
regexp=\scrypt\s
regexp=(?<=\s)crypt\b
colours=on_magenta white
======
# Type disk
regexp=\sdisk\s
regexp=(?<=\s)disk\b
colours=magenta
======
# Type lvm
regexp=\slvm\s
regexp=(?<=\s)lvm\b
colours=bold cyan
======
# Type part
regexp=\spart\s
regexp=(?<=\s)part\b
colours=cyan
======
# Type loop
regexp=\sloop\s
regexp=(?<=\s)loop\b
colours=bright_red
======
# Size 'K'
@ -46,10 +46,14 @@ colours=red
regexp=\s\d*[.,]?\dTi?\s
colours=bold red
======
# Mount
regexp=\s\/.*$
colours=bold yellow
# Mount Path
regexp=(?<=\s)(\/[^\/ ]*)+$
colours=yellow,bold yellow
======
# Mount [SWAP]
regexp=\s\[(SWAP)\]
colours=default,bright_magenta
======
# UUID
regexp=(?<=\s)\b([0-9a-fA-F-]{4,}|[\w-]{38})\b
colours=default,dark cyan

View File

@ -3,9 +3,23 @@
regexp=^(.*) on (.*) type (.*) \((.*)\)
colours=default,green,yellow,blue,magenta
=====
regexp=^cgroup.*
colours=bright_black
=====
regexp=^tmpfs.*
-
# Devices
regexp=^(\/[^\/ ]+)+
colours=bold green, on_green black
-
# Mount Path
regexp=(?<=on )(\/[^\/ ]+)+
colours=unchanged,underline yellow
-
# RW
regexp=(?<=\()rw
colours=bold red
-
# RO
regexp=(?<=\()ro
colours=bold green
-
# Like comment, leave at end always
regexp=^(cgroup|tmpfs).*
colours=bright_black

View File

@ -1,19 +0,0 @@
#/full/path
regexp=\s/[-\w\d.]+(\s|/[-\w\d./]+)
colours=cyan
=======
#filesystem
regexp=^\w+\s
colours=yellow
=======
#type filesystem
#regexp=(?<=type)\s*
#colours=red
#=======
# /dev/sda
regexp=^(/dev/)?[s]d[a-f][0-9]*(?=[^\w\d]|$)
colours=bold green
=======
#mount options
regexp=(?<=[,(])[^,]*(?=[,)])
colours=green

View File

@ -2,9 +2,9 @@
regexp=\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}
colours=green
=======
# %
regexp=[0-9]{1,2}\.\d{1}%
colours=yellow
# 0 Full Line | 1 Loss | 2 Snt | 3 Last | 4 Avg | 5 Best | 6 Worst | 7 stDev
regexp=(\d+\.\d%)\s+(\d+)\s+(\d+\.\d)\s+(\d+\.\d)\s+(\d+\.\d)\s+(\d+\.\d)\s+(\d+\.\d)$
colours=unchanged,yellow,unchanged,unchanged,blue,green,red,unchanged
=======
# unknow host
regexp=\?\?\?

View File

@ -1,52 +1,51 @@
# name
regexp=(?:[fF]rom|PING)\s(\S+)\s
colours=default,blue
# IP
regexp=\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}
colours=bright_blue
=======
# ipv6 number
regexp=(([0-9a-fA-F]{1,4})?\:\:?[0-9a-fA-F]{1,4})+
colours=magenta
=======
# ip number, optional port
regexp=\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(\:[0-9]{1,5})?
colours=bright_blue
=======
# icmp_[sr]eq=#
regexp=icmp_[sr]eq=(\d+)
# icmp_seq=##
regexp=icmp_seq=(\d+)
colours=default,yellow
=======
# ttl=#
regexp=ttl=(\d+)
colours=default,magenta
=======
# name
regexp=(?:[fF]rom|PING)\s(\S+)\s
colours=default,blue
=======
# time
regexp=([0-9\.]+)\s?ms
colours=default,green
colours=green,bold green
=======
# DUP
regexp=DUP\!
colours=red
=======
# Destination Host Unreachable
regexp=Destination Host Unreachable
# OK
regexp=0% packet loss
colours=green
=======
# Errors
regexp=(Destination Host Unreachable|100% packet loss)
colours=red
=======
# unknown host
regexp=.+unknown\shost\s(.+)
colours=red,bold red
-
# statustics header
regexp=--- \S+ ping statistics ---
colours=bold
# statistics header
regexp=--- (\S+) ping statistics ---
colours=bold, bold blue
-
# last line min/avg/max/mdev
regexp=(min)/(avg)/(max)/(mdev)
regexp=rtt (min)/(avg)/(max)/(mdev)
colours=default,bright_yellow,bright_blue,bright_red,bright_magenta
-
# last line values
regexp=\=\s([0-9\.\ mus]+)\/([0-9\. mus]+)\/([0-9\. mus]+)\/([0-9\. mus]+)
regexp=\=\s([0-9\.]+)\/([0-9\.]+)\/([0-9\.]+)\/([0-9\.]+)
colours=default,bright_yellow,bright_blue,bright_red,bright_magenta
-
# these are good for nping
regexp=SENT|RCVD
colours=red
-
# nping
regexp=unreachable
colours=red

View File

@ -1,6 +1,6 @@
# hostname
regexp=\s\w+[\w\-\.]+\w+
colours=bright_yellow
colours=bold white
count=once
-
# ip number

View File

@ -10,13 +10,11 @@ set -U grc_plugin_execs cat cvs df diff dig gcc g++ ls ifconfig \
make mount mtr netstat ping ps tail traceroute \
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 tune2fs \
tcpdump tune2fs \
vmstat w who
fdisk findmnt free semanage sar ss sysctl systemctl stat showmount \
tcpdump tune2fs vmstat w who
for executable in $grc_plugin_execs
if type -q $executable
alias $executable "grc $executable"
end
end