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

feature request: a method to transform input strings #8

Closed
dcornejo opened this issue Apr 17, 2018 · 3 comments
Closed

feature request: a method to transform input strings #8

dcornejo opened this issue Apr 17, 2018 · 3 comments

Comments

@dcornejo
Copy link
Contributor

It would be helpful if there was the ability to transform or input strings - for example if I enter a password and I want to hash it before passing it down to lower levels. Ideally, the transform
function would be user definable.

A possible syntax would be an extension of the string type in the clispec file:
<var:string transform:userTransformFunction()>

@olofhagsand
Copy link
Member

There are two parts to this. First is to transform it according to your example. Second is if you want it to be echoed as **** when typing.
(1) without (2) would echo the cleartext to the terminal when you type it, but would save it transformed. That is easier than (1)+(2), because (2) requires catching characters on the fly and keeping track of what can be echoed and what can not in getline.
That seems tricky.

olofhagsand added a commit that referenced this issue May 27, 2018
@dcornejo
Copy link
Contributor Author

dcornejo commented May 30, 2018 via email

@dcornejo
Copy link
Contributor Author

dcornejo commented May 31, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants