Open Zombiefleischer opened 1 year ago
Sounds good to me: we currently replace spaces with hyphens in sanitizedBranchName
in pkg\gui\controllers\helpers\refs_helper.go
. We just need to add a new config key gui.branchWhitespaceChar
and default it to a hyphen. The config stuff lives in pkg\config\user_config.go
.
Do you wanna raise a PR for this @Zombiefleischer ?
I can try after work :)
Sounds good :) Reach out if you need any pointers
Started working on #2665 , but have the following problem and can't quite wrap my head around it:
# github.com/jesseduffield/lazygit/pkg/gui
pkg/gui/controllers.go:22:3: not enough arguments in call to helpers.NewRefsHelper
have (*"github.com/jesseduffield/lazygit/pkg/gui/types".HelperCommon, *commands.GitCommand, *"github.com/jesseduffield/lazygit/pkg/gui/context".ContextTree, *"github.com/jesseduffield/lazygit/pkg/gui/types".Model)
want (*"github.com/jesseduffield/lazygit/pkg/gui/types".HelperCommon, *commands.GitCommand, *"github.com/jesseduffield/lazygit/pkg/gui/context".ContextTree, *"github.com/jesseduffield/lazygit/pkg/gui/types".Model, *"github.com/jesseduffield/lazygit/pkg/config".UserConfig)
If someone can help me with that would be nice :) I'm now heading to bed.
Left a comment :)
One thing I noticed the other day is that when you switch from a branch to one that doesn't exist and you create a new one, there is no character substitution on the new branch.
Looks like the PR for this is still open. Are there any plans to merge it? I'd like to give this a shot if there won't be any progress with the current PR.
@jesseduffield @Zombiefleischer can we get this issue / the PR moving again? Would be interested in this as well :)
If I can help I would be open to add the missing tests to the PR.
Is your feature request related to a problem? Please describe. At work we use branchnames with underline as whitespace replacement
Describe the solution you'd like An option to use your own char as an whitespace replacement like vscode has.
Describe alternatives you've considered Just typing it out yourself, which is kind of tedious.