Switch for command and options

This commit is contained in:
Dimitris Zlatanidis 2023-03-28 19:56:14 +03:00
parent 6cabb03da8
commit 1fb1f64bd9

View file

@ -21,7 +21,7 @@ class Usage(Configs):
""" Prints the minimal help menu. """
print(message)
args: str = (
f'\nUsage: {self.prog_name} [{self.yellow}OPTIONS{self.endc}] [{self.cyan}COMMAND{self.endc}] '
f'\nUsage: {self.prog_name} [{self.cyan}COMMAND{self.endc}] [{self.yellow}OPTIONS{self.endc}]'
f'[FILELIST|PACKAGES...]\n'
f"\nTry '{self.prog_name} --help' for more options.\n")
@ -31,7 +31,7 @@ class Usage(Configs):
def help_short(self, status: int) -> NoReturn:
""" Prints the short menu. """
args = (
f'Usage: {self.prog_name} [{self.yellow}OPTIONS{self.endc}] [{self.cyan}COMMAND{self.endc}] '
f'Usage: {self.prog_name} [{self.cyan}COMMAND{self.endc}] [{self.yellow}OPTIONS{self.endc}] '
f'[FILELIST|PACKAGES...]\n'
f'\n slpkg [{self.cyan}COMMAND{self.endc}] [-u, update, -U, upgrade, -c, check-updates]\n'
f' slpkg [{self.cyan}COMMAND{self.endc}] [-L, clean-logs, -T, clean-data, -D, clean-tmp, -g, configs]\n'
@ -51,8 +51,8 @@ class Usage(Configs):
def help(self, status: int) -> NoReturn:
""" Prints the main menu. """
args: str = (
f'{self.bold}USAGE:{self.endc} {self.prog_name} [{self.yellow}OPTIONS{self.endc}] '
f'[{self.cyan}COMMAND{self.endc}] [FILELIST|PACKAGES...]\n'
f'{self.bold}USAGE:{self.endc} {self.prog_name} [{self.cyan}COMMAND{self.endc}] '
f'[{self.yellow}OPTIONS{self.endc}] [FILELIST|PACKAGES...]\n'
f'\n{self.bold}DESCRIPTION:{self.endc} Package manager utility for Slackware.\n'
f'\n{self.bold}COMMANDS:{self.endc}\n'
f' {self.red}-u, update{self.endc} Update the package lists.\n'