On Tue, Sep 7, 2010 at 20:10, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote: > Hi, > > Ævar Arnfjörð Bjarmason wrote: > >> +++ b/git-am.sh >> @@ -778,7 +778,7 @@ did you forget to use 'git add'?"; echo >> fi >> if test $apply_status != 0 >> then >> - printf 'Patch failed at %s %s\n' "$msgnum" "$FIRSTLINE" >> + echo "$(eval_gettext "Patch failed at \$msgnum \$FIRSTLINE")" > > Probably I am missing something silly, but why not just: > > eval_gettext 'Patch failed at $msgnum $FIRSTLINE\n' That looks better, or: eval_gettext 'Patch failed at $msgnum $FIRSTLINE'; echo To remove the change for translators to screw up the \n, the gettext manual uses that style. It also uses double quotes consistently, but '' works fine too. I don't know if '' should be avoided for some other reason, probably not. > ? I ask because it is nice to be able to avoid "echo" with arbitrary > data: special characters (e.g. \) can make for portability hassles. Aside from this example (which looks nicer as you suggest) we'd be in some slight trouble if the code in the patch is unportable, since I think I'm using equivalent constructions elsewhere to thinks that get passed to echo, but maybe that's not a problem if there's a level of indirection. In any case we could solve those with printf "%s" $str. -- 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