From 17b7a8324402ab1e5bb66adb287e5463757c9326 Mon Sep 17 00:00:00 2001 From: Jacob Keller Date: Thu, 19 Nov 2015 14:52:11 -0800 Subject: sendemail: teach git-send-email to dump alias names Add an option "--dump-aliases" which changes the default behavior of git-send-email. This mode will simply read the alias files configured by sendemail.aliasesfile and sendemail.aliasfiletype and dump a list of all configured aliases, one per line. The intended use case for this option is the bash-completion script which will use it to autocomplete aliases on the options which take addresses. Add some tests for the new option using various alias file formats. A possible future extension to the alias dump format could be done by extending the --dump-aliases to take an optional argument defining the format to display. This has not been done in this patch as no user of this information has been identified. Signed-off-by: Jacob Keller Signed-off-by: Jeff King --- Documentation/git-send-email.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt index b9134d234f..771a7b5b09 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt @@ -10,6 +10,7 @@ SYNOPSIS -------- [verse] 'git send-email' [options] ... +'git send-email' --dump-aliases DESCRIPTION @@ -387,6 +388,16 @@ default to '--validate'. Send emails even if safety checks would prevent it. +Information +~~~~~~~~~~~ + +--dump-aliases:: + Instead of the normal operation, dump the shorthand alias names from + the configured alias file(s), one per line in alphabetical order. Note, + this only includes the alias name and not its expanded email addresses. + See 'sendemail.aliasesfile' for more information about aliases. + + CONFIGURATION ------------- -- cgit v1.2.3