2
0
Fork 0
mirror of https://github.com/garabik/grc.git synced 2024-11-15 14:48:26 +01:00
bash-color-grc/conf.dockerps

35 lines
1.2 KiB
Text
Raw Normal View History

# 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|$)
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
======
# Statuses
# https://github.com/docker/docker/blob/e5a3f86e447dd659da3c2e759f3c088a0bfcfe3d/container/state.go#L40
# Up
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
=======
# 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