mirror of
https://github.com/Neocky/pluGET.git
synced 2024-04-29 16:12:30 +00:00
Added new help command
- added new help command - fixed some formating issues
This commit is contained in:
@@ -3,6 +3,7 @@ Handles the input through the pluGET command line
|
||||
"""
|
||||
|
||||
from src.utils.console_output import rich_print_error
|
||||
from src.utils.utilities import get_command_help
|
||||
from src.plugin.plugin_remover import delete_plugin
|
||||
from src.plugin.plugin_downloader import get_specific_plugin_spiget, search_specific_plugin_spiget
|
||||
from src.plugin.plugin_updatechecker import check_installed_plugins, update_installed_plugins
|
||||
@@ -22,6 +23,7 @@ from src.serverjar.serverjar_purpur import serverjar_purpur_update
|
||||
# exit
|
||||
# remove
|
||||
# search
|
||||
# help
|
||||
|
||||
|
||||
def handle_input(
|
||||
@@ -86,11 +88,13 @@ def handle_input(
|
||||
search_specific_plugin_spiget(input_selected_object)
|
||||
case "remove":
|
||||
delete_plugin(input_selected_object)
|
||||
case "help":
|
||||
get_command_help(input_selected_object)
|
||||
case "exit":
|
||||
return
|
||||
case _:
|
||||
rich_print_error("Error: Command not found. Please try again. :(")
|
||||
rich_print_error("Use: 'help command' to get all available commands")
|
||||
rich_print_error("Use [bright_blue]'help all' [bright_red]to get a list of all available commands.")
|
||||
|
||||
# return to break out of while loop if pluGET was started with arguments from console
|
||||
if arguments_from_console:
|
||||
@@ -117,7 +121,7 @@ def get_input() -> str:
|
||||
continue
|
||||
else:
|
||||
rich_print_error("Wrong input! Use: > 'command' 'selectedObject' [optionalParams]")
|
||||
rich_print_error("Use: 'help command' to get all available commands")
|
||||
rich_print_error("Use: [bright_blue]'help all' [bright_red]to get a list of all available commands.")
|
||||
except KeyboardInterrupt:
|
||||
return
|
||||
input_parameter = input_parameter[0] if input_parameter else None
|
||||
|
Reference in New Issue
Block a user