diff options
Diffstat (limited to 'bin/mailcfg')
| -rwxr-xr-x | bin/mailcfg | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/bin/mailcfg b/bin/mailcfg index e31ab67..f77355e 100755 --- a/bin/mailcfg +++ b/bin/mailcfg @@ -22,6 +22,7 @@ help() { - notmuchcfg - notmuchhook - alot + - list Emit the generated configuration file for the chosen email @@ -57,6 +58,11 @@ help() { Get the alot configuration file: $ mailcfg alot + + + List the existing account labels: + + $ mailcfg list EOF } @@ -271,9 +277,16 @@ alot() { done } +list() { + for env in "$CFGDIR"/*.env; do + . "$env" + printf '%s\n' "$LABEL" + done +} + case "$ACTION" in - mbsync|msmtp|notmuchcfg|notmuchhook|alot) + mbsync|msmtp|notmuchcfg|notmuchhook|alot|list) "$1" ;; *) |
