jaraco / jaraco/keyring

Feature request: CLI option to output password without newline?

Open
#656 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.5k
Forks
196
PR merge metrics
No merged PRs in 30d

Description

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 `) 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.)

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue does not name a file or test. Start by locating the keyring CLI entry point that writes passwords to stdout and inspect any existing CLI output tests. Done means a documented option produces the password without a trailing newline, with behavior for terminal and piped output matching the chosen specification.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.