Fix docker colors, add search, network, version commands

This commit is contained in:
Isaias Pina 2016-05-14 00:20:54 -05:00
parent 71c6c70965
commit c74e2e0ccb
8 changed files with 148 additions and 25 deletions

View File

@ -1,15 +1,23 @@
# IMAGE
regexp=^(?!NAME)(\S+)\s+(\S+)\s+(\S+)
regexp=^(?!NAME|error)(\S+)\s+(\S+)\s+(\S+)
colours=default,bold yellow,bold black,cyan
======
# Running
regexp=\sRunning\s
colours=bold green
======
# Exited
# Stopped
regexp=\sStopped\s
colours=bold red
# PORTS
======
# Error
regexp=\sError\s
colours=red
======
# PORTS
regexp=((?:\d{1,3}\.){3}\d{1,3}):(\d+)
colours=default,blue,bold blue
======
# Error Line
regexp=^error\s(?:\w+\s)+([a-z\-_0-9]+):(.*)$
colours=red,yellow,bold red

View File

@ -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+)
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
regexp=^<none>.*$
colours=bold red
=====
# Size 'K'
regexp=\s\d*[.,]?\d\sKB?
regexp=\s\d*[\.,]?\d*\s(KB?|B)
colours=green
======
# Size 'M'
regexp=\s\d*[.,]?\d\sMB?
regexp=\s\d*[\.,]?\d*\sMB?
colours=yellow
======
# 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

View File

@ -1,7 +1,19 @@
# Values
regexp=^([^:]+):\s(.*)$
# Main Nodes
regexp=^(\S[^:]+):\s(.*)$
colours=default,cyan
======
# Names & IP
regexp=^\s([^:]+):\s((?:\d{1,3}\.){3}\d{1,3}):(\d+)
colours=default,bold yellow,blue,bold blue
# Sub Nodes
regexp=^\s([^:]+):\s(.*)$
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
View 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

View File

@ -1,18 +1,30 @@
# IMAGE
regexp=^(?!CONTAINER)(\w+)\s+([^\s]+)\s+(".*")\s+(.*(?=(?:Up|Exited)))
colours=default,bold black,bold white,bold black,cyan
# HEADERS
regexp=(?:\s|^)(CONTAINER ID|IMAGE|COMMAND|CREATED|STATUS|PORTS|NAMES)(?:\s|$)
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+)?
colours=bold green
======
# Exited
# Statuses - Exited
regexp=\sExited\s.(\d+).\s.+ago
colours=bold red,red
# PORTS
======
regexp=(?:\d{1,3}\.){3}\d{1,3}[^\s]*
colours=bold blue
# Statuses - Restarting
regexp=\sRestarting\s.(\d+).\s.+ago
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
regexp=(?:([a-z\-_0-9]+)/)*([a-z\-_0-9]+)$

27
conf.dockersearch Normal file
View 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
View 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

View File

@ -82,22 +82,28 @@ conf.mount
(^|[/\w\.]+/)df\s?
conf.df
# docker ps
# docker -----------------------------
(^|[/\w\.]+/)docker ps\s?
conf.dockerps
# docker images
(^|[/\w\.]+/)docker images\s?
conf.dockerimages
# docker-machine
(^|[/\w\.]+/)docker search\s?
conf.dockersearch
(^|[/\w\.]+/)docker-machine ls\s?
conf.docker-machinels
# docker info
(^|[/\w\.]+/)docker network ls\s?
conf.dockernetwork
(^|[/\w\.]+/)docker info\s?
conf.dockerinfo
(^|[/\w\.]+/)docker version\s?
conf.dockerversion
# journalctl command
(^|[/\w\.]+/)journalctl?\s
conf.log