diff --git a/session/module_param.go b/session/module_param.go index 58adb0af..ea9cb12d 100644 --- a/session/module_param.go +++ b/session/module_param.go @@ -104,6 +104,11 @@ func (p ModuleParam) Get(s *Session) (error, interface{}) { } +func (p ModuleParam) Dump(padding int) string { + return fmt.Sprintf(" "+core.YELLOW+"%"+strconv.Itoa(padding)+"s"+core.RESET+ + " : %s\n", p.Name, p.Value) +} + func (p ModuleParam) Help(padding int) string { return fmt.Sprintf(" "+core.YELLOW+"%"+strconv.Itoa(padding)+"s"+core.RESET+ " : "+ diff --git a/session/session_core_handlers.go b/session/session_core_handlers.go index 806ac52e..5479e181 100644 --- a/session/session_core_handlers.go +++ b/session/session_core_handlers.go @@ -74,15 +74,17 @@ func (s *Session) activeHandler(args []string, sess *Session) error { if m.Running() == false { continue } - fmt.Printf("[%s] %s (%s)\n", core.Green("active"), m.Name(), core.Dim(m.Description())) + + fmt.Printf("%s (%s)\n", core.Bold(m.Name()), core.Dim(m.Description())) params := m.Parameters() if len(params) > 0 { - for _, p := range params { - _, p.Value = s.Env.Get(p.Name) - fmt.Printf(" %s: '%s'\n", p.Name, core.Yellow(p.Value)) - } fmt.Println() + for _, p := range params { + fmt.Printf(p.Dump(s.HelpPadding)) + } } + + fmt.Println() } return nil