Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id DFEFE431FC0 for ; Sat, 19 Dec 2009 06:55:52 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pUbDx7Vumlmf for ; Sat, 19 Dec 2009 06:55:52 -0800 (PST) Received: from pivot.cs.unb.ca (pivot.cs.unb.ca [131.202.240.57]) by olra.theworths.org (Postfix) with ESMTP id 4AB09431FAE for ; Sat, 19 Dec 2009 06:55:52 -0800 (PST) Received: from fctnnbsc30w-142167182194.pppoe-dynamic.high-speed.nb.bellaliant.net ([142.167.182.194] helo=localhost) by pivot.cs.unb.ca with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NM0il-0003aH-Uw; Sat, 19 Dec 2009 10:55:52 -0400 Received: from bremner by localhost with local (Exim 4.69) (envelope-from ) id 1NM0ig-0006eW-HK; Sat, 19 Dec 2009 10:55:46 -0400 From: david@tethera.net To: notmuch@notmuchmail.org Date: Sat, 19 Dec 2009 10:55:22 -0400 Message-Id: <1261234524-25522-2-git-send-email-david@tethera.net> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <1261234524-25522-1-git-send-email-david@tethera.net> References: <87iqc4yyo8.fsf@yoom.home.cworth.org> <1261234524-25522-1-git-send-email-david@tethera.net> X-Sender-Verified: bremner@pivot.cs.unb.ca Cc: David Bremner Subject: [notmuch] [PATCH 1/3] rename option to select output format to --format from --output. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Dec 2009 14:55:53 -0000 From: David Bremner --- notmuch-search.c | 6 +++--- notmuch-show.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index e243747..482c6e8 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -221,14 +221,14 @@ notmuch_search_command (void *ctx, int argc, char *argv[]) fprintf (stderr, "Invalid value for --sort: %s\n", opt); return 1; } - } else if (STRNCMP_LITERAL (argv[i], "--output=") == 0) { - opt = argv[i] + sizeof ("--output=") - 1; + } else if (STRNCMP_LITERAL (argv[i], "--format=") == 0) { + opt = argv[i] + sizeof ("--format=") - 1; if (strcmp (opt, "text") == 0) { format = &format_text; } else if (strcmp (opt, "json") == 0) { format = &format_json; } else { - fprintf (stderr, "Invalid value for --output: %s\n", opt); + fprintf (stderr, "Invalid value for --format: %s\n", opt); return 1; } } else { diff --git a/notmuch-show.c b/notmuch-show.c index b5b3eba..b6e3f44 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -406,15 +406,15 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[])) i++; break; } - if (STRNCMP_LITERAL (argv[i], "--output=") == 0) { - opt = argv[i] + sizeof ("--output=") - 1; + if (STRNCMP_LITERAL (argv[i], "--format=") == 0) { + opt = argv[i] + sizeof ("--format=") - 1; if (strcmp (opt, "text") == 0) { format = &format_text; } else if (strcmp (opt, "json") == 0) { format = &format_json; entire_thread = 1; } else { - fprintf (stderr, "Invalid value for --output: %s\n", opt); + fprintf (stderr, "Invalid value for --format: %s\n", opt); return 1; } } else if (STRNCMP_LITERAL (argv[i], "--entire-thread") == 0) { -- 1.6.5.3