From: Junio C Hamano Date: Mon, 16 May 2011 20:58:52 GMT Subject: Re: Bikeshedding advice on the ab/i18n-scripts series Message-ID: <7v62pal5v7.fsf@alter.siamese.dyndns.org> In-Reply-To: <7vboz2l6h1.fsf@alter.siamese.dyndns.org> Junio C Hamano writes: > Ahh, perhaps I was the one who said something stupid like: > > echo >&2 "$(cmd)" > > should be equivalent to > > cmd >&2 > > which is not the case when output from cmd does not end with a single LF > (i.e. either an incomplete line, or with trailing blank lines). > > Sorry, if that is what you are trying to address, please let me take that > back. Having said that, depending on how the strings are distributed, I have a feeling that we might be better off having two variants: say >&2 "" gettext >&2 "" The former would be say () { gettext >&2 "$1"; echo } and minority of callers (they may be an empty set) that care about trailing blank lines they output can include their own terminating LFs in the message to be translated and call gettext directly, letting it output the translation without stripping trailing LFs they (or their translation) produce.