{
GList *list = NULL;
GList *remote_list = NULL;
+ GList *remote_errors = NULL;
gint remote_do = FALSE;
gchar *first_dir = NULL;
if (!remote_do)
{
remote_do = TRUE;
- remote_list = remote_build_list(remote_list, argc, argv);
+ remote_list = remote_build_list(remote_list, argc - i, &argv[i], &remote_errors);
}
}
else if (strcmp(cmd_line, "-rh") == 0 ||
if (remote_do)
{
+ if (remote_errors)
+ {
+ GList *work = remote_errors;
+
+ printf_term(_("Invalid or ignored remote options: "));
+ while (work)
+ {
+ gchar *opt = work->data;
+
+ printf_term("%s%s", (work == remote_errors) ? "" : ", ", opt);
+ work = work->next;
+ }
+
+ printf_term(_("\nUse --remote-help for valid remote options.\n"));
+ }
+
remote_control(argv[0], remote_list, *path, list, *collection_list);
}
g_list_free(remote_list);
}
}
-GList *remote_build_list(GList *list, int argc, char *argv[])
+GList *remote_build_list(GList *list, int argc, char *argv[], GList **errors)
{
gint i;
{
list = g_list_append(list, argv[i]);
}
+ else if (errors)
+ {
+ *errors = g_list_append(*errors, argv[i]);
+ }
i++;
}
void remote_close(RemoteConnection *rc);
-GList *remote_build_list(GList *list, int argc, char *argv[]);
+GList *remote_build_list(GList *list, int argc, char *argv[], GList **errors);
void remote_help(void);
void remote_control(const gchar *arg_exec, GList *remote_list, const gchar *path,
GList *cmd_list, GList *collection_list);