New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I append actions to a command #470
Comments
Like this: (ivy-set-actions
'counsel-find-file
(append
'(("t" (lambda (x) (message "test: %S" x)) "test"))
(plist-get ivy--actions-list 'counsel-find-file))) But I prefer to keep everything in one place. Must easier to experiment. |
I should I have been more explicit sorry: I meant "is it possible for ivy to provide a new function that would ease adding new actions to a command?". If I understand your last sentence properly, does it mean you don't expect users to add actions to existing commands such as |
I do, but the idea is for the user to first copy the default But if you really want to PR with |
I've added the new function. But it's a real pain to use, at least for me. The major problem is that if you add a bad action, there's no easy way to remove it. So I'd need to have this code around in (ivy-set-actions t nil)
(ivy-add-actions t '(("f" (lambda (x) (message "foobar")) "foobar"))) One advantage of |
I would like, from my
init.el
, to add an action tocounsel-find-file
. Currently,ivy
only proposes to set actions, which replaces the existing actions I want to keep.The text was updated successfully, but these errors were encountered: