branch: master
commit 778c61583ab03732df08fdf87fa9bbc1a94b8cdc
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy.el (ivy-add-actions): New function
Fixes #470
---
ivy.el | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/ivy.el b/ivy.el
index a1bda77..857f738 100644
--- a/ivy.el
+++ b/ivy.el
@@ -177,6 +177,15 @@ Only \"./\" and \"../\" apply here. They appear in reverse
order."
(setq ivy--actions-list
(plist-put ivy--actions-list cmd actions)))
+(defun ivy-add-actions (cmd actions)
+ "Add CMD extra exit points to ACTIONS."
+ (setq ivy--actions-list
+ (plist-put ivy--actions-list cmd
+ (delete-dups
+ (append
+ actions
+ (plist-get ivy--actions-list cmd))))))
+
(defvar ivy--display-transformers-list nil
"A list of str->str transformers per command.")