Skip to content
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

Ability to get input parameter via STDIN #9

Closed
ahelmbr opened this issue Jul 29, 2019 · 5 comments
Closed

Ability to get input parameter via STDIN #9

ahelmbr opened this issue Jul 29, 2019 · 5 comments
Assignees
Labels
feature New feature
Milestone

Comments

@ahelmbr
Copy link
Contributor

ahelmbr commented Jul 29, 2019

As described in README the password can be set via interactive input if a $ is used instead of a value.

Implement interactive input from STDIN

Example: pub -u test -pw $ -t xxx -m "my message"
$>>

@ahelmbr ahelmbr added the feature New feature label Jul 29, 2019
@ahelmbr ahelmbr added this to To do in Version 1.0.0 via automation Jul 29, 2019
@ahelmbr ahelmbr added this to the Version 1.0 milestone Jul 29, 2019
@gitseti gitseti moved this from To do to In progress in Version 1.0.0 Aug 7, 2019
@gitseti
Copy link
Contributor

gitseti commented Aug 7, 2019

Why not omit the $ completely?

Example: pub -u test -pw -t xxx -m "my message"

This would be natively supported by picocli.

@ahelmbr
Copy link
Contributor Author

ahelmbr commented Aug 7, 2019

Than lets do it like you proposed + change also the documentation

@gitseti
Copy link
Contributor

gitseti commented Aug 7, 2019

Picocli seems to only support the interactive password option for jline3 which is not used here.

So I decided to write a small password converter which can support both options for now
con -u test -pw password
con -u test -pw $ -> prompts for password
con -u test -pw -> prompts for password

@gitseti gitseti self-assigned this Aug 7, 2019
gitseti added a commit that referenced this issue Aug 8, 2019
…DIN-#9

Feature/get input parameter via stdin #9
@gitseti
Copy link
Contributor

gitseti commented Aug 9, 2019

Masking the input by using native java method System.console().readPassword() stops after reading the first typed character in a non IDE context.

Maybe collision with Jline2?

For now the password hast to be specified via ... -pw password

@gitseti
Copy link
Contributor

gitseti commented Aug 9, 2019

Masking the input by using native java method System.console().readPassword() stops after reading the first typed character in a non IDE context.

Maybe collision with Jline2?

For now the password hast to be specified via ... -pw password

Upgrading jline2 to jline3 resolved this error
#25

gitseti added a commit that referenced this issue Aug 9, 2019
…DIN-#9

Feature/get input parameter via stdin #9
@gitseti gitseti closed this as completed Aug 9, 2019
@gitseti gitseti moved this from In progress to Done in Version 1.0.0 Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
No open projects
Version 1.0.0
  
Version 1.0.0
Development

No branches or pull requests

2 participants