From 204d905a9fa7c4f8cbb0021bd3feb6b1492b1c77 Mon Sep 17 00:00:00 2001 From: Heikki Hokkanen Date: Tue, 25 Oct 2011 18:12:09 +0300 Subject: [PATCH] Show sensible-browser command when running interactively. --- gitstats | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gitstats b/gitstats index 7a0ffcc..c502dcb 100755 --- a/gitstats +++ b/gitstats @@ -1372,6 +1372,11 @@ Default config values: time_end = time.time() exectime_internal = time_end - time_start print 'Execution time %.5f secs, %.5f secs (%.2f %%) in external commands)' % (exectime_internal, exectime_external, (100.0 * exectime_external) / exectime_internal) + if sys.stdin.isatty(): + print 'You may now run:' + print + print ' sensible-browser \'%s\'' % os.path.join(outputpath, 'index.html').replace("'", "'\\''") + print if __name__=='__main__': g = GitStats() -- 2.11.4.GIT