[PATCH] Add support for showing help from extensions

HacKan hackan at gmail.com
Wed Mar 22 23:57:59 CET 2017


I'm starting a new thread, but for previous reference, see [1].
This patch aims to improve pass's connection with extensions by showing help from them when pass's help command is issued. It's backwards compatible.

Extension makers could add a help function named like `help_extensionname()`, which pass looks for and calls during help command execution.

If such function doesn't exists, then it shows "no help available". If there are no enabled extensions, then "no extensions enabled" is shown. If there are no extensions at all, then it shows regular help.

This is very usefull for those who love using extensions, and doesn't impact at all on users who don't use them. It even reminds you of the extensions you have installed by listing them.


Example with extensions enabled:
    Usage:
        ...
        pass version
            Show version information.

    From extensions:
        pass example
            This is an example extension.
        pass nohelp
            (no help available)

    More information may be found in the pass(1) man page.


Example without extensions enabled:
    Usage:
        ...
        pass version
            Show version information.

    From extensions:
        (no extensions enabled)

    More information may be found in the pass(1) man page.


Example without extensions (shows regular help statement):
    Usage:
        ...
        pass version
            Show version information.

    More information may be found in the pass(1) man page.


[1] [PATCHES] improve extensions support (https://lists.zx2c4.com/pipermail/password-store/2017-February/002799.html)



More information about the Password-Store mailing list