All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 3m35s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 3m57s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 3m11s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 3m39s
CI / Packaging test (push) Successful in 0s
Relabel the toplevel command CmdPkg from "pkg" to "packages", because it rolls off the tounge much more nicely. Keep "pkg" as an alias for compatibilty. Signed-off-by: Jan Lindemann <jan@janware.com>
29 lines
667 B
Python
29 lines
667 B
Python
from __future__ import annotations
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
from .Cmd import Cmd, Parent
|
|
|
|
if TYPE_CHECKING:
|
|
from argparse import ArgumentParser
|
|
|
|
class CmdPkg(Cmd): # export
|
|
|
|
def __init__(self, parent: Parent) -> None:
|
|
super().__init__(
|
|
parent,
|
|
'packages',
|
|
aliases = ['pkg'],
|
|
help = 'System package manager wrapper'
|
|
)
|
|
self.load_subcommands()
|
|
|
|
async def _run(self, args):
|
|
import sys
|
|
|
|
# Missing subcommand
|
|
self.parser.print_help()
|
|
sys.exit(1)
|
|
|
|
def add_arguments(self, parser: ArgumentParser) -> None:
|
|
super().add_arguments(parser)
|