[shell] Add Eshell Ivy completion bindings
M-l calls spacemacs/ivy-eshell-history TAB calls spacemacs/pcomplete-std-complete
This commit is contained in:
parent
953573ade5
commit
e22cfadf1f
|
@ -2146,6 +2146,9 @@ Other:
|
||||||
- Moved =eshell-z-freq-dir-hash-table-file-name= into cache dir
|
- Moved =eshell-z-freq-dir-hash-table-file-name= into cache dir
|
||||||
(thanks to bb2020)
|
(thanks to bb2020)
|
||||||
- Enabled ~TAB~ completion in =eshell= with =Helm= (thanks to bb2020)
|
- Enabled ~TAB~ completion in =eshell= with =Helm= (thanks to bb2020)
|
||||||
|
- Added =eshell= =Ivy= completion bindings (thanks to bb2020):
|
||||||
|
- ~M-l~ =spacemacs/ivy-eshell-history=
|
||||||
|
- ~TAB~ =spacemacs/pcomplete-std-complete=
|
||||||
**** Shell Scripts
|
**** Shell Scripts
|
||||||
- Added new company-shell environment variable backend
|
- Added new company-shell environment variable backend
|
||||||
(thanks to Alexander-Miller)
|
(thanks to Alexander-Miller)
|
||||||
|
|
|
@ -235,6 +235,6 @@ in the current buffer instead of a popup.
|
||||||
|
|
||||||
** Eshell
|
** Eshell
|
||||||
|
|
||||||
| Key binding | Description |
|
| Key binding | Description |
|
||||||
|--------------------+--------------------------------------------|
|
|--------------------+---------------------------------------------------|
|
||||||
| ~SPC m H~ or ~M-l~ | shell commands history using a helm buffer |
|
| ~SPC m H~ or ~M-l~ | shell commands history using a helm or ivy buffer |
|
||||||
|
|
|
@ -174,6 +174,23 @@ is achieved by adding the relevant text properties."
|
||||||
(define-key eshell-mode-map
|
(define-key eshell-mode-map
|
||||||
(kbd "M-l") 'spacemacs/helm-eshell-history))
|
(kbd "M-l") 'spacemacs/helm-eshell-history))
|
||||||
|
|
||||||
|
(defun spacemacs/ivy-eshell-history ()
|
||||||
|
(interactive)
|
||||||
|
(counsel-esh-history)
|
||||||
|
(evil-insert-state))
|
||||||
|
|
||||||
|
(defun spacemacs/pcomplete-std-complete ()
|
||||||
|
(interactive)
|
||||||
|
(pcomplete-std-complete)
|
||||||
|
(evil-insert-state))
|
||||||
|
|
||||||
|
(defun spacemacs/init-ivy-eshell ()
|
||||||
|
"Initialize ivy-eshell."
|
||||||
|
(spacemacs/set-leader-keys-for-major-mode 'eshell-mode
|
||||||
|
"H" #'spacemacs/ivy-eshell-history)
|
||||||
|
(define-key eshell-mode-map (kbd "M-l") #'spacemacs/ivy-eshell-history)
|
||||||
|
(define-key eshell-mode-map (kbd "<tab>") #'spacemacs/pcomplete-std-complete))
|
||||||
|
|
||||||
(defun term-send-tab ()
|
(defun term-send-tab ()
|
||||||
"Send tab in term mode."
|
"Send tab in term mode."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
eshell-prompt-extras
|
eshell-prompt-extras
|
||||||
eshell-z
|
eshell-z
|
||||||
helm
|
helm
|
||||||
|
ivy
|
||||||
magit
|
magit
|
||||||
multi-term
|
multi-term
|
||||||
org
|
org
|
||||||
|
@ -151,6 +152,11 @@
|
||||||
(spacemacs/set-leader-keys-for-major-mode 'shell-mode
|
(spacemacs/set-leader-keys-for-major-mode 'shell-mode
|
||||||
"H" 'spacemacs/helm-shell-history))))
|
"H" 'spacemacs/helm-shell-history))))
|
||||||
|
|
||||||
|
(defun shell/pre-init-ivy ()
|
||||||
|
(spacemacs|use-package-add-hook ivy
|
||||||
|
:post-init
|
||||||
|
(add-hook 'eshell-mode-hook 'spacemacs/init-ivy-eshell)))
|
||||||
|
|
||||||
(defun shell/pre-init-magit ()
|
(defun shell/pre-init-magit ()
|
||||||
(spacemacs|use-package-add-hook magit
|
(spacemacs|use-package-add-hook magit
|
||||||
:post-init
|
:post-init
|
||||||
|
|
Loading…
Reference in a new issue