Skip to content

Commit

Permalink
add skip rest key shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
zeucapua committed Sep 18, 2024
1 parent 503b3bd commit b4f0391
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+i", "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 b4f0391

Please sign in to comment.