Skip to content

Commit

Permalink
feat: shortcut to skip rest of emails for pizza generate config (#197)
Browse files Browse the repository at this point in the history
* add skip rest key shortcut

* formatted

* Update cmd/generate/config/spec.go

Co-authored-by: John McBride <[email protected]>

---------

Co-authored-by: John McBride <[email protected]>
  • Loading branch information
zeucapua and jpmcb authored Sep 18, 2024
1 parent 173922b commit 6e96fff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/generate/config/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func (k keymap) ShortHelp() []key.Binding {
key.NewBinding(key.WithKeys("ctrl+n"), key.WithHelp("ctrl+n", "next suggestion")),
key.NewBinding(key.WithKeys("ctrl+p"), key.WithHelp("ctrl+p", "prev suggestion")),
key.NewBinding(key.WithKeys("ctrl+i"), key.WithHelp("ctrl+i", "ignore email")),
key.NewBinding(key.WithKeys("ctrl+s"), key.WithHelp("ctrl+s", "skip the rest")),
key.NewBinding(key.WithKeys("esc"), key.WithHelp("esc", "quit")),
key.NewBinding(key.WithKeys("enter"), key.WithHelp("enter", "submit")),
}
Expand Down Expand Up @@ -88,6 +89,9 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}
return m, nil

case tea.KeyCtrlS:
return m, runOutputGeneration(m.opts, m.attributionMap)

case tea.KeyEnter:
if len(strings.Trim(m.textInput.Value(), " ")) == 0 {
return m, nil
Expand Down

0 comments on commit 6e96fff

Please sign in to comment.