magmax / python-inquirer

A collection of common interactive command line user interfaces, based on Inquirer.js (https://github.com/SBoudrias/Inquirer.js/)
MIT License
997 stars 98 forks source link

Fix new line . #605

Closed YoussefEssalhi closed 1 month ago

YoussefEssalhi commented 1 month ago

Fix : #604

Cube707 commented 1 month ago

I just realized that this also affects multiple prompts. The empty line is important to keep them seperate.

Original behavior: image

Changed behavior: image

This is definitely not an option to change!

YoussefEssalhi commented 1 month ago

@Cube707 I agree with you but don't you think it should be a custom parameter "separate" and be enabled by default ?

Let's take this scenario for example of someone starting to develop a CLI tool based on python-inquirer . Wouldn't leaving an empty line potentially be seen as a flaw in the tool's design ?

Cube707 commented 1 month ago

a custom parameter "separate" and be enabled by default

Yes this would be the optimal solution and there are multiple other cases where such a configuration would be useful. For example see the readchar libary that implements such a pattern with its config, which would be useful to hold as a part of inquirers config. Another idea is to allow for the deletion of the question from the screen after its answerd. and many more.

But Implementing this pattern would be quite the task and I simply don't have the time.

I do not think this would be useful to have as an argument when construction a prompt, they are already overloaded with options as is...