[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 802c9da 271/348: counsel.el: Add counsel-command-history
From: |
Oleh Krehel |
Subject: |
[elpa] master 802c9da 271/348: counsel.el: Add counsel-command-history |
Date: |
Sat, 8 Apr 2017 11:04:13 -0400 (EDT) |
branch: master
commit 802c9dacb5379b8cec8d6751db44ecdf345dc61d
Author: joe di castro <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el: Add counsel-command-history
Fixes #826
---
counsel.el | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/counsel.el b/counsel.el
index cc7b65d..6290ba7 100644
--- a/counsel.el
+++ b/counsel.el
@@ -3036,6 +3036,31 @@ candidate."
:caller 'counsel-faces
:sort t)))
+;;** `counsel-command-history'
+(defun counsel-command-history-action-eval (cmd)
+ "Eval the command CMD."
+ (eval (read cmd)))
+
+(defun counsel-command-history-action-edit-and-eval (cmd)
+ "Edit and eval the command CMD."
+ (edit-and-eval-command "Eval: " (read cmd)))
+
+(ivy-set-actions
+ 'counsel-command-history
+ '(("r" counsel-command-history-action-eval "eval command")
+ ("e" counsel-command-history-action-edit-and-eval "edit and eval
command")))
+
+(defun counsel-command-history ()
+ "Show the history of commands."
+ (interactive)
+ (ivy-read "%d Command: "
+ (mapcar (lambda (x)
+ (format "%s" x))
+ command-history)
+ :require-match t
+ :action #'counsel-command-history-action-eval
+ :caller 'counsel-command-history))
+
;** `counsel-mode'
(defvar counsel-mode-map
(let ((map (make-sparse-keymap)))
- [elpa] master b1c6cc8 300/348: swiper.el (swiper-all): Fix case-fold-search, (continued)
- [elpa] master b1c6cc8 300/348: swiper.el (swiper-all): Fix case-fold-search, Oleh Krehel, 2017/04/08
- [elpa] master c3f5f28 305/348: Add circe-mode to swiper-font-lock-exclude, Oleh Krehel, 2017/04/08
- [elpa] master 7100925 302/348: ivy.el (ivy-completing-read-handlers-alist): New defcustom, Oleh Krehel, 2017/04/08
- [elpa] master b894874 309/348: ivy.el (ivy-occur-grep-mode): Call wgrep-setup if available, Oleh Krehel, 2017/04/08
- [elpa] master 80d3fe3 310/348: Fix compilation warnings, Oleh Krehel, 2017/04/08
- [elpa] master b0ccc7a 312/348: README.md: Recommend enable-recursive-minibuffers, Oleh Krehel, 2017/04/08
- [elpa] master 1ac1cc1 316/348: ivy.el (ivy-completing-read): Don't require-match for null, Oleh Krehel, 2017/04/08
- [elpa] master 7ca301b 334/348: swiper.el (swiper-goto-start-of-match) New defcustom, Oleh Krehel, 2017/04/08
- [elpa] master fc2e198 335/348: swiper.el (swiper--action): Set evil search direction to forward, Oleh Krehel, 2017/04/08
- [elpa] master 718a06b 345/348: doc/Changelog.org: Fix links, Oleh Krehel, 2017/04/08
- [elpa] master 802c9da 271/348: counsel.el: Add counsel-command-history,
Oleh Krehel <=
- [elpa] master ee91a25 283/348: ivy.el (ivy--sort-maybe): Fix byte-compiler warning, Oleh Krehel, 2017/04/08
- [elpa] master dc693c3 280/348: Make ivy--flx-sort more intelligent, Oleh Krehel, 2017/04/08
- [elpa] master 182e35e 298/348: Apply search highlighting for evil when applicable, Oleh Krehel, 2017/04/08
- [elpa] master aedea1a 289/348: counsel.el (counsel-package): Add func to manage packages., Oleh Krehel, 2017/04/08
- [elpa] master b9c52be 301/348: counsel.el (counsel-git): Add "x" action, Oleh Krehel, 2017/04/08
- [elpa] master dbeb5b1 303/348: Ensure counsel-M-x preserves last-command, Oleh Krehel, 2017/04/08
- [elpa] master ae3ca26 117/348: counsel.el (counsel-locate-action-extern): Add w32 support, Oleh Krehel, 2017/04/08
- [elpa] master 3e651a3 116/348: Make swiper-all use point positions instead of line positions, Oleh Krehel, 2017/04/08
- [elpa] master ef3f010 128/348: ivy.el (ivy--insert-prompt): Improve the extra "\n" logic, Oleh Krehel, 2017/04/08
- [elpa] master 870112e 176/348: counsel.el (counsel-ag-function): Use sync on remote, Oleh Krehel, 2017/04/08