-
Notifications
You must be signed in to change notification settings - Fork 395
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
feat: adding mandatory flag to string input #844
base: 2.1.x
Are you sure you want to change the base?
Conversation
918063b
to
886336a
Compare
- Added to flow - Added to component - Add simple test case - Add samples
886336a
to
93cd27f
Compare
Issue with jdk8 compilation doesn't seem to originate from me, right? (investigating though to be sure) |
As suspected I broke something :D, I'll check it |
spring-shell-core/src/main/java/org/springframework/shell/component/StringInput.java
Outdated
Show resolved
Hide resolved
...hell-samples/src/main/java/org/springframework/shell/samples/standard/ComponentCommands.java
Outdated
Show resolved
Hide resolved
I'm just thinking if this is going to be a bit confusing for a user if there's a default value.
I'm kinda questioning if there's better way to give indication to user that something is required. |
I also wondered about it. I think the easiest way would be to display Required only if there is no default (and it also matches with what really happens) |
As I began to use spring-shell for some CLI workflow, I found that there is no input required for string (altough there is default).
For the moment, I used this kind of code:
or this as flow:
Which work but it could be simpler, hence my PR.
So I:
Result: