You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the latest version of promptui.
I created a REPL and I am using promptui to grab the users input. However after every new input the cursor doesn't disappear. I've looked through the documentation but I am unsure how to fix this issue.
Here is what my shell looks like:
I also noticed randomly sometimes when I input a string, the output is given twice. (this happens randomly, but an example is when "banana" was entered in the above screenshot)
I also noticed sometimes "op:" is greyed out, and sometimes it keeps the green check.
Do you know how to fix these issues?
Here is the code that is running promptui:
func Run(execute bool) {
t := tool_chain.NewOpToolChain()
for true {
validate_exp := func (input string) error {
_,_,_, err := t.Parse(input)
return err
}
prompt := promptui.Prompt{
Label: "op",
Validate: validate_exp,
}
result, err := prompt.Run()
if err != nil {
fmt.Printf("Prompt failed %v\n", err)
return
}
//exits the interative cli if user specifies
if result == `exit` {
fmt.Printf("CLI exiting gracefully...")
break
//executes the command given
} else {
fmt.Printf("Command entered: %q\n", result)
}
}
}
Let me know if there is something I can do.
Thanks,
Maya
The text was updated successfully, but these errors were encountered:
Hi,
I am using the latest version of promptui.
I created a REPL and I am using promptui to grab the users input. However after every new input the cursor doesn't disappear. I've looked through the documentation but I am unsure how to fix this issue.
Here is what my shell looks like:
I also noticed randomly sometimes when I input a string, the output is given twice. (this happens randomly, but an example is when "banana" was entered in the above screenshot)
I also noticed sometimes "op:" is greyed out, and sometimes it keeps the green check.
Do you know how to fix these issues?
Here is the code that is running promptui:
Let me know if there is something I can do.
Thanks,
Maya
The text was updated successfully, but these errors were encountered: