2013-12-19 2 views

답변

2

ELPA에서 사용할 수있는 패키지 shell-here가있다 : 당신이 쉘 버퍼를 많이 만드는 괜찮다면, 새로운 버퍼를 생성합니다 아래의 명령은 때마다 지정된 디렉토리 방문 하나를 찾을 수 없습니다 shell-here, 설치 표시 (i) 및 실행 (x).

추가 정보의 발췌 :

Open a shell buffer in (or relative to) default-directory, 
e.g. whatever directory the current buffer is in. If you have 
find-file-in-project installed, you can also move around relative 
to the root of the current project. 

I use Emacs shell buffers for everything, and shell-here is great 
for getting where you need to quickly. The =find-file-in-project= 
integration makes it very easy to manage multiple shells and 
maintain your path/history/scrollback when switching between 
projects. 

GitHub의 집 : https://github.com/ieure/shell-here

내가 너무 shell-pop을 좋아 팝업 쉽게 하나 쉘 버퍼 창을 팝업합니다. ELPA에는 아마 더 많은 것이있을 것입니다!

0

M-x shell 이미 실행중인 경우 기존 쉘로 전환되므로 문제가 될 수 있습니다. 찾아, M-x list-packages :

(require 'cl-lib) 

(defun shell-at-dir (dir) 
    "Open a shell at DIR. 
If a shell buffer visiting DIR already exists, show that one." 
    (interactive (list default-directory)) 
    (let ((buf (car (cl-remove-if-not 
        (lambda (it) 
        (with-current-buffer it 
         (and (derived-mode-p 'shell-mode) 
          (equal default-directory dir)))) 
        (buffer-list))))) 
    (if buf 
     (switch-to-buffer buf) 
     (shell (generate-new-buffer-name "*shell*"))))) 
관련 문제