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
Using survey, I noticed that it works a lot better than promptui for what I want to do with it. One of the main problems with promptui is that when a long path is provided (longer than the terminal's width), a new line is created on each keystroke. This also happens when copy pasting a long path. An issue has been filled but there has not been an answer from the author yet.
What to do
survey works in a similar way to promptui with validation. A validation function has to return an error when the input isn't valid. The main difference is that survey only validates the input after the user presses the enter key, while promptui checks it on each keystroke.
This means that the validation functions can be kept and the only thing that needs to be changed is the prompt implementation.
Summary
Using
survey
, I noticed that it works a lot better thanpromptui
for what I want to do with it. One of the main problems withpromptui
is that when a long path is provided (longer than the terminal's width), a new line is created on each keystroke. This also happens when copy pasting a long path. An issue has been filled but there has not been an answer from the author yet.What to do
survey
works in a similar way topromptui
with validation. A validation function has to return an error when the input isn't valid. The main difference is thatsurvey
only validates the input after the user presses the enter key, whilepromptui
checks it on each keystroke.This means that the validation functions can be kept and the only thing that needs to be changed is the prompt implementation.
Useful links
The text was updated successfully, but these errors were encountered: