]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-config.c
CLI/config: restore "notmuch config get built_with.*"
[notmuch] / notmuch-config.c
index d9390c4d81ea10ff7e82196a5d034025b4915250..e5b4db45fdf53dcb4254bec0b321e1dfcbcf719e 100644 (file)
@@ -538,11 +538,18 @@ notmuch_config_command_get (notmuch_database_t *notmuch, char *item)
 {
     notmuch_config_values_t *list;
 
-    for (list = notmuch_config_get_values_string (notmuch, item);
-        notmuch_config_values_valid (list);
-        notmuch_config_values_move_to_next (list)) {
-       const char *val = notmuch_config_values_get (list);
-       puts (val);
+    if (STRNCMP_LITERAL (item, BUILT_WITH_PREFIX) == 0) {
+       if (notmuch_built_with (item + strlen (BUILT_WITH_PREFIX)))
+           puts ("true");
+       else
+           puts ("false");
+    } else {
+       for (list = notmuch_config_get_values_string (notmuch, item);
+            notmuch_config_values_valid (list);
+            notmuch_config_values_move_to_next (list)) {
+           const char *val = notmuch_config_values_get (list);
+           puts (val);
+       }
     }
     return EXIT_SUCCESS;
 }