gopass
gopass copied to clipboard
Feature Request: no hardcoded username in password-store path
Summary
Please write the path to the config without hard-coding the username Instead of
[mounts]
path = /home/mfaine/.password-store
Write it like:
[mounts]
path = ~/.password-store
@dominikschulz I would like to try my hand at making this change, if possible.
One of the questions I had, is there ever a use-case in which you'd mount somewhere outside a user's directory? Currently trying to get an idea of the scope of this change. I know there's going to be different paths depending on the OS and use.
I guess the trickiest issue with this is cross-compatibility with Windows. But please, we're happy to review a PR if you want to try and do it :D
@AnomalRoil So I've been looking at it, it doesn't look too hard to make it consistent across different OSs, Go comes with built-in packages (os/user
and path/filepath
) that make that a lot easier.
I would like to ask for a little advice. Where do you think this logic will need to be put in place? With ~3 levels of functions for both init
and mount
, along with some extra logic for checking for duplicates, I suppose that's where I'm struggling a bit to get a solid idea.
Thanks again