Re: [RFC] sending errors to stdout under $PAGER

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Edgar Toernig <froese@xxxxxx> writes:

> Junio C Hamano wrote:
>>
>> +	FILE *outto = (pager_in_use() ? stdout : stderr);
>> +
>>  	vsnprintf(msg, sizeof(msg), err, params);
>> -	fprintf(stderr, "%s%s\n", prefix, msg);
>> +	fprintf(outto, "%s%s\n", prefix, msg);
>>
>> What do people think?  Have I overlooked any downsides?
>
> Wouldn't it be better/safer to redirect stderr to the pager
> in the first place?
>
> So, instead of the current
>
> 	foo | less
> use
> 	foo 2>&1 | less

I like it.  Much nicer.  Thanks.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux