Closed DewJunkie closed 7 years ago
@DewJunkie thanks for this PR and I can understand what you're trying to do and how it will add value. However, how does this feature compare to a user just doing this:
string input = ReadLine.Read("Would you like to continue? [Y]:");
if (string.IsNullOrWhitespace(input))
....
else
....
It is exactly the same as what you mentioned, so it doesn't add anything not possible, just cleans it up. I use a bit of console apps for testing/validation. I have some users who just want to double click anything I send them, so my typical pattern is.
app.exe --option1 a --option2 b --option3 c settings.json
// Loop
{
// Show app menu
app.option1 = ReadLine.Read("Prompt", app.option1);
// etc...
}
So if the goal is be like GNU readline, I could see it being out of scope. My goal was, make my life easier with minimal change upstream. It's totally understandable if they don't align.
@DewJunkie This feature is super welcome I just have a couple of comments. I suggest you resolve merge conflicts first so that your changes are made on updated code and the CI tests can validate this PR
Are you still looking into this? /cc @DewJunkie
I was/am travelling for work, I am going to try and have the suggestions you made completed/checked in either later tonight, but possibly it will be the end of the week.
Ok I merged in the latest, and made the changes as discussed. I don't know if the pull request is tied to a particular commit, or if it is from my master branch. If I need to submit a new pull request and cancel this one, let me know.
Thanks @DewJunkie 👍
Possibly this is out of scope, but I started using default values recently in my console programs, I don't know if this falls into the works like GNU readline, because I haven't used it as a developer, but I have noticed this used in other programs that I have used. I will probably add as a static property a prompt suffix. ex ":", ">" or whatever suits the app.
This is my first pull request, so please point out anything wrong I did in the process if you have the time.
Thanks