Added usage

This commit is contained in:
Dimitris Zlatanidis 2023-01-10 17:46:16 +02:00
parent dc2ab708a3
commit 9f598b51e8

View file

@ -73,5 +73,8 @@ class Usage:
def error_for_options(self, flags):
""" Error message for flags. """
raise SystemExit(f"\n{self.red}Error:{self.endc} Got an unexpected extra option, "
print(f'Usage: {Configs.prog_name} [{self.yellow}OPTIONS{self.endc}] '
f'[{self.cyan}COMMAND{self.endc}] <packages>')
print("Try 'slpkg --help' for help.\n")
raise SystemExit(f"{self.red}Error:{self.endc} Got an unexpected extra option, "
f"please use: \n{self.yellow}{', '.join(flags)}{self.endc}\n")