mirror of
https://github.com/garabik/grc.git
synced 2024-09-30 17:51:30 +02:00
Fix docker colors, add search, network, version commands
This commit is contained in:
parent
71c6c70965
commit
c74e2e0ccb
@ -1,15 +1,23 @@
|
|||||||
# IMAGE
|
# IMAGE
|
||||||
regexp=^(?!NAME)(\S+)\s+(\S+)\s+(\S+)
|
regexp=^(?!NAME|error)(\S+)\s+(\S+)\s+(\S+)
|
||||||
colours=default,bold yellow,bold black,cyan
|
colours=default,bold yellow,bold black,cyan
|
||||||
======
|
======
|
||||||
# Running
|
# Running
|
||||||
regexp=\sRunning\s
|
regexp=\sRunning\s
|
||||||
colours=bold green
|
colours=bold green
|
||||||
======
|
======
|
||||||
# Exited
|
# Stopped
|
||||||
regexp=\sStopped\s
|
regexp=\sStopped\s
|
||||||
colours=bold red
|
colours=bold red
|
||||||
# PORTS
|
|
||||||
======
|
======
|
||||||
|
# Error
|
||||||
|
regexp=\sError\s
|
||||||
|
colours=red
|
||||||
|
======
|
||||||
|
# PORTS
|
||||||
regexp=((?:\d{1,3}\.){3}\d{1,3}):(\d+)
|
regexp=((?:\d{1,3}\.){3}\d{1,3}):(\d+)
|
||||||
colours=default,blue,bold blue
|
colours=default,blue,bold blue
|
||||||
|
======
|
||||||
|
# Error Line
|
||||||
|
regexp=^error\s(?:\w+\s)+([a-z\-_0-9]+):(.*)$
|
||||||
|
colours=red,yellow,bold red
|
||||||
|
@ -1,19 +1,43 @@
|
|||||||
# REPO, TAG
|
# HEADERS
|
||||||
|
regexp=(?:\s|^)(REPOSITORY|TAG|IMAGE ID|CREATED|SIZE)(?:\s|$)
|
||||||
|
colours=default,underline
|
||||||
|
=====
|
||||||
|
# REPO, TAG, IMAGE ID
|
||||||
regexp=^([a-z]+\/?[^\s]+)\s+([^\s]+)\s+(\w+)
|
regexp=^([a-z]+\/?[^\s]+)\s+([^\s]+)\s+(\w+)
|
||||||
colours=default,bold white,cyan,bold black
|
colours=default,bold white,bright_cyan,bright_black
|
||||||
|
=====
|
||||||
|
# latest
|
||||||
|
regexp=\s+(latest)\s+
|
||||||
|
colours=unchanged,cyan
|
||||||
|
=====
|
||||||
|
# REPOSITORY (Image name)
|
||||||
|
regexp=^(?:([a-z\-_0-9]+)/)*([a-z\-_0-9]+)\s
|
||||||
|
colours=default,yellow,bright_white
|
||||||
=====
|
=====
|
||||||
# images without name
|
# images without name
|
||||||
regexp=^<none>.*$
|
regexp=^<none>.*$
|
||||||
colours=bold red
|
colours=bold red
|
||||||
=====
|
=====
|
||||||
# Size 'K'
|
# Size 'K'
|
||||||
regexp=\s\d*[.,]?\d\sKB?
|
regexp=\s\d*[\.,]?\d*\s(KB?|B)
|
||||||
colours=green
|
colours=green
|
||||||
======
|
======
|
||||||
# Size 'M'
|
# Size 'M'
|
||||||
regexp=\s\d*[.,]?\d\sMB?
|
regexp=\s\d*[\.,]?\d*\sMB?
|
||||||
colours=yellow
|
colours=yellow
|
||||||
======
|
======
|
||||||
# Size 'G'
|
# Size 'G'
|
||||||
regexp=\s\d*[.,]?\d\sGB?
|
regexp=\s\d*[\.,]?\d*\sGB?
|
||||||
|
colours=red
|
||||||
|
=====
|
||||||
|
# CREATED days
|
||||||
|
regexp=\s+\d+\sdays\s\w+
|
||||||
|
colours=green
|
||||||
|
======
|
||||||
|
# CREATED weeks
|
||||||
|
regexp=\s+\d+\sweeks\s\w+
|
||||||
|
colours=yellow
|
||||||
|
======
|
||||||
|
# CREATED months
|
||||||
|
regexp=\s+\d+\smonths\s\w+
|
||||||
colours=red
|
colours=red
|
||||||
|
@ -1,7 +1,19 @@
|
|||||||
# Values
|
# Main Nodes
|
||||||
regexp=^([^:]+):\s(.*)$
|
regexp=^(\S[^:]+):\s(.*)$
|
||||||
colours=default,cyan
|
colours=default,cyan
|
||||||
======
|
======
|
||||||
# Names & IP
|
# Sub Nodes
|
||||||
regexp=^\s([^:]+):\s((?:\d{1,3}\.){3}\d{1,3}):(\d+)
|
regexp=^\s([^:]+):\s(.*)$
|
||||||
colours=default,bold yellow,blue,bold blue
|
colours=default,magenta
|
||||||
|
======
|
||||||
|
# Warning
|
||||||
|
regexp=WARNING:\s(.+)$
|
||||||
|
colours=bold yellow, yellow
|
||||||
|
======
|
||||||
|
# devicemapper
|
||||||
|
regexp=devicemapper$
|
||||||
|
colours=bright_red
|
||||||
|
-
|
||||||
|
# loop-lvm
|
||||||
|
regexp=: (/var/lib/docker/devicemapper/devicemapper/(?:meta)?data)
|
||||||
|
colours=default,bright_red
|
||||||
|
23
conf.dockernetwork
Normal file
23
conf.dockernetwork
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# HEADERS
|
||||||
|
regexp=(?:\s|^)(NETWORK ID|NAME|DRIVER)(?:\s|$)
|
||||||
|
colours=default,underline
|
||||||
|
-
|
||||||
|
# Line
|
||||||
|
regexp=^(?!NETWORK)(\S+)\s+(\S+)
|
||||||
|
colours=default,green,bright_blue
|
||||||
|
-
|
||||||
|
# Bridge
|
||||||
|
regexp=bridge\s+$
|
||||||
|
colours=cyan
|
||||||
|
-
|
||||||
|
# host
|
||||||
|
regexp=host\s+$
|
||||||
|
colours=bright_cyan
|
||||||
|
-
|
||||||
|
# overlay
|
||||||
|
regexp=overlay\s+$
|
||||||
|
colours=magenta
|
||||||
|
-
|
||||||
|
# null
|
||||||
|
regexp=null\s+$
|
||||||
|
colours=red
|
@ -1,19 +1,31 @@
|
|||||||
# IMAGE
|
# HEADERS
|
||||||
regexp=^(?!CONTAINER)(\w+)\s+([^\s]+)\s+(".*")\s+(.*(?=(?:Up|Exited)))
|
regexp=(?:\s|^)(CONTAINER ID|IMAGE|COMMAND|CREATED|STATUS|PORTS|NAMES)(?:\s|$)
|
||||||
colours=default,bold black,bold white,bold black,cyan
|
colours=default,underline
|
||||||
======
|
======
|
||||||
# Up
|
# IMAGE
|
||||||
|
regexp=^(?!CONTAINER)(\w+)\s+([^\s]+)\s+(".*")\s+(.*(?=(?:Up|Exited|Created|Restarting)))
|
||||||
|
colours=default,bright_black,bold white,bright_black,cyan
|
||||||
|
======
|
||||||
|
# Statuses - Created
|
||||||
|
regexp=\sCreated\s
|
||||||
|
colours=blue
|
||||||
|
======
|
||||||
|
# Statuses - Up / Restarting
|
||||||
regexp=\sUp\s(\d+|\w+)\s\w+(?:\s\w+)?
|
regexp=\sUp\s(\d+|\w+)\s\w+(?:\s\w+)?
|
||||||
colours=bold green
|
colours=bold green
|
||||||
======
|
======
|
||||||
# Exited
|
# Statuses - Exited
|
||||||
regexp=\sExited\s.(\d+).\s.+ago
|
regexp=\sExited\s.(\d+).\s.+ago
|
||||||
colours=bold red,red
|
colours=bold red,red
|
||||||
# PORTS
|
|
||||||
======
|
======
|
||||||
regexp=(?:\d{1,3}\.){3}\d{1,3}[^\s]*
|
# Statuses - Restarting
|
||||||
|
regexp=\sRestarting\s.(\d+).\s.+ago
|
||||||
colours=bold blue
|
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=default,blue,default,bright_green,bright_blue,default
|
||||||
|
======
|
||||||
# NAMES
|
# NAMES
|
||||||
regexp=(?:([a-z\-_0-9]+)/)*([a-z\-_0-9]+)$
|
regexp=(?:([a-z\-_0-9]+)/)*([a-z\-_0-9]+)$
|
||||||
colours=default,yellow,bold yellow
|
colours=default,yellow,bold yellow
|
||||||
|
27
conf.dockersearch
Normal file
27
conf.dockersearch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# NAMES
|
||||||
|
regexp=^(?:([a-z\-_0-9]+)\/)*(\S+)\s(?!DESCRIPTION)
|
||||||
|
colours=default,yellow,bold yellow
|
||||||
|
-
|
||||||
|
# Title
|
||||||
|
regexp=^NAME.*
|
||||||
|
colours=default
|
||||||
|
-
|
||||||
|
# Oficial
|
||||||
|
regexp=\[OK\](?!$)
|
||||||
|
colours=bold green
|
||||||
|
-
|
||||||
|
# Automated
|
||||||
|
regexp=\[OK\]$
|
||||||
|
colours=magenta
|
||||||
|
-
|
||||||
|
# 1 digit Star
|
||||||
|
regexp=\s{3,}(\d)\s{3,}
|
||||||
|
colours=red
|
||||||
|
-
|
||||||
|
# 2 digits Stars
|
||||||
|
regexp=\s{3,}(\d{2})\s{3,}
|
||||||
|
colours=yellow
|
||||||
|
-
|
||||||
|
# 3 digits Stars
|
||||||
|
regexp=\s{3,}(\d{3,})\s{3,}
|
||||||
|
colours=green
|
11
conf.dockerversion
Normal file
11
conf.dockerversion
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Values
|
||||||
|
regexp=^\s([^:]+):(.+)$
|
||||||
|
colours=default,cyan
|
||||||
|
======
|
||||||
|
# Client
|
||||||
|
regexp=^(Client):
|
||||||
|
colours=default,bold cyan
|
||||||
|
======
|
||||||
|
# Server
|
||||||
|
regexp=^(Server):
|
||||||
|
colours=default,bold green
|
14
grc.conf
14
grc.conf
@ -82,22 +82,28 @@ conf.mount
|
|||||||
(^|[/\w\.]+/)df\s?
|
(^|[/\w\.]+/)df\s?
|
||||||
conf.df
|
conf.df
|
||||||
|
|
||||||
# docker ps
|
# docker -----------------------------
|
||||||
(^|[/\w\.]+/)docker ps\s?
|
(^|[/\w\.]+/)docker ps\s?
|
||||||
conf.dockerps
|
conf.dockerps
|
||||||
|
|
||||||
# docker images
|
|
||||||
(^|[/\w\.]+/)docker images\s?
|
(^|[/\w\.]+/)docker images\s?
|
||||||
conf.dockerimages
|
conf.dockerimages
|
||||||
|
|
||||||
# docker-machine
|
(^|[/\w\.]+/)docker search\s?
|
||||||
|
conf.dockersearch
|
||||||
|
|
||||||
(^|[/\w\.]+/)docker-machine ls\s?
|
(^|[/\w\.]+/)docker-machine ls\s?
|
||||||
conf.docker-machinels
|
conf.docker-machinels
|
||||||
|
|
||||||
# docker info
|
(^|[/\w\.]+/)docker network ls\s?
|
||||||
|
conf.dockernetwork
|
||||||
|
|
||||||
(^|[/\w\.]+/)docker info\s?
|
(^|[/\w\.]+/)docker info\s?
|
||||||
conf.dockerinfo
|
conf.dockerinfo
|
||||||
|
|
||||||
|
(^|[/\w\.]+/)docker version\s?
|
||||||
|
conf.dockerversion
|
||||||
|
|
||||||
# journalctl command
|
# journalctl command
|
||||||
(^|[/\w\.]+/)journalctl?\s
|
(^|[/\w\.]+/)journalctl?\s
|
||||||
conf.log
|
conf.log
|
||||||
|
Loading…
Reference in New Issue
Block a user