[PATCH v2] Add XDG Base Directory support

Amir Yalon quoiceehoh-20180826 at yxejamir.net
Wed May 27 21:15:12 CEST 2020


On Wed, May 27, 2020, at 19:43, Nicolai Dagestad wrote:
> ---
> Following Allan Odgaard's suggestion I added an `prefix` command to pass 
> that prints out the storage path.
> I also updated the man page to reflect the changes
> Still no change to the emacs scripts as I haven't switched to emacs since 
> my last patch.
> 
> I am not really pleased with having a get_prefix function before setting the 
> PREFIX variable but without moving around a lot more code I didn't fiind a 
> better way to add it...

I was not keeping up with the previous version’s discussions, but this PATCH v2 LGTM. 🚢

As for the Emacs script, maybe change defun password-store-dir to something like this:

(defun password-store-dir ()
  "Return password store directory."
  (or (bound-and-true-p auth-source-pass-filename)
      (getenv "PASSWORD_STORE_DIR")
      (if (file-directory-p "~/.password-store") "~/.password-store")
      (when (getenv "XDG_DATA_HOME") (f-join (getenv "XDG_DATA_HOME") "password-store"))
      "~/.local/share/password-store"))


More information about the Password-Store mailing list