This was partly discussed in https://github.com/gopasspw/gopass/issues/1323 but it was not addressed in https://github.com/gopasspw/gopass/pull/1327 .
gopass show -f when I wasn't in an X session, but now I get:Error: failed to write to clipboard: exit status 1
gopass show -f didn't print:Copied passwd to clipboard. Will clear in 45 seconds.
Which made sense to me since I use -f so I not only expect gopass to not put the password in the clipboard, but also to print it as is.
For regression (1), run outside an X session:
gopass show -f passwd
And you'll get:
Error: failed to write to clipboard: exit status 1
For regression (2), run inside an X session:
gopass show -f passwd
And see that it still prints:
Copied passwd to clipboard. Will clear in 45 seconds.
gopass show -f passwd prints nothing but tha password.
gopass show -f passwd works outside an X session and there it also, prints nothing but the password.
This regression broke a few startup scripts which I had running before startx which I used to put some passwords in environmental variables.
Also, I think it should be possible to use gopass even without an X session running, even if autoclip is true. I expect the auto in autoclip to mean that gopass automatically detects if it's an X session or not, meaning it can decide for himself whether it'll be possible to put something in the clipboard or not. And not failed so ungracefully, with:
Error: failed to write to clipboard: exit status 1
Failing gracefully when autoclip is true and no clipboard is available sounds good to me.
If gopass show -f wouldn't put the password in the clipboard would be great as well, because now I need to tail -1 the output if I want to pipe the password to another command.
Thanks! It all works as expected :+1: .
Thanks for reporting back. Glad to hear.
We will try to have a new release out soon.
Most helpful comment
Thanks for reporting back. Glad to hear.
We will try to have a new release out soon.