- if (strcmp(item, "database.path") == 0) {
- printf ("%s\n", notmuch_config_get_database_path (config));
- } else if (strcmp(item, "user.name") == 0) {
- printf ("%s\n", notmuch_config_get_user_name (config));
- } else if (strcmp(item, "user.primary_email") == 0) {
- printf ("%s\n", notmuch_config_get_user_primary_email (config));
- } else if (strcmp(item, "user.other_email") == 0) {
- const char **other_email;
- size_t i, length;
-
- other_email = notmuch_config_get_user_other_email (config, &length);
- for (i = 0; i < length; i++)
- printf ("%s\n", other_email[i]);
- } else if (strcmp(item, "new.tags") == 0) {
- const char **tags;
- size_t i, length;
-
- tags = notmuch_config_get_new_tags (config, &length);
- for (i = 0; i < length; i++)
- printf ("%s\n", tags[i]);
- } else if (STRNCMP_LITERAL (item, BUILT_WITH_PREFIX) == 0) {
- printf ("%s\n",
- notmuch_built_with (item + strlen (BUILT_WITH_PREFIX)) ? "true" : "false");
- } else if (_stored_in_db (item)) {
- return _print_db_config (config, item);
- } else {
- char **value;
- size_t i, length;
- char *group, *key;
-
- if (_item_split (item, &group, &key))
- return 1;
-
- value = g_key_file_get_string_list (config->key_file,
- group, key,
- &length, NULL);
- if (value == NULL) {
- fprintf (stderr, "Unknown configuration item: %s.%s\n",
- group, key);
- return 1;
- }