X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fprogress.c;h=0288355d58efdf4fd151c6f27c6cdbf9b3ba2c3d;hp=b5b7c3824c6c0cda7af299a64ee9856c7f31f368;hb=d3a636f2a53a6e84b95a5be6f186d6bb79e87c63;hpb=8d0e351cb30d4663c317b1147ca2e91273987de3 diff --git a/src/progress.c b/src/progress.c index b5b7c382..0288355d 100644 --- a/src/progress.c +++ b/src/progress.c @@ -801,6 +801,7 @@ static void bar_set_params (const char *params) { int sw; + char *term = getenv ("TERM"); if (params && 0 == strcmp (params, "force")) @@ -808,10 +809,19 @@ bar_set_params (const char *params) if ((opt.lfilename #ifdef HAVE_ISATTY + /* The progress bar doesn't make sense if the output is not a + TTY -- when logging to file, it is better to review the + dots. */ || !isatty (fileno (stderr)) #else 1 #endif + /* Normally we don't depend on terminal type because the + progress bar only uses ^M to move the cursor to the + beginning of line, which works even on dumb terminals. But + Jamie Zawinski reports that ^M and ^H tricks don't work in + Emacs shell buffers, and only make a mess. */ + || (term && 0 == strcmp (term, "emacs")) ) && !current_impl_locked) {