Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

[Fix] Remove special char in prompt #137

Merged
merged 1 commit into from
Jun 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func newInitCmd(stdinFunc, promptFunc CommandRunnerFunc) *cobra.Command {
cmd := &cobra.Command{
Use: "init",
Short: "Init rit",
Long: "Initiliaze rit configuration",
Long: "Initialize rit configuration",
RunE: RunFuncE(stdinFunc, promptFunc),
}
cmd.LocalFlags()
Expand Down
1 change: 1 addition & 0 deletions pkg/prompt/bool.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func NewInputBool() inputBool {
func (inputBool) Bool(name string, items []string) (bool, error) {
prompt := promptui.Select{
Items: items,
Pointer: promptui.PipeCursor,
Templates: defaultSelectTemplate(name),
}
_, result, err := prompt.Run()
Expand Down
1 change: 1 addition & 0 deletions pkg/prompt/email.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func NewInputEmail() inputEmail {
func (inputEmail) Email(name string) (string, error) {
prompt := promptui.Prompt{
Label: name,
Pointer: promptui.PipeCursor,
Validate: validator.IsValidEmail,
Templates: defaultTemplate(),
}
Expand Down
1 change: 1 addition & 0 deletions pkg/prompt/int.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func NewInputInt() inputInt {
func (inputInt) Int(name string) (int64, error) {
prompt := promptui.Prompt{
Label: name,
Pointer: promptui.PipeCursor,
Validate: validateIntegerNumberInput,
Templates: defaultTemplate(),
}
Expand Down
1 change: 1 addition & 0 deletions pkg/prompt/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ func NewInputList() inputList {
func (inputList) List(name string, items []string) (string, error) {
prompt := promptui.Select{
Items: items,
Pointer: promptui.PipeCursor,
Templates: defaultSelectTemplate(name),
}
_, result, err := prompt.Run()
Expand Down
1 change: 1 addition & 0 deletions pkg/prompt/password.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ func NewInputPassword() inputPassword {
func (inputPassword) Password(label string) (string, error) {
prompt := promptui.Prompt{
Label: label,
Pointer: promptui.PipeCursor,
Mask: '*',
Validate: validateEmptyInput,
Templates: defaultTemplate(),
Expand Down
2 changes: 2 additions & 0 deletions pkg/prompt/text.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ func (inputText) Text(name string, required bool) (string, error) {
if required {
prompt = promptui.Prompt{
Label: name,
Pointer: promptui.PipeCursor,
Validate: validateEmptyInput,
Templates: defaultTemplate(),
}
} else {
prompt = promptui.Prompt{
Label: name,
Pointer: promptui.PipeCursor,
Templates: defaultTemplate(),
}
}
Expand Down
1 change: 1 addition & 0 deletions pkg/prompt/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func NewInputURL() inputURL {
func (inputURL) URL(name, defaultValue string) (string, error) {
prompt := promptui.Prompt{
Label: name,
Pointer: promptui.PipeCursor,
Default: defaultValue,
Validate: validator.IsValidURL,
Templates: defaultTemplate(),
Expand Down