[notmuch] [PATCH 1/3] rename option to select output format to --format from --output.
david at tethera.net
david at tethera.net
Sat Dec 19 06:55:22 PST 2009
From: David Bremner <bremner at unb.ca>
---
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
More information about the notmuch
mailing list