From: Richard Jones Date: Fri, 10 Sep 2010 12:26:10 +0000 (+0100) Subject: fish: glob should only print commands when trace mode is enabled. X-Git-Tag: 1.5.12~17 X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=commitdiff_plain;h=c359347dd42c9f5b875630537ee3641264826b89;hp=b033b55558503a1920c5b7cc1a7e1365749585e0;ds=sidebyside fish: glob should only print commands when trace mode is enabled. --- diff --git a/fish/glob.c b/fish/glob.c index 2731b2f..1a18b37 100644 --- a/fish/glob.c +++ b/fish/glob.c @@ -140,12 +140,14 @@ glob_issue (char *cmd, int argc, argv[argc] = NULL; again: - printf ("%s", argv[0]); - for (i = 1; i < argc; ++i) { - argv[i] = globs[i][posn[i]]; - printf (" %s", argv[i]); + if (guestfs_get_trace (g)) { + printf ("%s", argv[0]); + for (i = 1; i < argc; ++i) { + argv[i] = globs[i][posn[i]]; + printf (" %s", argv[i]); + } + printf ("\n"); } - printf ("\n"); if (issue_command (argv[0], &argv[1], NULL) == -1) *r = -1; /* ... but don't exit */