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: CLI option to output password without newline? #656

Open
wcooley opened this issue Oct 18, 2023 · 0 comments
Open

Feature request: CLI option to output password without newline? #656

wcooley opened this issue Oct 18, 2023 · 0 comments

Comments

@wcooley
Copy link

wcooley commented Oct 18, 2023

I would like to request an option to output the password without the trailing newline. I have found a number of cases where the newline ends up being included as part of the password, such as the password file that the OpenLDAP clients can use (-y <file>) and when piping into pbcopy on macos (to paste into a GUI dialog box).

I would even like to go so far as to request not only a parameter for the command line but to suggest that os.isatty(sys.stdout.fileno())(or something similar) be used to exclude the newline when stdout isn't the terminal. But this would be a breaking change, so such a change might not be feasible.

(I know that I can easily strip the newline in various ways, like |tr -d '\n', but that is much less convenient.)

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

1 participant