dcreemer/1pass

Allow tighter integration with `fzf`

maricn opened this issue · 1 comments

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.

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...