if (!*line) goto next;
- if (!quiet) {
- add_history(line);
- write_history(history_file);
- }
-
if (strcmp(line, "reconnect") == 0) {
if (do_connect(&sockfd, file, server) < 0) exit(EXIT_FAILURE);
goto next;
} else if (len == FR_CONDUIT_FAIL) {
fprintf(stderr, "Failed running command\n");
exit_status = EXIT_FAILURE;
+
+ } else if (len == FR_CONDUIT_PARTIAL) {
+ fprintf(stdout, "WARNING: Ignoring partial command.\n");
+
+ } else {
+ /*
+ * Add only successful commands to the history.
+ *
+ * Don't add exit / quit / secret / etc.
+ */
+ if (!quiet) {
+ add_history(line);
+ write_history(history_file);
+ }
}
/*