forgit icon indicating copy to clipboard operation
forgit copied to clipboard

Feature request: support custom branch drawing symbols

Open GrzegorzKozub opened this issue 8 months ago • 4 comments

I believe it was @rbong who authored custom branch drawing symbols. They look like this:

Image

They are now implemented in the following terminal emulators:

  • Ghostty https://github.com/ghostty-org/ghostty/pull/2613
  • Kitty https://github.com/kovidgoyal/kitty/pull/7681
  • WezTerm https://github.com/wezterm/wezterm/issues/6328

Would it be possible to use them in forgit when available or via an option?

GrzegorzKozub avatar Apr 17 '25 06:04 GrzegorzKozub

Thanks for your idea. Unfortunately, I don't see a way to implement this in forgit. The component responsible for drawing the log graphs is actually just plain git. So unless git supports using custom graph symbols, we can't support it in forgit either.

Curious whether the other maintainers have an idea, so I will keep this open for now.

carlfriedrich avatar Apr 20 '25 17:04 carlfriedrich

Same here, unfortunately. I don't see a way to implement this in forgit as we entirely depend on gits output.

sandr01d avatar Apr 21 '25 18:04 sandr01d

I think this can be achieved with substitution. I was prototyping a bit on WezTerm under Windows. The ls and llare mygit logaliases and-replaceis one of the PowerShell alternatives forsed`.

Image

This means performance impact and some ANSI escape code weirdness for the colors but is doable.

GrzegorzKozub avatar Apr 22 '25 21:04 GrzegorzKozub

A possible solution could be to write a separate application that modifies the output from git log and can be used in a pipe, the same we we already do with emojify. I think developing a separate application would make sense here because it could also be used with plain git or in other projects. I would be open to integrate with such an application.

sandr01d avatar Apr 23 '25 17:04 sandr01d