We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45d3c72 commit 82932f0Copy full SHA for 82932f0
lister/list.go
@@ -49,6 +49,16 @@ func (l *RealLister) List(opts ListOptions) (model.SeshSessions, error) {
49
})
50
51
52
+ grouped := lo.GroupBy(allSessions, func(s model.SeshSession) string {
53
+ return s.Name
54
+ })
55
+
56
+ allSessions = lo.MapToSlice(grouped, func(_ string, sessions []model.SeshSession) model.SeshSession {
57
+ return lo.MaxBy(sessions, func(a, b model.SeshSession) bool {
58
+ return a.Score > b.Score
59
60
61
62
if opts.HideAttached {
63
attachedSession, _ := GetAttachedTmuxSession(l)
64
allSessions = lo.Filter(allSessions, func(s model.SeshSession, _ int) bool {
0 commit comments