lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

Ability to have folders or '/' character in custom branch colours (MacOS)

Open mayurdw opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. I have to deal with a lot of feature branches and bug fix branches each of which is under my user name folder. So if I am in a bug fix then the branch prefix is {companyName}/{authorName}/{branchName} Because of this, the custom branch colors don't work. Any name without '/' works just fine.

Describe the solution you'd like I would like to apply branch colors based on what is the whole string inclusive of '/' characters

Describe alternatives you've considered N/A

Additional context I am also looking to learn Go language, so if this is something that is not a priority, I wouldn't mind taking a look. I would just like a reference point to get started on this

mayurdw avatar Aug 18 '24 07:08 mayurdw

I suppose ideally you would want a regex match (or something like a shell globbing match)? See https://github.com/jesseduffield/lazygit/discussions/3680#discussioncomment-9826783 for a similar discussion.

The problem with this is that it would be a breaking change. There are several possibilities how to deal with this; one might be to add a new config such as gui.branchColorPatterns or some such, which takes priority over the existing one if both are given. Another possibility would be to change the meaning of the existing config, hoping that the change doesn't annoy people.

I don't have much of an interest in this topic myself, so I don't want to make a decision here; asking @jesseduffield for input.

stefanhaller avatar Aug 18 '24 08:08 stefanhaller

Hey

Thanks for your quick response on this.

As this is a breaking change, is there a process that this repo follows for doing changes like that?

mayurdw avatar Aug 19 '24 07:08 mayurdw

I am going to close this because I did a workaround by having my local branches named a certain way which allowed me to use the custom branch colours.

Thanks for quickly responding :)

mayurdw avatar Sep 09 '24 08:09 mayurdw