* counsel.el (counsel--browse-history): Rename from `browse-history'.
(eshell-history-ring):
(comint-input-ring): Declare.
(counsel-esh-history): Add require.
(counsel-shell-history): Add require.
(** `counsel-esh-history'): Add an outline.
Fixes #459
(ivy-read "Expr: " (delete-dups read-expression-history)
:action #'insert)))
(ivy-read "Expr: " (delete-dups read-expression-history)
:action #'insert)))
-(defun browse-history (elements)
+;;** `counsel-esh-history'
+(defun counsel--browse-history (elements)
"Use Ivy to navigate through ELEMENTS."
(setq ivy-completion-beg (point))
(setq ivy-completion-end (point))
"Use Ivy to navigate through ELEMENTS."
(setq ivy-completion-beg (point))
(setq ivy-completion-end (point))
(ring-elements elements))
:action #'ivy-completion-in-region-action))
(ring-elements elements))
:action #'ivy-completion-in-region-action))
+(defvar eshell-history-ring)
+
;;;###autoload
(defun counsel-esh-history ()
"Browse Eshell history."
(interactive)
;;;###autoload
(defun counsel-esh-history ()
"Browse Eshell history."
(interactive)
- (browse-history eshell-history-ring))
+ (require 'em-hist)
+ (counsel--browse-history eshell-history-ring))
+
+(defvar comint-input-ring)
;;;###autoload
(defun counsel-shell-history ()
"Browse shell history."
(interactive)
;;;###autoload
(defun counsel-shell-history ()
"Browse shell history."
(interactive)
- (browse-history comint-input-ring))
+ (require 'comint)
+ (counsel--browse-history comint-input-ring))
;;* Misc OS
;;** `counsel-rhythmbox'
;;* Misc OS
;;** `counsel-rhythmbox'