+ /* add missing quote for full completions */
+ if (missing_quote != '\0') {
+ iter = ec_completed_iter(tmp_completed, EC_COMP_FULL);
+ if (iter == NULL)
+ goto fail;
+ while ((item = ec_completed_iter_next(iter)) != NULL) {
+ str = ec_completed_item_get_str(item);
+ if (asprintf(&new_str, "%c%s%c", missing_quote, str,
+ missing_quote) < 0) {
+ new_str = NULL;
+ goto fail;
+ }
+ if (ec_completed_item_set_str(item, new_str) < 0)
+ goto fail;
+ free(new_str);
+ new_str = NULL;
+
+ str = ec_completed_item_get_completion(item);
+ if (asprintf(&new_str, "%s%c", str,
+ missing_quote) < 0) {
+ new_str = NULL;
+ goto fail;
+ }
+ if (ec_completed_item_set_completion(item, new_str) < 0)
+ goto fail;
+ free(new_str);
+ new_str = NULL;
+ }
+ }
+
+ ec_completed_iter_free(iter);