From c359347dd42c9f5b875630537ee3641264826b89 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Fri, 10 Sep 2010 13:26:10 +0100 Subject: [PATCH] fish: glob should only print commands when trace mode is enabled. --- fish/glob.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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 */ -- 1.8.3.1