Hejsil / zig-clap

Command line argument parsing library
MIT License
939 stars 67 forks source link

Passing sensitive input #106

Closed bq-wrongway closed 1 year ago

bq-wrongway commented 1 year ago

Hi, Not an issue but more of a question, i parse strings,ints and enums just fine, but lets say i want to pass a password,or some other sensitive info, that should not be logged in shell /shell history. Is this possible ? For example passing -p parameter, and all letters after that are parsed but not "logged" to the shell,or are simply turned in to ** asterisks.

Is something like this possible?

Hejsil commented 1 year ago

Hi. I don't think this is possible. Do note, that it is not only your shell history that will have this information. On linux, running ps ax you can see everything running and the arguments that was passed. So if you have something long running, passing passwords on as arguments straigt up just seems like a bad idea.

bq-wrongway commented 1 year ago

Okay, i thought so, i know almost no software that does this, need to rethink how to do this. thanks anyways!