summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scp.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/scp.c b/scp.c
index a533eb097..12e3199d8 100644
--- a/scp.c
+++ b/scp.c
@@ -194,8 +194,16 @@ do_local_cmd(arglist *a)
194 194
195 if (verbose_mode) { 195 if (verbose_mode) {
196 fprintf(stderr, "Executing:"); 196 fprintf(stderr, "Executing:");
197 for (i = 0; i < a->num; i++) 197 for (i = 0; i < a->num; i++) {
198 fmprintf(stderr, " %s", a->list[i]); 198 if (i == 0)
199 fmprintf(stderr, " %s", a->list[i]);
200 else
201 /*
202 * TODO: misbehaves if a->list[i] contains a
203 * single quote
204 */
205 fmprintf(stderr, " '%s'", a->list[i]);
206 }
199 fprintf(stderr, "\n"); 207 fprintf(stderr, "\n");
200 } 208 }
201 if ((pid = fork()) == -1) 209 if ((pid = fork()) == -1)