I''m looking to display my current git branch in the bash prompt. I can come close by following these instructions, but it does not display the branch. http://railstips.org/blog/archives/2009/02/02/bedazzle-your-bash-prompt-with-git-info/ Would any of you happen to know how to do this? Thank you much. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Michael Pavling
2011-Feb-28 10:42 UTC
Re: Displaying git branch in the bash prompt - Ubuntu
On 28 February 2011 01:37, dana tassler <dana.tassler-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m looking to display my current git branch in the bash prompt.Probably best to ask on a Git list... sure lots of Rails users are Git users, but all Git list subscribers are :-) http://groups.google.com/group/git-users -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Mickael Gerard
2011-Feb-28 11:18 UTC
Re: Displaying git branch in the bash prompt - Ubuntu
On 28 February 2011 02:37, dana tassler <dana.tassler-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m looking to display my current git branch in the bash prompt. >If you are using zsh, take a look at "oh my zsh" : https://github.com/robbyrussell/oh-my-zsh -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hassan Schroeder
2011-Feb-28 14:53 UTC
Re: Displaying git branch in the bash prompt - Ubuntu
On Sun, Feb 27, 2011 at 5:37 PM, dana tassler <dana.tassler-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m looking to display my current git branch in the bash prompt. > > I can come close by following these instructions, but it does not > display the branch. http://railstips.org/blog/archives/2009/02/02/bedazzle-your-bash-prompt-with-git-info/What does "come close" mean? The above directions worked exactly as expected for me on OS X (10.6.6). -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I should have been clearer. The time displays, as does the working directory. They are also both color-coded. However, the current branch does not show (as I did initially mention). I''m not on OS X but instead Ubuntu 10.04. On Mon, Feb 28, 2011 at 8:53 AM, Hassan Schroeder < hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sun, Feb 27, 2011 at 5:37 PM, dana tassler <dana.tassler-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > I''m looking to display my current git branch in the bash prompt. > > > > I can come close by following these instructions, but it does not > > display the branch. > http://railstips.org/blog/archives/2009/02/02/bedazzle-your-bash-prompt-with-git-info/ > > What does "come close" mean? The above directions worked exactly > as expected for me on OS X (10.6.6). > > -- > Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > twitter: @hassan > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- "One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies." - C.A.R. Hoare, in talking about designing software. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hassan Schroeder
2011-Feb-28 15:12 UTC
Re: Displaying git branch in the bash prompt - Ubuntu
On Mon, Feb 28, 2011 at 6:57 AM, dana tassler <dana.tassler-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> The time displays, as does the working directory. They are also both > color-coded. However, the current branch does not show (as I did initially > mention). > > I''m not on OS X but instead Ubuntu 10.04.Yes, I missed that, as the subject line was truncated - perhaps better to put it in the email body :-) On OS X: 07:02 ~ $ cd projects/current 07:02 ~/projects/current (user_customer)$ git-symbolic-ref usage: git-symbolic-ref [-q] [-m <reason>] name [ref] 07:06 ~/projects/current (user_customer)$ On Ubuntu 10.4 07:05 ~/projects/testcase $ git branch * master 07:05 ~/projects/testcase $ git-symbolic-ref git-symbolic-ref: command not found 07:05 ~/projects/testcase $ That would seem to be the main problem. Anyway, this probably is OT here, but feel free to send follow-up questions to me directly :-) -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
David J. Hamilton
2011-Feb-28 16:54 UTC
Re: Displaying git branch in the bash prompt - Ubuntu
Excerpts from dana tassler''s message of Sun Feb 27 17:37:20 -0800 2011:> I''m looking to display my current git branch in the bash prompt. > > I can come close by following these instructions, but it does not > display the branch. http://railstips.org/blog/archives/2009/02/02/bedazzle-your-bash-prompt-with-git-info/ > > Would any of you happen to know how to do this?The above tries to run git-symbolic-ref. On Ubuntu you''d want git symbolic-ref (i.e. without the first -). -- med vänlig hälsning David J. Hamilton -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
David, that was IT! Thank you very much. Works beautifully now. On Mon, Feb 28, 2011 at 10:54 AM, David J. Hamilton <groups-RNpBDse/2JlBDgjK7y7TUQ@public.gmane.org>wrote:> Excerpts from dana tassler''s message of Sun Feb 27 17:37:20 -0800 2011: > > I''m looking to display my current git branch in the bash prompt. > > > > I can come close by following these instructions, but it does not > > display the branch. > http://railstips.org/blog/archives/2009/02/02/bedazzle-your-bash-prompt-with-git-info/ > > > > Would any of you happen to know how to do this? > > The above tries to run git-symbolic-ref. On Ubuntu you''d want git > symbolic-ref > (i.e. without the first -). > > -- > med vänlig hälsning > David J. Hamilton > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- "One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies." - C.A.R. Hoare, in talking about designing software. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.