Show shortcut mappings in help screen [skip ci]

This commit is contained in:
Elara 2020-11-27 19:06:05 -08:00
parent dbd6a3162d
commit fb89448324
2 changed files with 3 additions and 3 deletions

View File

@ -119,7 +119,7 @@ func main() {
// Displays help message if no arguments provided or -h/--help is passed
if len(args) == 0 || Contains(args, "-h") || Contains(args, "--help") || Contains(args, "help") {
printHelpMessage(packageManagerCommand, useRootBool, rootCommand, commands, shortcuts, isOverridden)
printHelpMessage(packageManagerCommand, useRootBool, rootCommand, commands, shortcuts, shortcutMappings, isOverridden)
os.Exit(0)
}

View File

@ -6,7 +6,7 @@ import (
)
// Print help screen
func printHelpMessage(packageManagerCommand string, useRootBool bool, rootCommand string, commands []string, shortcuts []string, isOverridden bool) {
func printHelpMessage(packageManagerCommand string, useRootBool bool, rootCommand string, commands []string, shortcuts []string, shortcutMappings []string, isOverridden bool) {
fmt.Println("Arsen Musayelyan's Package Manager Wrapper")
fmt.Print("Current package manager is: ", packageManagerCommand)
if isOverridden { fmt.Println(" (overridden)") } else { fmt.Print("\n") }
@ -19,7 +19,7 @@ func printHelpMessage(packageManagerCommand string, useRootBool bool, rootComman
fmt.Println(strings.Join(commands, "\n"))
fmt.Println()
fmt.Println("The available shortcuts are:")
fmt.Println(strings.Join(shortcuts, "\n"))
for index, element := range shortcuts { fmt.Println(element + ":", shortcutMappings[index]) }
fmt.Println()
fmt.Println("The available flags are:")
fmt.Println("--help, -h: Shows this help screen")