Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

call shell correctly, send C-c and only interupt-subjob with a prefix

  • Loading branch information...
commit 076297ebdbce70c74eae16b08718acebd592ec5e 1 parent 41f21db
@langmartin authored
Showing with 12 additions and 2 deletions.
  1. +12 −2 rc-eshell.el
View
14 rc-eshell.el
@@ -21,7 +21,7 @@
(defun shell-focus-or-create (prefix)
(interactive "P")
(cond (prefix
- (eshell prefix))
+ (call-interactively #'shell))
((bufferp (get-buffer "*shell*"))
(let ((dir default-directory))
(switch-to-buffer "*shell*")
@@ -29,7 +29,17 @@
(insert "cd " dir)
(comint-send-input))))
(t
- (eshell nil))))
+ (shell nil))))
+
+(defun send-c-c-interrupt-subjob (prefix)
+ (interactive "P")
+ (cond (prefix
+ (comint-interrupt-subjob))
+ (t
+ (insert "")
+ (comint-send-input))))
+
+(define-key shell-mode-map (kbd "C-c C-c") 'send-c-c-interrupt-subjob)
(global-set-key (kbd "H-s") 'shell-focus-or-create)
Please sign in to comment.
Something went wrong with that request. Please try again.