Re: Strange behavior (possible bug) using bash command subsitution with "git branch"

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

 



On 11/8/09 2:46 PM, "Sverre Rabbelier" <srabbelier@xxxxxxxxx> wrote:

> Heya
> 
> On Sun, Nov 8, 2009 at 23:11, Kate Ebneter <kate@xxxxxxxx> wrote:
>> That is, if you run 'git branch' inside $() or ``, it lists the directories,
>> too. I can't imagine that this is intended behavior, but perhaps I'm wrong.
> 
> Try enclosing it in quotes ;).
> 
> That is, compare:
> $ echo "`git branch`"
> with
> $ echo `git branch`
> 
> The kicker is that there's a * in the output of git branch, which your
> shell helpfully substitutes with the contents of your current
> directory :).

*head desk*

You know, I spent hours last night trying to figure that out. So simple.
Duh.

Thanks for pointing that out -- I knew it had to be something simple, but
sometimes you just can't see the forest for the trees! :-)

Thanks again,
Kate Ebneter

--
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]