mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-23 02:35:38 +01:00
Add sh script for dockolor
This commit is contained in:
parent
2fbdfa93f9
commit
28aa676b74
1 changed files with 49 additions and 0 deletions
49
plugins/dockolor/README.md
Normal file
49
plugins/dockolor/README.md
Normal file
|
|
@ -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.
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue