Skip to content

Commit

Permalink
Add counsel-descbinds-action-exec
Browse files Browse the repository at this point in the history
Fixes #2024
  • Loading branch information
mn1281 authored and abo-abo committed May 6, 2019
1 parent 80d9c17 commit a9f9e41
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion counsel.el
Expand Up @@ -1027,7 +1027,8 @@ Usable with `ivy-resume', `ivy-next-line-and-call' and
(ivy-set-actions
'counsel-descbinds
'(("d" counsel-descbinds-action-find "definition")
("I" counsel-descbinds-action-info "info")))
("I" counsel-descbinds-action-info "info")
("x" counsel-descbinds-action-exec "execute")))

(defvar counsel-descbinds-history nil
"History for `counsel-descbinds'.")
Expand Down Expand Up @@ -1074,6 +1075,12 @@ See `describe-function' for further information."
(let ((cmd (cddr x)))
(describe-function cmd)))

(defun counsel-descbinds-action-exec (x)
"Run candidate X.
See `execute-extended-command' for further information."
(let ((cmd (cddr x)))
(command-execute cmd 'record)))

(defun counsel-descbinds-action-find (x)
"Find symbol definition of candidate X.
See `counsel--find-symbol' for further information."
Expand Down

0 comments on commit a9f9e41

Please sign in to comment.