1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Add more 'man page' like functionality

This commit is contained in:
Sean Smith
2019-05-24 00:06:10 -04:00
parent 9a877b5e04
commit d8f337884f
8 changed files with 109 additions and 14 deletions

View File

@@ -3,9 +3,9 @@ package help
import (
"fmt"
//"github.com/wtfutil/wtf/cfg"
"github.com/olebedev/config"
"github.com/wtfutil/wtf/maker"
"github.com/wtfutil/wtf/utils"
)
func Display(moduleName string, config *config.Config) {
@@ -18,5 +18,8 @@ func Display(moduleName string, config *config.Config) {
func helpFor(moduleName string, config *config.Config) string {
widget := maker.MakeWidget(nil, nil, moduleName, moduleName, config, config)
return widget.HelpText()
result := ""
result += utils.StripColorTags(widget.HelpText())
result += widget.ConfigText()
return result
}