On Wed, Oct 30, 2013 at 5:02 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Eugene Sajine <euguess@xxxxxxxxx> writes: > >> On Wed, Oct 30, 2013 at 3:57 PM, Ralf Thielow <ralf.thielow@xxxxxxxxx> wrote: >>> lg=!git log --pretty=format:'%h %ad %ae %s' --date=short | sed 's/@\\S*//g' >>> >>> should work. >> >> >> It did! thanks! I didn't know that "!sh -c" is not needed > > "sh -c" is often used when you pass arguments to your scriptlets, > e.g. to allow > > git lg master..next > > you would want > > sh -c 'git log ... "$@" | sed ...' - > > so that > > git lg master..next > > turns into > > sh -c 'git log ... "$@" | sed ...' - master..next > > which makes $1="master..next" and fed to "git log". Junio, That was my initial intention, because I would like to be able to pass parameters like to git log or git blame correctly without the explicit use of $1. Could you please advise about how to make it work with the !sh -c ? Because the same exact (sed 's/@\\S*//') syntax didn't work with "sh -c". Thanks, Eugene -- 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