gopass icon indicating copy to clipboard operation
gopass copied to clipboard

Feature Request: no hardcoded username in password-store path

Open markfaine opened this issue 1 year ago • 3 comments

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

markfaine avatar May 04 '23 19:05 markfaine

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

kanielrkirby avatar Feb 02 '24 23:02 kanielrkirby

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 avatar Feb 06 '24 10:02 AnomalRoil

@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

kanielrkirby avatar Feb 10 '24 21:02 kanielrkirby