Skip to content
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

Allow tighter integration with fzf #43

Open
maricn opened this issue Feb 22, 2022 · 1 comment
Open

Allow tighter integration with fzf #43

maricn opened this issue Feb 22, 2022 · 1 comment

Comments

@maricn
Copy link
Contributor

maricn commented Feb 22, 2022

Would be nice that instead of directly copying passwords with fzf, there was a way to invoke 1pass to display the details (overview) of the login/note/etc in the fzf preview pane.

Rationale

  1. I sometimes have logins/notes/etc. in multiple vaults that have similar or same name, and are for different users.
  2. Currently only thing that can be previewed with 1pass is list of fields available on the item and the associated password (or note content). The latter is dangerous to be displayed due to over-the-sholder eavesdropping, and the former is not very usable if we need to distinguish between users or URLs of the items.
  3. I could use op directly for that, but if 1pass already provides a caching layer, I'd prefer to use it. Also, I like having a single interface authenticating me.
@maricn
Copy link
Contributor Author

maricn commented Feb 22, 2022

I hacked away a primitive solution that makes it possible to use 1pass and fzf like this

alias fp='1pass | fzf --preview "1pass --pretty {}" --bind "enter:execute(1pass {})"' 

image

Shouldn't be too hard to implement ability to have hotkeys for (1) copying username and (2) copying password, without exiting the fzf dialog. 1pass would only need another command to print username in addition to the jq colored output of the .overview field of the item.

But that's a big change of your API, so let me know if you find that useful, I can refactor and push these days...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant