Comments (9)
@tomprince: hmm, export LPASS_CLIPBOARD_COMMAND="xclip -l 1"
does not seem to copy anything to the clipboard.
export LPASS_CLIPBOARD_COMMAND="xclip -selection clipboard -in -l 1"
does the job.
from lastpass-cli.
For macOS there seems to be no solution... this is the best workaround I've come up with that will clear the clipboard after X seconds, and you still get bash/zsh autocompletion:
$ cat ~/bin/pbclear
#!/bin/bash
if [ -n "$1" ]; then
sleep $1
fi
echo -n '' | pbcopy
$ alias lps
lps='~/bin/pbclear 4 &; lpass show -c --password '
I think clearing clipboard after X seconds of population is a core feature of a password manager (like 1Password has this built in). But the way lastpass-cli
has implemented populating clipboard (basically execute all clipboard managers and see which one that succeeds) makes this hard to implement in lastpass-cli
.
from lastpass-cli.
@cspeterson @bcopeland I can see why people want that, but looks there are workarounds to get this functionality without changing the core program. It's good to keep lastpass-cli to minimum. Let's just close this issue.
from lastpass-cli.
I would like this too. Sadly, I do not have any knowledge of C but I will take a look at the code.
from lastpass-cli.
+1 I would love to see this.
from lastpass-cli.
This would be a good thing to support, as a workaround, you can now set LPASS_CLIPBOARD_COMMAND
to something that does what you want. (I have it set to xclip -l
)
from lastpass-cli.
I investigated whether a consistent, reasonable, secure default solution was possible across the four different supported clipboard tools so I could just submit a pull request, but: nope!
The tools:
xclip (Linux), xsel (Linux), pbcopy (MacOS), putclip (cygwin)
- xclip: as pointed out above, can be told to limit the number of subsequent paste requests, but cannot set a timeout/expiration
- xsel: can specify a timeout in ms, but not a limit on paste requests
- pbcopy: offers no such functionality
- putclip: what is this even? I'm unable to find a manpage or anything
Anyway, the bottom line is that the different supported clipboard interfaces even on the same platform do not support consistent behaviour. I think the environment variables remain the best solution. :(
from lastpass-cli.
@kozmic did you see my comment above? xclip
is available on brew.
from lastpass-cli.
@hazcod I did see it, but xclip
uses another buffer for data (correct me if I'm wrong), so I can't paste my password into applications with Command+V
.
from lastpass-cli.
Related Issues (20)
- Support login with SSO HOT 12
- Unable to login with lpass cli HOT 62
- certificate pinning is an outdated security measure
- Forgot to update version 1.3.5 in LASTPASS-VERSION-GEN
- lastpass-cli: Do not interpose reallocarray in /usr/bin/lpass HOT 1
- cygwin make fails due to CRLF in LASTPASS-VERSION-GEN
- Error: Peer certificate cannot be authenticated with given CA certificates. HOT 1
- lastpass-cli sync does not complete on Mac OS 14 HOT 2
- Feature request: lpass copy HOT 1
- Building image from the source does not work HOT 2
- Feature request: Return the error code when there's an HTTP error
- Cannot change master password with "lpass passwd"
- Ubunutu 22.04 libssl dependency
- UUID of 0 for new entry when scripting
- Possible to create Sub-folders?
- Parameter note-type not reflected, always got secure note despite `--note-type=Database` was specified HOT 2
- Suspicious activity in my Gmail account 1 day after running lpass-att-export.sh
- CLI 1.3.6 no more working HOT 7
- Build failure with GCC 14
- icon_expanded_looks_like_username HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lastpass-cli.