Re: bash completion with colour hints

2012-09-27 Thread Simon Oosthoek
On 09/27/2012 10:53 AM, Michael J Gruber wrote: From trying myself, I'm convinced that you need a clever combination of PROMPT_COMMAND and PS1 to make this work. Setting PS1 in PROMPT_COMMAND is probably a no-go because that makes it difficult to customize PS1. I have something in the works wh

Re: bash completion with colour hints

2012-09-27 Thread Andreas Schwab
Michael J Gruber writes: > - Bash interpretes '\' only when PS1 is assigned, not when an expansion > in PS1 produces it. What you probably mean is that bash does not rescan expansions for backslash escapes, thus only literal occurences in PS1 are processed (which is consistent with ordinary expa

Re: bash completion with colour hints

2012-09-27 Thread Simon Oosthoek
On 09/27/2012 10:53 AM, Michael J Gruber wrote: We do not usually add new features to maintenance tracks, so the result of applying the patch does not have to be merge-able to maint or amything older. I would base the patch on v1.7.12 (the latest stable release) if I were you. I now have a pa

Re: bash completion with colour hints

2012-09-27 Thread Michael J Gruber
Junio C Hamano venit, vidit, dixit 27.09.2012 08:53: > Simon Oosthoek writes: > >> I read the guide and now I have some questions: >> >> - It suggests to use the oldest commit that contains the "bug" and can >> support the fix. This would be the very first mention of __git_ps1 >> function I think

Re: bash completion with colour hints

2012-09-26 Thread Junio C Hamano
Simon Oosthoek writes: > I read the guide and now I have some questions: > > - It suggests to use the oldest commit that contains the "bug" and can > support the fix. This would be the very first mention of __git_ps1 > function I think commit d3d717a4ad0c8d7329e79f7d0313baec57c6b585 You could cl

Re: bash completion with colour hints

2012-09-26 Thread Simon Oosthoek
On 26/09/12 17:24, Ramkumar Ramachandra wrote: > Hi Simon, > > Could you follow the guidelines in Documentation/SubmittingPatches, so > that the patch can be considered for inclusion? Hi Ram, thanks for your feedback. I gather now that this file is part of the entire git tree ;-) this is my fir

bash completion with colour hints

2012-09-26 Thread Simon Oosthoek
Hi Shawn I only recently found the __git_ps1 function, but it wasn't directly able to replace my own contraption. I've modified the version I found after installing bash-completion in debian 6. The patch is attached, it contains an escape character, so it is hard to include in plain text. I'