wrathematics / getPass

Password function for R with masking (where supported)
Other
47 stars 5 forks source link

Add getUserText() function that mirrors getPass() without mask #14

Closed nick-komick closed 6 years ago

nick-komick commented 6 years ago

Would you consider adding a getUserText() function that mirrors the getPass_readline_masked C function but with no mask?

I have found it challenging to use readline and readLines(con=stdin()) to collect user input from the console on windows within a batch file.

A modified version of the getPass package with the "*" masked removed works well for getting user input from the console when a script is run from a windows batch file.

wrathematics commented 6 years ago

Have you tried readLines(file("stdin"), n=1) ? Using file("stdin") is different from stdin() (see ?readLines and ?file).

I'm not strictly opposed to adding functionality, but that base R solution should work.