1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2025-12-12 15:34:50 +08:00
ohmyzsh-mirror/plugins/container
Dmytro Kaliberda 853e4f4e6c
feat(container): add container plugin with completions and aliases
- 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
2025-10-01 12:57:25 +03:00
..
completions feat(container): add container plugin with completions and aliases 2025-10-01 12:57:25 +03:00
container.plugin.zsh feat(container): add container plugin with completions and aliases 2025-10-01 12:57:25 +03:00
README.md feat(container): add container plugin with completions and aliases 2025-10-01 12:57:25 +03:00

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

Aliases

Core Commands

  • cbcontainer build
  • ccrcontainer create
  • cstcontainer start
  • cspcontainer stop
  • ckcontainer kill
  • cdlcontainer delete
  • crmcontainer delete
  • clscontainer list
  • clsacontainer list -a
  • cexcontainer exec
  • cexitcontainer exec -it
  • clocontainer logs
  • clofcontainer logs -f
  • cincontainer inspect
  • crcontainer run
  • critcontainer run -it
  • crdcontainer run -d

Image Management

  • cilscontainer image list
  • ciplcontainer image pull
  • cipscontainer image push
  • cisvcontainer image save
  • cildcontainer image load
  • citgcontainer image tag
  • cirmcontainer image delete
  • ciprcontainer image prune
  • ciincontainer image inspect

Builder Management

  • cbstcontainer builder start
  • cbspcontainer builder stop
  • cbsscontainer builder status
  • cbrmcontainer builder delete

Network Management (macOS 26+)

  • cncrcontainer network create
  • cnrmcontainer network delete
  • cnlscontainer network list
  • cnincontainer network inspect

Volume Management

  • cvcrcontainer volume create
  • cvrmcontainer volume delete
  • cvlscontainer volume list
  • cvincontainer volume inspect

Registry Management

  • crlicontainer registry login
  • crlocontainer registry logout

System Management

  • csstcontainer system start
  • csspcontainer system stop
  • cssscontainer system status
  • cslocontainer system logs
  • cskecontainer system kernel set
  • csplcontainer system property list
  • cspgcontainer system property get
  • cspscontainer system property set
  • cspccontainer 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:

  1. Clone or copy this plugin to your custom plugins directory:

    cp -r container ~/.oh-my-zsh/custom/plugins/
    
  2. Add container to your plugins list in ~/.zshrc:

    plugins=(... container)
    
  3. 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.