-
Notifications
You must be signed in to change notification settings - Fork 17
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
Ellisons don't play nice with column alignment #5
Comments
yeah, i see this too. |
This is a major issue that really affects user experience. I will need to address it first, thanks for bringing it up. |
If you can point me to the section to stare at I'd be happy to give a fix a go. |
Wow, that would have been amazing, thanks @BAXTER001 ! The func in question is in fmt.go@PrintColumns(filename, description string). There is this complication that I use colorstring library that converts colour tags within the string into escape characters to show coloured text in shell:
These colour tags skew off the string lengths. Not sure how to bypass that easily at this stage. Maybe use other shell coloring library with a different syntax? Maybe add a new type struct ShellString {
s string
color string
}
func (s ShellString) String() string {
return colorstring.Color("["+s.color+"]"+ s.s)
}
func (s ShellString) Length() string {
return strings.RuneCountInString(s.s)
} I think that would be the most idiomatic go way (see e.g. NullString in |
While we are at it, we can also make it support general number of columns, not just two. Something like Should have done this right at the time. But nooo 😜 |
For example all rows with the [...] substituted in have slightly incorrect offsets for the following columns, for example the "Digital Marketing Executive - Ar..." entry below.
Output is from a 55x186 gnome terminal session.
The text was updated successfully, but these errors were encountered: