diff --git a/pkg/cmdrunner/cmdrunner.go b/pkg/cmdrunner/cmdrunner.go index e4de7d96..1e76825f 100644 --- a/pkg/cmdrunner/cmdrunner.go +++ b/pkg/cmdrunner/cmdrunner.go @@ -1914,10 +1914,12 @@ func BookmarksShowCommand(ctx context.Context, pk *scpacket.FeCommandPacketType) if err != nil { return nil, fmt.Errorf("cannot retrieve bookmarks: %v", err) } - for _, bm := range bms { - fmt.Printf("%v\n", bm) + update := sstore.ModelUpdate{ + BookmarksView: &sstore.BookmarksViewType{ + Bookmarks: bms, + }, } - return nil, nil + return update, nil } func LineBookmarkCommand(ctx context.Context, pk *scpacket.FeCommandPacketType) (sstore.UpdatePacket, error) { diff --git a/pkg/sstore/updatebus.go b/pkg/sstore/updatebus.go index 84cbb302..19fd668d 100644 --- a/pkg/sstore/updatebus.go +++ b/pkg/sstore/updatebus.go @@ -43,6 +43,7 @@ type ModelUpdate struct { History *HistoryInfoType `json:"history,omitempty"` Interactive bool `json:"interactive"` Connect bool `json:"connect,omitempty"` + BookmarksView *BookmarksViewType `json:"bookmarksview,omitempty"` } func (ModelUpdate) UpdateType() string { @@ -184,3 +185,7 @@ func MakeSessionsUpdateForRemote(sessionId string, ri *RemoteInstance) []*Sessio }, } } + +type BookmarksViewType struct { + Bookmarks []*BookmarkType `json:"bookmarks"` +}