Skip to content

Commit

Permalink
Upgraded survey
Browse files Browse the repository at this point in the history
  • Loading branch information
shyiko committed Apr 29, 2018
1 parent 34ae9f7 commit 9ee3512
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@
[[constraint]]
name = "github.com/renstrom/fuzzysearch"
revision = "2d205ac6ec17a839a94bdbfd16d2fa6c6dada2e0"

[[constraint]]
name = "gopkg.in/AlecAivazis/survey.v1"
source = "https://github.com/shyiko/survey.git"
revision = "a14316b11132a62dec3bb47ff8aecf1741ecba1d"
9 changes: 6 additions & 3 deletions kubensx.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func (f *simpleFormatter) Format(entry *log.Entry) ([]byte, error) {
}

func init() {
surveyterminal.DiscardUnsupportedEscapeSequences = true
// remove "? " prefix
survey.SelectQuestionTemplate = strings.Replace(survey.SelectQuestionTemplate,
`{{- color "green+hb"}}{{ QuestionIcon }} {{color "reset"}}`, "", 1)
Expand Down Expand Up @@ -915,9 +916,10 @@ func promptSelect(text string, opts []string, def string) string {
value := def
if err := survey.AskOne(
&survey.Select{
Message: text,
Options: opts,
Default: def,
Message: text,
Options: opts,
Default: def,
FilterResetDefault: true,
},
&value,
nil,
Expand Down Expand Up @@ -949,6 +951,7 @@ func promptInput(text string, def string, help string) string {
&survey.Input{
Message: text,
Default: def,
EditDefault: true,
Help: help,
},
&value,
Expand Down

0 comments on commit 9ee3512

Please sign in to comment.