Skip to content

A zsh plugin for List all the custom service and docker container.

License

Notifications You must be signed in to change notification settings

jarlor/zsh-myservice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

zsh-myservice

zsh-myservice is a zsh plugin designed to help you manage custom systemd services and Docker containers more conveniently. This plugin provides user-friendly commands to list and check the status of your custom services and Docker containers straight from your command line.

Features

  • List Custom Services (llcs): Displays custom systemd services with their names, statuses, and descriptions.
  • List Docker Containers (lldc): Lists Docker containers with their names, statuses, and images.

Installation

You can install zsh-myservice in a few simple steps. The installation involves cloning the plugin into your Zsh custom plugins directory and configuring .zshrc to load the plugin.

Using Oh My Zsh

  1. Clone the Repository

    First, clone the zsh-myservice repository into your custom plugins directory (e.g., ~/.oh-my-zsh/custom/plugins):

    git clone https://github.com/jarlor/zsh-myservice.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-myservice
  2. Activate the Plugin

    Open your .zshrc file and add zsh-myservice to the list of plugins:

    plugins=(... zsh-myservice)
  3. Source the .zshrc file

    Apply the changes by sourcing your .zshrc file:

    source ~/.zshrc

    Now, the zsh-myservice plugin should be active.

Usage

Once the plugin is installed and active, you can use the following commands:

  • llcs: Lists custom systemd services with their names, statuses, and descriptions.

    llcs

    Example Output:

    Custom Services:
    ----------------
    Service                  Status          Description
    myservice                active          My custom service description
    another-service          inactive        Another custom service description
    
  • lldc: Lists Docker containers with their names, statuses, and images.

    lldc

    Example Output:

    Docker Containers:
    ------------------
    NAMES                STATUS                    IMAGE
    mydocker1            Up 3 minutes              ubuntu:latest
    mydocker2            Exited (0) 5 minutes ago  nginx:latest
    

Custom Service Directory

If your custom services are not in the default directory (/root/.service), the plugin will prompt you to specify the custom service directory. Once specified, the directory is saved in a configuration file for future use.

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A zsh plugin for List all the custom service and docker container.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages