Comments (2)
from promptui.
This line in Prompt.go blanks out default values for confirm prompt types.
https://github.com/manifoldco/promptui/blob/master/prompt.go#L257
if p.IsConfirm {
p.Default = "" // This line
if tpls.Confirm == "" {
confirm := "y/N"
if strings.ToLower(p.Default) == "y" { // Causes this logic to fail
confirm = "Y/n"
}
As well as the logic to accept Y
as a default value. I haven't had time to research where the fix for this would be and it's not a high priority for me right now.
By removing p.Default = ""
, functionality does work except the Default is displayed on the input, similar to normal prompts, which didn't seem desired since the default functionality with N
as default doesn't show "N" on the input.
from promptui.
Related Issues (20)
- Prompt select label and help appear multiple times HOT 1
- Reset the prompt after selection
- Nohup running retruns ^D
- Auto Complete? HOT 1
- How to remove ":" on label Select? HOT 1
- Prompt Validation: regex matching causes multiple rerenders on input HOT 3
- Git Bash Prompts fail with EOF HOT 1
- Empty lines in output?
- Data race after running promptui.Prompt.Run()
- Stdout should be `io.Writer` instead of `io.WriterCloser`
- Default searcher implemetation HOT 5
- Dynamic search based select HOT 1
- Replace input text while typing
- Run validation after return key
- Disabling the checkmark and output. HOT 1
- https://www.manifold.co certificate is expired since 2022-08-26 HOT 2
- Select HOT 1
- Printf before prompt run will cut long string
- About the unit test of the Select HOT 2
- Is this project still maintained? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from promptui.