feat: a running lazysecrets says when a newer one was installed over it (#90)

Co-authored-by: Karl-Einar Bergstrøm <karl-einarb@outlook.com>
This commit was merged in pull request #90.
This commit is contained in:
keb authored and keb committed 2026-10-19 21:31:05 +02:00
1 parent d0a8b1390d
commit 6a7f53e236
7 files changed
+164 -1

No files matched your search

+7
View File
@@ -536,6 +536,7 @@ func (m Model) Init() tea.Cmd {
if m.fetchOnStart {
cmds = append(cmds, m.fetchLatest(false))
}
cmds = append(cmds, m.watchBinary())
if m.open != nil {
msg := openRefMsg{ref: *m.open, action: m.openAction}
cmds = append(cmds, func() tea.Msg { return msg })
@@ -600,6 +601,12 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case installedMsg:
m.handleInstalled(msg)
case binaryTickMsg:
cmds = append(cmds, m.lookAtBinary())
case replacedMsg:
cmds = append(cmds, m.handleReplaced(msg))
case currentMsg:
if msg.gen == m.sourcesGen {
m.current = &msg.source