diff --git a/pkg/config/messages.go b/pkg/config/messages.go index 430a4a8..e55b4c5 100644 --- a/pkg/config/messages.go +++ b/pkg/config/messages.go @@ -7,7 +7,7 @@ import ( func colorLogo() string { cyan := color.New(color.FgCyan) - blue := color.New(color.FgBlue) + blue := color.New(color.FgHiBlue) logo := cyan.Sprint(` __ __ __ / /_/ /___/ /____ __ __ diff --git a/pkg/pages/pages.go b/pkg/pages/pages.go index 4179ef5..aefd7e2 100644 --- a/pkg/pages/pages.go +++ b/pkg/pages/pages.go @@ -18,7 +18,7 @@ var ( ext = ".md" bold = color.New(color.Bold) - blue = color.New(color.FgBlue) + blue = color.New(color.FgHiBlue) red = color.New(color.FgRed) cyan = color.New(color.FgCyan) white = color.New(color.FgWhite) diff --git a/pkg/prompt/prompt.go b/pkg/prompt/prompt.go index 5f4f929..52a24c9 100644 --- a/pkg/prompt/prompt.go +++ b/pkg/prompt/prompt.go @@ -42,9 +42,11 @@ func (p *Prompt) RenderPage(static bool) error { { Name: "Tip", Prompt: &survey.Select{ - Message: p.Page.Display() + "\n", - Options: options, - VimMode: true, + Message: p.Page.Display() + "\n", + Options: options, + VimMode: true, + PageSize: len(p.Page.Tips), + Help: "Select a command template to fill args.", }, Validate: survey.Required, }, @@ -63,7 +65,8 @@ func (p *Prompt) RenderPage(static bool) error { {{- " "}}(Use{{" "}}{{- color "cyan"}}arrows{{- color "reset"}}` + ` to move,{{" "}}{{- color "cyan"}}type{{- color "reset"}} to filter or{{" "}}` + `{{- color "red"}}ctrl+c{{- color "reset"}} to return{{- if and .Help (not .ShowHelp)}}` + - `, {{ HelpInputRune }} for more help{{end}}) + `. {{""}}{{- color "green"}}{{ HelpInputRune }}{{- color "reset"}} for more{{end}}) + {{- if .ShowHelp }}{{"\n"}}{{- color "green"}}{{ HelpIcon }}{{" "}}{{ .Help }}{{color "reset"}}{{end}} {{- "\n\n"}} {{- range $ix, $choice := .PageEntries}} {{- if eq $ix $.SelectedIndex}}{{color "blue+b"}}{{ "-" }} {{else}}{{color "default"}} {{end}} @@ -71,6 +74,7 @@ func (p *Prompt) RenderPage(static bool) error { {{- color "reset"}}{{"\n"}} {{- end}} {{- end}}` + terminal.InterruptErr = errors.New("\x0d") return nil }