Replace space characters with minus charcater when naming new branch names#5076
Replace space characters with minus charcater when naming new branch names#5076FreddyFunk wants to merge 1 commit intojesseduffield:masterfrom
Conversation
|
Lazygit has this functionality already, it just doesn't show the dashes directly while typing. It replaces spaces with dashes after you hit enter. Since there is no PR description, I couldn't tell whether you are aware of this and want to improve on it with this PR. Personally I think the current behavior is fine; I find it a bit weird that you press a key and a different one appears. |
For me it is the other way around. If enter a branch name and then I press enter, the name gets silently and automatically changed. I would rather see what the final branch name is going to be while I input the branch name. I am used to this behavior by other IDEs like the ones from JetBrains. |
|
Ok, but now I'm not sure how to resolve this. Anybody else listening who wants to chime in with an opinion? |
|
I don't find myself typing spaces into branch names ever really, but I think it would be fine to have them replaced at that point. I don't love where this implementation chooses to make that change though. It feels like a very generic location to have the behavior of a very specific situation, which really is just branch creation |
I had the same thought, but I didn't even start commenting on the implementation yet, because I'm still skeptical about the behavior. If we were to make this change, we should probably replace the |
PR Description
Please check if the PR fulfills these requirements
go generate ./...)Replace space characters with minus charcater when naming new branch names.