branch: master
commit a9205fa41f8a77c70a2f829c95f95a49f8e817f1
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
counsel.el (counsel-expression-history): New command
* README.md: Update.
---
README.md | 1 +
counsel.el | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/README.md b/README.md
index 572459d..3348189 100644
--- a/README.md
+++ b/README.md
@@ -62,6 +62,7 @@ Ivy and Swiper wiki is here: [the
wiki](https://github.com/abo-abo/swiper/wiki).
(global-set-key (kbd "C-c k") 'counsel-ag)
(global-set-key (kbd "C-x l") 'counsel-locate)
(global-set-key (kbd "C-S-o") 'counsel-rhythmbox)
+(define-key read-expression-map (kbd "C-r") 'counsel-expression-history)
```
## Contributing
diff --git a/counsel.el b/counsel.el
index 9c4dbf8..e0b421d 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1869,6 +1869,12 @@ An extra action allows to switch to the process buffer."
:action action
:require-match t
:caller 'counsel-ace-link))))
+;;** `counsel-expression-history'
+;;;###autoload
+(defun counsel-expression-history ()
+ (interactive)
+ (ivy-read "Expr: " (delete-dups read-expression-history)
+ :action #'insert))
;;* Misc OS
;;** `counsel-rhythmbox'