Skip to content

Commit

Permalink
release: v0.51.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lucassabreu committed May 30, 2024
1 parent 261ae6b commit 9e4a989
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v0.51.1] - 2024-05-30

### Fixed

- when using `show-client` without `show-task` column headers became unaligned

## [v0.51.0] - 2024-05-29

### Added
Expand Down
8 changes: 6 additions & 2 deletions pkg/output/time-entry/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func TimeEntriesPrint(
projectColumn := 4
header := []string{"ID", "Start", "End", "Dur", "Project"}

if options.ShowTasks {
if options.ShowClients {
header = append(header, "Client")
}

Expand All @@ -99,7 +99,11 @@ func TimeEntriesPrint(
tw.SetHeader(header)
tw.SetRowLine(true)
if width, _, err := term.GetSize(int(os.Stdout.Fd())); err == nil {
tw.SetColWidth(width / 3)
if options.ShowClients || options.ShowTasks {
tw.SetColWidth(width / 4)
} else {
tw.SetColWidth(width / 3)
}
}

colors := make([]tablewriter.Colors, len(header))
Expand Down

0 comments on commit 9e4a989

Please sign in to comment.