mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-12 15:34:50 +08:00
- add plugin file: plugins/container/container.plugin.zsh - add completions file: plugins/container/completions/_container - add README for plugin - justify aliases and include usage notes in README |
||
|---|---|---|
| .. | ||
| completions | ||
| container.plugin.zsh | ||
| README.md | ||
Container Plugin
This plugin provides autocompletion and aliases for Apple's container tool - a tool for creating and running Linux containers using lightweight virtual machines on macOS with Apple silicon.
Usage
To use this plugin, add container to the plugins array in your ~/.zshrc file:
plugins=(... container)
Requirements
- macOS 26 or later
- Apple silicon Mac
- Apple container tool installed
Aliases
Core Commands
cb→container buildccr→container createcst→container startcsp→container stopck→container killcdl→container deletecrm→container deletecls→container listclsa→container list -acex→container execcexit→container exec -itclo→container logsclof→container logs -fcin→container inspectcr→container runcrit→container run -itcrd→container run -d
Image Management
cils→container image listcipl→container image pullcips→container image pushcisv→container image savecild→container image loadcitg→container image tagcirm→container image deletecipr→container image pruneciin→container image inspect
Builder Management
cbst→container builder startcbsp→container builder stopcbss→container builder statuscbrm→container builder delete
Network Management (macOS 26+)
cncr→container network createcnrm→container network deletecnls→container network listcnin→container network inspect
Volume Management
cvcr→container volume createcvrm→container volume deletecvls→container volume listcvin→container volume inspect
Registry Management
crli→container registry logincrlo→container registry logout
System Management
csst→container system startcssp→container system stopcsss→container system statuscslo→container system logscske→container system kernel setcspl→container system property listcspg→container system property getcsps→container system property setcspc→container system property clear
Autocompletion
The plugin provides comprehensive autocompletion for:
- All container commands and subcommands
- Container IDs (running, stopped, or all)
- Image names and tags
- Network names
- Volume names
- Command-specific options and flags
- File paths for relevant commands
Installation
If you're using Oh My Zsh with custom plugins:
-
Clone or copy this plugin to your custom plugins directory:
cp -r container ~/.oh-my-zsh/custom/plugins/ -
Add
containerto your plugins list in~/.zshrc:plugins=(... container) -
Restart your shell or run:
source ~/.zshrc
Contributing
This plugin is based on the official Apple container command reference. If you find any issues or missing completions, please report them or submit a pull request.
License
This plugin is released under the same license as Oh My Zsh.