[PROPOSAL] Fallback if extension not in PASSWORD_STORE_EXTENSIONS_DIR.

Karl Fogel kfogel at red-bean.com
Sun Dec 17 22:45:52 UTC 2023

On 17 Dec 2023, HacKan || Iván wrote:
>Yes, that is the desired behavior. The env replaces entirely the
>defaults, they are not additive.

(Quoting Iván's accidentally-private reply with permission.)

Thanks for this information.

If there is already a consensus that this is the right behavior, 
then so be it.  However, if the behavior might be reconsidered, 
then I'd like to propose such a reconsideration.

Many programs behave the other way: an extension can be installed 
in a user-specific location or in a system location or both, and 
the user-specific location always shadows the system location.

That is, if extension X exists in the user-specific location, then 
X is loaded from there.  Even if X also exists in the system 
location, it is ignored there.  This makes it easy for someone to 
try out a newer version, or their development version, of an 
extension, for example.

I *think* it's somewhat unusual for a program to have the "fully 
replace the default extension folder" behavior that 'pass' 
currently has.  (Though this is anecdotal -- I haven't done a 
formal survey; I'm just relying on my own experience.)  I'm not 
sure what the advantage(s) of the current 'pass' way are, but of 
course it's possible that there are advantages that I'm just not 
thinking of.

Best regards,

>On December 17, 2023 2:22:06 p.m. EST, Karl Fogel
><kfogel at red-bean.com> wrote:
>    In current 'pass' [1], if the PASSWORD_STORE_EXTENSIONS_DIR 
>    environment variable is set, then pass won't look in 
>    ~/.password-store/.extensions/ for extensions at all.
>    Is that the desired behavior?
>    Here is the behavior that I expected instead:
>    If the env var is set, then pass would look for EXT_NAME.bash 
>    in ${PASSWORD_STORE_EXTENSIONS_DIR} first.  But if the 
>    extension is not there (or if the directory doesn't exist at 
>    all), then pass would *next* try 
>    ~/.password-store/.extensions/EXT_NAME.bash (which is what 
>    pass defaults to if PASSWORD_STORE_EXTENSIONS_DIR is unset in 
>    the first place).
>    I'd be happy to submit a patch to implement this behavior. 
>    But first I wanted to ask if there would even be interest in 
>    such a patch.
>    Thoughts?
>    Best regards,
>    -Karl
>    [1] As of commit b5e965a838b.

More information about the Password-Store mailing list