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 82932f0 commit 35f319cCopy full SHA for 35f319c
lister/list.go
@@ -1,6 +1,8 @@
1
package lister
2
3
import (
4
+ "path/filepath"
5
+ "slices"
6
"sort"
7
8
"github.com/joshmedeski/sesh/model"
@@ -59,6 +61,14 @@ func (l *RealLister) List(opts ListOptions) (model.SeshSessions, error) {
59
61
})
60
62
63
64
+ runningSessionNames := lo.FilterMap(allSessions, func(s model.SeshSession, _ int) (string, bool) {
65
+ return s.Name, s.Src == "tmux"
66
+ })
67
+
68
+ allSessions = lo.Filter(allSessions, func(s model.SeshSession, _ int) bool {
69
+ return s.Src != "zoxide" || !slices.Contains(runningSessionNames, filepath.Base(s.Path))
70
71
72
if opts.HideAttached {
73
attachedSession, _ := GetAttachedTmuxSession(l)
74
allSessions = lo.Filter(allSessions, func(s model.SeshSession, _ int) bool {
0 commit comments