Closed joshmedeski closed 1 year ago
This is adding a trailing unconditionally, so this is no different than adding a ' '
at last component of your layout.
Ad documented in https://github.com/arl/gitmux#layout-components you can add anything to your layout, like:
layout: [branch, .., remote-branch, divergence, flags, ' ']
Also, I thought that your issue was solved with #93.
The other case as far as I'm aware of when gitmux can output an empty string is if you're not in a git directory, which you can easily get with git rev-parse --is-inside-work-tree
in your tmux.conf. I'm not sure the feature you're asking is gitmux's responsibility to solve
Totally fair, I'm not sure exactly where I got confused with why I was getting more spaces than I wanted.
Seems this is irrelevant, thanks for clarifying! I'll be playing with git worktrees soon.
Loving how gitmux is shaping up btw, I'll let you know if I come up with any more ideas. 😄
Sure. Please do!!! Cheers
Purpose
As a user, I want to render gitmux between other elements on my tmux status bar. I need a space between the elements but I don't want any unnecessary spaces if gitmux doesn't return anything leaving the tmux prompt pixel-perfect.
Approach
trailing_space
option to gitmux (default tofalse
)