From: Sverre Rabbelier Date: Sun, 08 Nov 2009 22:46:33 GMT Subject: Re: Strange behavior (possible bug) using bash command subsitution with "git branch" Message-ID: In-Reply-To: Heya On Sun, Nov 8, 2009 at 23:11, Kate Ebneter 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 :). -- Cheers, Sverre Rabbelier