mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-23 02:35:38 +01:00
1.2 KiB
1.2 KiB
🐳 dockolor – Colorized docker ps Output
dockolor is a lightweight 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
psoutput, just adds color. - Replaces
dpsanddpsaaliases (from thedockerplugin) with colored versions. - Falls back gracefully if
awkis 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.zshfile - Source it in your
.zshrcor.bashrc - Use the
dockolorcommand in place of thedocker pscommand - You can also add an alias, something like:
myalias() {
dockolor "$@"
}
Reload your shell:
source ~/.zshrc
Usage
dockolor— Same asdocker ps, but colorized.dps— Replaced withdockolor_dps, same asdockolorordocker ps.dpsa— Replaced withdockolor_dps -a, same asdockolor -aordocker ps -a.