Git Product home page Git Product logo

Comments (7)

bcopeland avatar bcopeland commented on June 24, 2024

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.

from lastpass-cli.

rothgar avatar rothgar commented on June 24, 2024

@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 pass -c copies the first line of the gpg encrypted file (which could be anything) but defaults to the password for the entry.

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.

from lastpass-cli.

bcopeland avatar bcopeland commented on June 24, 2024

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 alias lp="lpass show -cp" if that's your most common usage).

from lastpass-cli.

bcopeland avatar bcopeland commented on June 24, 2024

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.

from lastpass-cli.

rothgar avatar rothgar commented on June 24, 2024

Not sure about all platforms but for Linux you could run something like at now + 1 minute <<< "echo clear | xclip -selection c" after copy. exact syntax is probably wrong.

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.

from lastpass-cli.

bcopeland avatar bcopeland commented on June 24, 2024

Yes, I suppose we can fork a new process that just does sleep(x); exec(xclip)... Please do open an issue for that.

from lastpass-cli.

rothgar avatar rothgar commented on June 24, 2024

Will do. Thanks for the feedback. I'll go the alias route for defaulting -c to --password

from lastpass-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.