Skip to content
Oleh Krehel edited this page Jun 6, 2016 · 1 revision
(defun ivy-call-second-action ()
  "Execute second action."
  (interactive)
  (let ((actions (cdr (ivy-state-action ivy-last))))
    (if (<= (length actions) 1)
        (error "Can't run second action, only %d actions available"
               (length actions))
      (ivy-exit-with-action
       (nth 1 (nth 1 actions))))))

(define-key ivy-minibuffer-map (kbd "<f2>") 'ivy-call-second-action)