Add h keybinding to toggle hold/release via postsuper -h/-H

Preserves the ! suffix from postqueue -p output to track hold status
in QueueEntry, and optimistically toggles it in the UI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nemunaire 2026-03-29 20:00:51 +07:00
commit 3916c49a0c
4 changed files with 34 additions and 3 deletions

14
msgs.go
View file

@ -47,6 +47,20 @@ func flushQueueCmd() tea.Cmd {
}
}
func holdMessageCmd(id string) tea.Cmd {
return func() tea.Msg {
exec.Command("postsuper", "-h", id).Run()
return nil
}
}
func releaseMessageCmd(id string) tea.Cmd {
return func() tea.Msg {
exec.Command("postsuper", "-H", id).Run()
return nil
}
}
func deleteMessageCmd(id string) tea.Cmd {
return func() tea.Msg {
exec.Command("postsuper", "-d", id).Run()