[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra 7d94e67 087/395: Use the current prompt for s
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra 7d94e67 087/395: Use the current prompt for shell history initial input |
Date: |
Thu, 25 Feb 2021 08:31:37 -0500 (EST) |
branch: externals/ivy-hydra
commit 7d94e675c9717bc3726e50af25beeed4c2719525
Author: Troy Hinckley <t.macman@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
Use the current prompt for shell history initial input
Fixes #2400
---
counsel.el | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/counsel.el b/counsel.el
index 429a91e..3d964f6 100644
--- a/counsel.el
+++ b/counsel.el
@@ -4432,12 +4432,20 @@ An extra action allows to switch to the process buffer."
;;** `counsel-esh-history'
(defun counsel--browse-history (ring)
"Use Ivy to navigate through RING."
- (setq ivy-completion-beg (point))
- (setq ivy-completion-end (point))
- (ivy-read "History: " (ivy-history-contents ring)
- :keymap ivy-reverse-i-search-map
- :action #'ivy-completion-in-region-action
- :caller 'counsel-shell-history))
+ (let* ((proc (get-buffer-process (current-buffer)))
+ (end (point))
+ (beg (if proc
+ (min (process-mark proc) end)
+ end))
+ (input (when (< beg end)
+ (concat "^" (buffer-substring beg end)))))
+ (setq ivy-completion-beg beg)
+ (setq ivy-completion-end end)
+ (ivy-read "History: " (ivy-history-contents ring)
+ :keymap ivy-reverse-i-search-map
+ :initial-input input
+ :action #'ivy-completion-in-region-action
+ :caller 'counsel-shell-history)))
(defvar eshell-history-ring)
- [elpa] externals/ivy-hydra 657e6b4 062/395: ivy-test.el (ivy-inhibit-action): Better behavior with an alist collection, (continued)
- [elpa] externals/ivy-hydra 657e6b4 062/395: ivy-test.el (ivy-inhibit-action): Better behavior with an alist collection, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 4ba0944 064/395: counsel.el (counsel-set-variable): Save expr to the kill ring, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 40978ec 063/395: counsel.el (counsel-ag-base-command): Set default to --vimgrep, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra e7146dc 066/395: counsel.el (counsel--compilation-errors-buffer): Simplify, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 148f84e 074/395: counsel.el (counsel-git): Work with utf-8 characters, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra bfefd69 075/395: counsel.el (counsel-git-occur): Fixup, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra b4d9286 080/395: ivy-test.el (ivy-read-sort-def): Add test, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 41bd988 082/395: ivy.el (ivy-alt-done): In an empty directory with no input return this directory, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 0f57db8 079/395: ivy.el (ivy--reset-state): Ensure default values are prepended, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra f8eb450 077/395: counsel.el (counsel-register): Fix for file registers in Emacs 27, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 7d94e67 087/395: Use the current prompt for shell history initial input,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra ce70661 095/395: counsel.el (counsel-grep-function): Simplfy and extend, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 51fe2ce 097/395: counsel.el (counsel--recentf-get-xdg-recent-files): Decode utf-8, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra fb6db46 093/395: counsel.el (counsel-flycheck-occur): Add, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra e3a72a5 096/395: Add XDG recent files to counsel-recentf., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 00e5e0d 099/395: Apply resize to window size change hook., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 4875c7b 101/395: ivy.el (ivy-current-match): Add :extend t, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 5430e11 107/395: ivy.el (ivy-regex): Add, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra f40a465 117/395: ivy.el (ivy-avy-style): New defcustom, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra eb83a3c 110/395: ivy.el (ivy--update-minibuffer): Extract, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 5974f06 124/395: counsel.el (counsel-evil-marks): Improve, Basil L. Contovounesios, 2021/02/25