Hi Ryan,
On Tue, Jun 23, 2009 at 8:10 AM, Ryan Krauss wrote:
> After watching Ondrej's git videos, I became jealous of the (branch name) at
> the end of his bash prompt. I googled around and was able to put something
> together that I like. The trick was getting it to work in color.
> Especiall
Cool. Thanks for that. I like the idea of using a built in completion
function. I couldn't quite make the colors work with your PS1. Here is
what I ended up with:
PS1='\...@\h:\w\[\e[0;33m\]$(__git_ps1 " (%s)")\[\e[0;39m\]$ '
Ryan
On Tue, Jun 23, 2009 at 12:21 PM, Ondrej Certik wrote:
>
> H
I came up with this: export PS1="\[\e[31;40m\]\h:\W \u\$\[\e[0m\]\
[\e[0;33m\]$(__git_ps1 "(%s)")\[\e[31;40m\]$\[\e[0m\]" . It works,
only I get
Macintosh:~ aaronmeurer$$
when I am not in a git directory. Do you know if it possible to get
rid of the extra $ when I am not in a git director
OK I fixed that. I had too many $'s. The problem now is that it
doesn't change when I switch a branch or after cd'ing into and out of
a git directory. Ondrej's PS1 changes (though I get
aaronmeu...@macintosh:~/Documents/python/sympy/sympy33[31m(odes|
BISECTING)33[00m$ for my prompt on Mac OS X)
(I accidentally managed to copy a line feed and some non-ascii single and
double quotes by mistake and it took me a little bit to realize why it
wasn't working.)
On Tue, Jun 23, 2009 at 3:33 PM, Ryan Krauss wrote:
> I don't see anything obivously wrong with yours unless the linefeed is not
> jus
I don't see anything obivously wrong with yours unless the linefeed is not
just in your email. Does this one work without color?:
PS1='\...@\h:\w$(__git_ps1 " (%s)")$ '
if that works, try putting in things like
\[\e[0;33m\]
to switch to a new color.
If that one doesn't work correctly without co
On Tue, Jun 23, 2009 at 2:01 PM, asmeurer wrote:
>
> OK I fixed that. I had too many $'s. The problem now is that it
> doesn't change when I switch a branch or after cd'ing into and out of
> a git directory. Ondrej's PS1 changes (though I get
> aaronmeu...@macintosh:~/Documents/python/sympy/sym
OK, so this is really weird. It turns out that the problem was that I
was using double quotes. When I changed it to single quotes as in
PS1='\[\e[31;40m\]\h:\W \u\[\e[0;33m\]$(__git_ps1 "(%s)")\[\e[31;40m\]$
\[\e[0m\]'
It changes as expected. Is the behavior the same in Linux? If so, it
I think the single quote vs. double quote thing is because there are double
quotes inside of the string. If I change the outside single quotes to
double, I get strange behavior like you mentioned earlier.
On Tue, Jun 23, 2009 at 11:33 PM, Aaron S. Meurer wrote:
>
> OK, so this is really weird.
On Wed, Jun 24, 2009 at 08:14, Ryan Krauss wrote:
> I think the single quote vs. double quote thing is because there are double
> quotes inside of the string. If I change the outside single quotes to
> double, I get strange behavior like you mentioned earlier.
In addition, bash does not expand $
Another thing that I have found is that I need to have the "source
~/.git-completion.bash" line at the very bottom of my profile for git
auto-completion to work properly. Otherwise, it only auto-completes
aliases from my .gitconfig file.
Aaron Meurer
On Jun 23, 2009, at 2:41 PM, Ondrej Cer
11 matches
Mail list logo