Skip to content

Commit 92d93e0

Browse files
committed
chore: revert to default survey templates
1 parent eb9cfe1 commit 92d93e0

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

cli/cliui/select.go

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -14,44 +14,6 @@ import (
1414
"github.com/coder/serpent"
1515
)
1616

17-
func init() {
18-
survey.SelectQuestionTemplate = `
19-
{{- define "option"}}
20-
{{- " " }}{{- if eq .SelectedIndex .CurrentIndex }}{{color "green" }}{{ .Config.Icons.SelectFocus.Text }} {{else}}{{color "default"}} {{end}}
21-
{{- .CurrentOpt.Value}}
22-
{{- color "reset"}}
23-
{{end}}
24-
25-
{{- if not .ShowAnswer }}
26-
{{- if .Config.Icons.Help.Text }}
27-
{{- if .FilterMessage }}{{ "Search:" }}{{ .FilterMessage }}
28-
{{- else }}
29-
{{- color "black+h"}}{{- "Type to search" }}{{color "reset"}}
30-
{{- end }}
31-
{{- "\n" }}
32-
{{- end }}
33-
{{- "\n" }}
34-
{{- range $ix, $option := .PageEntries}}
35-
{{- template "option" $.IterateOption $ix $option}}
36-
{{- end}}
37-
{{- end }}`
38-
39-
survey.MultiSelectQuestionTemplate = `
40-
{{- define "option"}}
41-
{{- if eq .SelectedIndex .CurrentIndex }}{{color .Config.Icons.SelectFocus.Format }}{{ .Config.Icons.SelectFocus.Text }}{{color "reset"}}{{else}} {{end}}
42-
{{- if index .Checked .CurrentOpt.Index }}{{color .Config.Icons.MarkedOption.Format }} {{ .Config.Icons.MarkedOption.Text }} {{else}}{{color .Config.Icons.UnmarkedOption.Format }} {{ .Config.Icons.UnmarkedOption.Text }} {{end}}
43-
{{- color "reset"}}
44-
{{- " "}}{{- .CurrentOpt.Value}}
45-
{{end}}
46-
{{- if .ShowHelp }}{{- color .Config.Icons.Help.Format }}{{ .Config.Icons.Help.Text }} {{ .Help }}{{color "reset"}}{{"\n"}}{{end}}
47-
{{- if not .ShowAnswer }}
48-
{{- "\n"}}
49-
{{- range $ix, $option := .PageEntries}}
50-
{{- template "option" $.IterateOption $ix $option}}
51-
{{- end}}
52-
{{- end}}`
53-
}
54-
5517
type SelectOptions struct {
5618
Options []string
5719
// Default will be highlighted first if it's a valid option.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy