sala icon indicating copy to clipboard operation
sala copied to clipboard

Change the raw format for better support for clipboards

Open nailor opened this issue 13 years ago • 1 comments

Current raw format uses printstatement to output the password. However, this can cause errors when piping to a clipboard manipulating script (like pbcopy available on OS X). Use case here is to directly copy a password to a clipboard without seeing it.

This could easily be fixed by replacing print secret with sys.stdout.write(secret). However, this would not be ideal in case of multiple passwords as they would all be concatenated to standard output without a delimiter.

This issue is not an issue as such but a discussion starter wether or not this behavior should be changed to something more intelligent, like no newline in case of one secret, newlines in between (but not in the end) in case of multiple.

nailor avatar Sep 29 '11 20:09 nailor

... or another command line option to delimit with nothing, a null byte for use with xargs, or still something else?

There could be a command-line option or many to choose the delimiter, or maybe you could specify the -r option twice to get "really raw" output without any delimiters.

akheron avatar Sep 30 '11 05:09 akheron