From dda20047530f5416e893507d3b538d37dfc9a99d Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Fri, 14 Oct 2022 19:28:05 -0300 Subject: [PATCH] --list: Print aliases on its own column --- help.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/help.go b/help.go index 262ab11c..e1ae8e6d 100644 --- a/help.go +++ b/help.go @@ -44,10 +44,12 @@ func (e *Executor) printTasks(listAll bool) { // Format in tab-separated columns with a tab stop of 8. w := tabwriter.NewWriter(e.Stdout, 0, 8, 6, ' ', 0) for _, task := range tasks { - taskNames := append([]string{task.Task}, task.Aliases...) e.Logger.FOutf(w, logger.Yellow, "* ") - e.Logger.FOutf(w, logger.Green, strings.Join(taskNames, "|")) + e.Logger.FOutf(w, logger.Green, task.Task) e.Logger.FOutf(w, logger.Default, ": \t%s", task.Desc) + if len(task.Aliases) > 0 { + e.Logger.FOutf(w, logger.Cyan, "\t(aliases: %s)", strings.Join(task.Aliases, ", ")) + } fmt.Fprint(w, "\n") } w.Flush()