Использование оболочки msysgit в Emacs для Windows

1024
Will

Я новичок в Emacs и пытаюсь настроить emacs, чтобы позволить следующей команде открыть оболочку msysgit.

M-x bash-shell 

Я добавил следующий фрагмент в мой init.el.

(defun bash-shell () "Run git bash in shell mode." (interactive) (let ((explicit-shell-file-name "C:/Dev/Apps/Git/bin/sh.exe") (shell-file-name explicit-shell-file-name) (explicit-sh.exe-args '("--login" "-i"))) (call-interactively 'shell))) 

Кажется, работает, но не так, как я ожидаю. Это начинается со следующего вывода.

Welcome to Git (version 1.8.4-preview20130916)   Run 'git help git' to display the help index. Run 'git help <command>' to display help for specific commands. 

Но потом застревает. Однако я могу ввести стандартные команды (например, ls, pwd, ...), но мой .bashrc, похоже, не выполняется. Когда я, exitоднако, кажется, что он либо запускается правильно, либо, по крайней мере, запускает .bashrc, что меня очень смущает

Welcome to Git (version 1.8.4-preview20130916)   Run 'git help git' to display the help index. Run 'git help <command>' to display help for specific commands. pwd /c/Dev/Apps/Emacs/emacs-23.3/bin uname MINGW32_NT-5.1 ll bash: line 3: ll: command not found exit laiwib@WZUR5250815 /c/D.A.E.e/emacs-23.3/bin $  

В любом случае он не ведет себя так же, как если бы я запускаю Git Bash на Windows

C:\WINDOWS\system32\cmd.exe /c ""C:\Dev\Apps\Git\bin\sh.exe" --login -i" 

что дает мне следующее

Welcome to Git (version 1.8.4-preview20130916)   Run 'git help git' to display the help index. Run 'git help <command>' to display help for specific commands. Agent pid 4384 laiwib@WZUR5250815 ~ (git::master) $ ll total 16 drwxr-xr-x 1 laiwib Administ 0 Oct 21 2012 WINDOWS drwxr-xr-x 1 laiwib Administ 0 Oct 23 2012 .eclipse -rw-r--r-- 1 laiwib Administ 38 Oct 23 2012 .dbshell ... 

Как я могу заставить его вести себя как Git Bash без вызова exitвручную?

3
Это может быть актуально: http://stackoverflow.com/questions/4733071/configuration-for-msysgit-bash-inside-emacs-on-windows Ben 9 лет назад 0

0 ответов на вопрос

Похожие вопросы