[PATCH] Add XDG Base Directory support

Nicolai Dagestad nicolai at dagestad.fr
Wed May 27 14:36:56 CEST 2020


> This idea about migrating to XDG Base Directory with backwards
> compatibility seems messy: The great thing about `pass` is the
> simplicity of the password storage, in this patch, the fish completion
> file now use a 12 line helper function to find the location of where
> files are stored.
I agree with you there, I don't want `pass` to become a bloated mess 
either. And in the end, if adding XDG Dir support is to much messy, we could 
just drop the patch. I doubt it would be a deal breaker for any new or 
existing user.


> The way you find the password store is inconsistent across these
> patches.
I was aiming for what i proposed in this mail[1]
```
 If PASSWORD_STORE_DIR is set use that
 else if ~/.password_store exists use that
 else fallback to the XDG dir behaviour
```

> 1. Write an exact specification of how one should obtain the password
> storage.
Do you have any suggestion on where this should be, a man page maybe ?


> 2. Add a `prefix` command to `pass` that output this directory, and use
> in the helper scripts.
I like the idea of a prefix command, I'll send a new patch.


> Regarding the first item: It should also cover the case where no
> directory is found, i.e. what would `pass init` use?
I'd say i should default to $XDG_DATA_HOMe/password-store. Using what is
supposed to become the legacy path would feel a bit backwards to me.

---
[1] https://lists.zx2c4.com/pipermail/password-store/2020-May/004073.html


More information about the Password-Store mailing list