Re: [PATCH v2 6/6] tests: Add tests for automatic use of pager
- From
Jeff King <peff@peff.net>
- Date
- Feb 15, 2010, 05:37 UTC
- Message-ID
- <20100215053747.GA4897@coredump.intra.peff.net>
- In-Reply-To
- <20100215053521.GA22121@progeny.tock>
On Sun, Feb 14, 2010 at 11:35:21PM -0600, Jonathan Nieder wrote:
> How about this? It seems a little simpler, though it might be less > reliable. > [...] > +if eval "exec 8>/dev/tty" 2>/dev/null && test -t 8
Right, it still breaks if we don't have a tty at all. Which is perhaps not the "99% of runs" I mentioned before, but I think is not all that uncommon (e.g., cron jobs).
-Peff