-
Notifications
You must be signed in to change notification settings - Fork 290
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
--clip should default to --password if no option is given #58
Comments
I don't really agree with changing the default, for consistency of interface reasons. But sure, short options makes a lot of sense, just pushed that. |
@bcopeland Can you please explain "consistency of interface reasons." My reasoning is from experience using LastPass browser plugins and pass. In LastPass the username/password are the main values for autofill and have shortcuts in the UI to copy them. In Having -c copy the entire entry is useless to paste into a form/app/webpage because there is extra metadata and possible notes that will get mangled when pasting and need to be deleted. Thus to make -c useful you have to specify at least one extra option. Maybe a compromise would be a setting to allow setting the default copy field/flag. On a side note, entries are not cleared from the clipboard after a set amount of time. I'll open a new issue for that though. |
Consistency meaning adding "-c" doesn't change the set of data that is selected. I agree that the user probably never wants to copy all when they do -c, but if we default to all at least the data is the same with and without '-c'. Also some items like secure notes won't have a password. With the suggested short character change, it's the difference of one character so I don't think it's that onerous (also you could of course define a shell alias like |
RE clearing the clipboard... lpass isn't running any longer after it is copied, so I'm not sure how we might technically achieve that. |
Not sure about all platforms but for Linux you could run something like You could also see the function pass makes in bash to clear the clipboard after 45 seconds using exec, sleep, and disown. Again, not super useful cross platform, but doable. |
Yes, I suppose we can fork a new process that just does sleep(x); exec(xclip)... Please do open an issue for that. |
Will do. Thanks for the feedback. I'll go the alias route for defaulting -c to --password |
By default if you use
lpass show --clip example
you will get all of the contents of the site in the following structure copied to your clipboard.That is fairly useless in a copy/paste form and is redundant with the --all option. It would be better if --password was the default because that is usually the sensitive value being stored in a password manager.
It would also be helpful if there could be shortened version of --username and --password (-u and -p) to save with typing when copy/pasting the most often used values.
The text was updated successfully, but these errors were encountered: