yardnsm / tmux-1password

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

Fix #7: Add generic manager functionality, support lastpass #8

Closed BlueDrink9 closed 5 years ago

BlueDrink9 commented 5 years ago

Apologies, but making this generic required a large re-write so it's not a small PR.

This takes the password manager specific commands and replaces them with a generic version, that calls the specific version based on variables. These variables are set in separate files, kinda like plugins.

This PR in particular has only been tested to work with lastpass, not 1password, so needs serious testing. I don't think I've changed any of the specifics though, just moved them, and the same generic code works for the lastpass specifics, so I'm hopeful it still works.

I've updated the readme and added configuration documentation.

There's also the shell of a 1pass version for #6, but again, it's entirely untested and required some extra new custom code.

BlueDrink9 commented 5 years ago

Note: The failing shellchecks are mostly because of the use of separate files for the configs

BlueDrink9 commented 5 years ago

Also consider renaming the repo to reflect its generic status

yardnsm commented 5 years ago

Thanks for the huge effort @BlueDrink9! Sorry for the late response, busy week at work...

Unfortunately, this PR is a bit different from my vision for this plugin. As I understood, This PR allows the users to create their own "adapters" (I'm not settled on this word yet, but this basically means the different implementation for password managers), which makes this plugin to be a "framework", which I don't want. Maintaining such framework means that:

There are more issues with this PR, as I see it:

As the changes are pretty big, I'll close this PR for now. I'm planning to make a simpler "generalization" for this project in the near future.

BlueDrink9 commented 5 years ago

Fine by me. I've fixed a few of those issues in my fork to make it more generic anyway, and I'll keep using my fork.

In the meanwhile, my fork works fine with lastpass, so would you be willing to put a link to mine for lastpass users only?