Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined behaviour when prompt has newline #56

Open
str1ngs-bytes opened this issue Oct 5, 2022 · 1 comment
Open

Undefined behaviour when prompt has newline #56

str1ngs-bytes opened this issue Oct 5, 2022 · 1 comment

Comments

@str1ngs-bytes
Copy link

str1ngs-bytes commented Oct 5, 2022

`
// This Code Work's Fine
var App = grumble.New(&grumble.Config{
Name: "Cli",
Prompt: "Main Menu : ",
})

terminal output :
Main Menu :

// This Code Does Not Work
var App = grumble.New(&grumble.Config{
Name: "Cli",
Prompt: "User james Kelly \n >> : ",
})

terminal output :
User james Kelly

//But when pressed 'enter' or typing this happens :
// When Pressed Enter :
User james Kelly
User james Kelly
User james Kelly
">>"
User james Kelly
">>"

// While Typing :
User james Kelly
User james Kelly
User james Kelly
User james Kelly
User james Kelly
">> abcd"

// Expected Same As Single Line Prompt
// When Pressed Enter :
User james Kelly
">>"
User james Kelly
">>"

// While Typing :
User james Kelly
">> abcd"

Note : While typing it prints promt every single key press.
Is there a quick fix to this? I need to deliver to the client asap.
`

@skaldesh
Copy link
Member

skaldesh commented Oct 7, 2022

Maybe the readline lib is not able to handle newlines. @r0l1 wyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants