func (u *UI) Hint(str string, noPadding bool, label *string) {
	if !u.EnableHints {
		return
	}
	if !Attached() {
		return
	}
	if !noPadding {
		fmt.Println()
	}
	hintLabel := u.BoldString("Protip: ")
	if label != nil {
		hintLabel = u.BoldString(*label)
	}
	rc := ansiwrap.RuneCount(hintLabel)
	fmt.Fprintln(readline.Stdout, ansiwrap.WrapIndent(hintLabel+str, u.Cols, u.Indent, u.Indent+rc))
}
Hint handles the ui output for hint/onboarding messages, when enabled
package ui
import (
	"bytes"
	"fmt"
	"io"
	"os"
	"github.com/chzyer/readline"
	"github.com/manifoldco/ansiwrap"
	"github.com/manifoldco/torus-cli/prefs"
)
const (
	defaultCols = 80
	rightPad    = 2
)
var defUI *UI
func Init(preferences *prefs.Preferences) {
	enableColours := preferences.Core.EnableColors
	if !Attached() {
		enableColours = false
	}
	defUI = &UI{
		Indent: 0,
		Cols:   screenWidth(),
		EnableProgress: preferences.Core.EnableProgress,
		EnableHints:    preferences.Core.EnableHints,
		EnableColors:   enableColours,
	}
}
type UI struct {
	Indent int
	Cols int
	EnableProgress bool
	EnableHints bool
	EnableColors bool
}
func NewSpinner(text string) *Spinner {
	return defUI.NewSpinner(text)
}
func (u *UI) NewSpinner(text string) *Spinner {
	return newSpinner(text, u.EnableProgress && Attached())
}
func Line(format string, a ...interface{}) { defUI.Line(format, a...) }
func (u *UI) Line(format string, a ...interface{}) {
	u.LineIndent(0, format, a...)
}
func LineIndent(indent int, format string, a ...interface{}) { defUI.LineIndent(indent, format, a...) }
func (u *UI) LineIndent(indent int, format string, a ...interface{}) {
	o := fmt.Sprintf(format, a...)
	fmt.Fprintln(readline.Stdout, ansiwrap.WrapIndent(o, u.Cols, u.Indent, u.Indent+indent))
}
func Attached() bool {
	return readline.IsTerminal(int(os.Stdout.Fd()))
}
func Hint(str string, noPadding bool, label *string) { defUI.Hint(str, noPadding, label) }