私は Emacs の初心者で、次のコマンドで msysgit シェルを開けるように emacs を設定しようとしています。
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 $
いずれにせよ、WindowsでGit Bashを起動した場合と同じようには動作しません
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
?