From 28aa676b742fe73abc92bff652b16d5740ed29ff Mon Sep 17 00:00:00 2001 From: "Bouteiller [a2n] Alan" Date: Tue, 17 Jun 2025 12:08:46 +0200 Subject: [PATCH] Add sh script for dockolor --- plugins/dockolor/README.md | 49 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 plugins/dockolor/README.md diff --git a/plugins/dockolor/README.md b/plugins/dockolor/README.md new file mode 100644 index 000000000..6b6669e8a --- /dev/null +++ b/plugins/dockolor/README.md @@ -0,0 +1,49 @@ +# 🐳 dockolor.zsh – Colorized `docker ps` Output for Zsh + +**dockolor** is a lightweight Zsh plugin that enhances your `docker ps` experience with color-coded output based on container status. It also replaces common aliases like `dps` and `dpsa` if defined. + +## Features + +- Colors container statuses: + - 🟢 **Up / Running** — Green + - 🟡 **Paused** — Yellow + - 🔴 **Exited / Dead** — Red +- Preserves the original Docker `ps` output, just adds color. +- Replaces `dps` and `dpsa` aliases (from the `docker` plugin) with colored versions. +- Falls back gracefully if `awk` is not installed. + +## Installation + +### Oh My Zsh + +Simply add `dockolor` in you plugin list + +``` +plugins=(... dockolor) +``` + +Reload your shell: + +``` +source ~/.zshrc +``` + +### Any other way + +- Copy or clone the `dockolor.plugin.zsh` file +- Source it in your `.zshrc` or `.bashrc` +- Use the `dockolor` command in place of the `docker ps` command +- You can also add an alias, something like `alias dps = dockolor` + +Reload your shell: + +``` +source ~/.zshrc +``` + +## Usage + +- `dockolor` — Same as `docker ps --no-trunc`, but colorized. +- `dps` — Replaced with `dockolor_dps`, with color. +- `dpsa` — Replaced with `dockolor_dps -a`, showing all containers, with color. +