File tree 1 file changed +0
-38
lines changed
1 file changed +0
-38
lines changed Original file line number Diff line number Diff line change @@ -14,44 +14,6 @@ import (
14
14
"github.com/coder/serpent"
15
15
)
16
16
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
-
55
17
type SelectOptions struct {
56
18
Options []string
57
19
// Default will be highlighted first if it's a valid option.
You can’t perform that action at this time.
0 commit comments