yardnsm / tmux-1password

:key: Access your 1Password login items within tmux!
MIT License
256 stars 24 forks source link

Didn't work without customisation. #19

Closed knx closed 3 years ago

knx commented 4 years ago

Hello, I've installed this awesome plugin and it didn't work straight away. Needed two tweaks.

At first it was loading only items from "Logins" category, which was not very useful because I keep server passwords used in CLI in "Servers" category. This was solved with set -g @1password-enabled-url-filter 'off' and set -g @1password-items-jq-filter '.[] | [select(.overview.tags | map(select(. == "server")) | length == 1)?] | map([ .overview.title, .uuid ] | join(",")) | .[]'

Then it was fetching the items correctly, but it could not get any passwords, so I had to tweak the jq filter used to get the password value and change it to ".details.sections[].fields[]|select (.n == \"password\").v"

After those two changes it works.

yardnsm commented 4 years ago

Hey! Sorry for the (very long) delay 😅

First of all, the @1password-enabled-url-filter flag is not needed at all. It was proposed at #13 but removed at #18.

The filter you're using for @1password-items-jq-filter is needed since you're modifying the default behaviour of selecting items, which is totally fine!

Regarding you're not getting passwords, I couldn't reproduce :/