Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table format broken on Windows #8

Closed
daniel-liuzzi opened this issue Aug 11, 2016 · 3 comments
Closed

Table format broken on Windows #8

daniel-liuzzi opened this issue Aug 11, 2016 · 3 comments

Comments

@daniel-liuzzi
Copy link
Contributor

daniel-liuzzi commented Aug 11, 2016

At the expense of being the odd one out around here on Windows, I installed git-recent on my system and already love it. It works perfectly overall, except for one minor thing. column messes up the table layout when there are control chars in any except the last column. For example:

git-recent

If I go and temporarily remove the coloring from the refname like so:

  format="\
- %(HEAD) %(color:yellow)%(refname:short)%(color:reset)|\
+ %(HEAD) %(refname:short)|\
  %(color:bold red)%(objectname:short) %(color:bold green)(%(committerdate:relative)) %(color:blue)%(authorname) %(color:reset)%(color:yellow)%(upstream:track)%0a\
-   %(color:black) %(color:reset)|%(contents:subject)%0a\
+    |%(contents:subject)%0a\
    |"

Then columns do line up properly and match the screenshot on the README:

git-recent-2

If I have to guess, this seems to be more of a column problem than a git recent problem, but I though I bring it up in case I'm missing something. If anyone can point me in the right direction I can make a PR attempt.

@paulirish
Copy link
Owner

how about moving yellow up a line and reset to right before the bold/red?
Curious if that gets us consitent rendering across all the column's

like this maybe?

format="\%(color:yellow)
%(HEAD) %(refname:short)|\
%(color:reset)%(color:bold red)%(objectname:short) %(color:bold green)(%(committerdate:relative)) %(color:blue)%(authorname) %(color:reset)%(color:yellow)%(upstream:track)%0a\
  %(color:black) %(color:reset)|%(contents:subject)%0a\
  |"

@daniel-liuzzi
Copy link
Contributor Author

daniel-liuzzi commented Aug 27, 2016

Unfortunately it didn't work 😕 It also lost the yellow coloring and rendered a \ above the refname:

git-recent-1

I've been playing with this some more and got an idea. Give me a few minutes and I'll sent a PR.

@daniel-liuzzi
Copy link
Contributor Author

Fixed in #9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants