Skip to content

Fix fetching passwords and TOTPs from vault #36

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Anthirian
Copy link

Recently I've been having issues with autotype and copy to clipboard using the plugin. I found that in some shells using the echo pass,<entry> and echo totp,<entry> --bind commands in a subshell did not populate the script variables correctly. I've opted for using the --expect flag to fzf, which always prints the key pressed to select the entry along the entry itself. Then, using readarray this is split into the correct variables again.

@tomoakley
Copy link

tomoakley commented Feb 28, 2025

I've had the same problem - I tried your fork, but still has the same problem. Debugging it, I can see the $selection array is empty. I'm on macOS 15.3.1 - will try and find a fix

Copy link
Owner

@yardnsm yardnsm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool solution! Thank you for your time (and apologies for the delay).

Can you please share a bit more on your setup so I can try to replicate? I would prefer not to prompt to a different approach than the current fzf's --bind (no particular reason other than I'm mostly familiar with it).

@Anthirian
Copy link
Author

Cool solution! Thank you for your time (and apologies for the delay).

Can you please share a bit more on your setup so I can try to replicate? I would prefer not to prompt to a different approach than the current fzf's --bind (no particular reason other than I'm mostly familiar with it).

I was using the latest fzf on OpenSUSE Tumbleweed at the time, but at this point I'm also using a Mac. I remember the --bind flag not taking effect at all, i.e. not producing any output after the selection is made. The --expect keyword seemed to perform the task --bind was supposed to do, just slightly differently.

I have tested the suggested alternative and that seems to work on my Mac as well, running Bash 3.2. I will push another commit that uses @tomoakley's implementation.

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

Successfully merging this pull request may close these issues.

3 participants