shell-pop-el icon indicating copy to clipboard operation
shell-pop-el copied to clipboard

Feature request: configure different keybindings for different types of shell

Open justmytwospence opened this issue 9 years ago • 3 comments

Incredibly useful package here, thanks. It would be even more useful if I could easily configure one keybinding for an eshell and another for a terminal emulator, for example. Is there an easy way to configure that with the current state of the package?

justmytwospence avatar Sep 09 '15 18:09 justmytwospence

Is there an easy way to configure that with the current state of the package?

No. There is no way. We can use two shells with following configuration, but we cannot use them simultaneously.

(defun shell-pop-eshell ()
  (interactive)
  (let ((shell-pop-shell-type '("eshell" "*eshell*" (lambda () (eshell))))
        (shell-pop-term-shell "eshell"))
    (shell-pop--set-shell-type 'shell-pop-shell-type shell-pop-shell-type)
    (call-interactively 'shell-pop)))

(defun shell-pop-shell ()
  (interactive)
  (let ((shell-file-name "/bin/bash")
        (shell-pop-shell-type '("shell" "*shell*" (lambda () (shell))))
        (shell-pop-term-shell "shell"))
    (shell-pop--set-shell-type 'shell-pop-shell-type shell-pop-shell-type)
    (call-interactively 'shell-pop)))

(global-set-key (kbd "M-e") 'shell-pop-eshell)
(global-set-key (kbd "M-a") 'shell-pop-shell)

syohex avatar Sep 10 '15 05:09 syohex

@justmytwospence you can use eyebrowse package and use a convention to always put your ansi-term on first workspace. Then just write a very simple "toggle current<->1" function. I've been using this with great success.

I still use shell-pop for the extreme convenience of directory tracking and just quickily getting in/out of my way. I use shell-pop with eshell so whenever I don't need full terminal.

Fuco1 avatar Jun 11 '16 12:06 Fuco1

No. There is no way. We can use two shells with following configuration, but we cannot use them simultaneously.

@syohex thanks. wors great for me.

azzamsa avatar May 07 '18 10:05 azzamsa