Roddie,

OT, as you say, so I'll keep it brief. I do not think that the shelled-
out alias commands take arguments --- they should be self-contained.

Here is another approach ...

Clone the following repo:

    git clone git://github.com/farktronix/gittools.git

There is a script there called 'git bbdiff'.

Placing any executable file called 'git-<NAME>' on your system path
will cause Git to run that file when invoked via "git NAME". So, if
"git-bbdiff" is on your path, then:

   git bbdiff

will run it.

-- jeet

On Mar 25, 8:49 am, Roddie Grant <bbedit_l...@myword.co.uk> wrote:
> Hi Jeet
>
> I'm grateful for your help with this; I'm at the edge of my experience with
> shells. We're a little off topic, so don't feel obliged to reply.
>
> >foo = !"sh -c 'echo hello' "
>
> works fine, but when I try various permutations of>foo = !"sh -c 'echo $#' "
>
> with "git foo bar" I get "0" returned. I can't work out if I'm doing
> something wrong with the argument, or if something else is wrong.
>
> Advice appreciated!
>
> Roddie
>
> On 23/3/10 23:05, "jeetsukuma...@frogweb.org" <jeetsukuma...@gmail.com>
> wrote:
>
> > It is in the '[alias]' section, exactly like yours.
>
> > One difference I can see is that you have no space between the 0 and
> > the escape character at the end of the line, but I don't think this is
> > significant.
>
> > Maybe you might want to experiment with a simpler construct, such as:
>
> > [alias]
> >      foo = !"sh -c 'echo hello' "
>
> > and see if that works. Then slowly expand this to the full invocation
> > by adding the bits and pieces one at time (e.g., the conditional, then
> > the exit, etc.).
>
> > -- jeet
>
> > On Mar 23, 4:55 pm, Alex Satrapa <gr...@goldweb.com.au> wrote:
> >> On 23/03/2010, at 17:48 , jeetsukuma...@frogweb.org wrote:
>
> >>> See my reply to Roddie above. What shell are you using?
>
> >> I'm using ZSH, the only shell!
>
> >>> [alias]
> >>>    bbdiff = !"sh -c \"if [ -f '$1' ] && [ -f '$2' ]; then /usr/bin/bbdiff
> >>> --wait --resume '$1' '$2'; fi; exit 0\""
>
> >> What section is your "bbdiff" line in?

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.

To unsubscribe from this group, send email to 
bbedit+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to