模式时,我试图让一个Git在Emacs ESHELL方式提交:问题使用Git和Emacs ESHELL在Windows
git commit -a -m "message"
我收到一个错误:
'c:\Program' is not recognized as an internal or external command, operable program or batch file.
,并在同一时间这问题在emacs shell模式中不存在。 如何使用git强制eshell正常工作?
模式时,我试图让一个Git在Emacs ESHELL方式提交:问题使用Git和Emacs ESHELL在Windows
git commit -a -m "message"
我收到一个错误:
'c:\Program' is not recognized as an internal or external command, operable program or batch file.
,并在同一时间这问题在emacs shell模式中不存在。 如何使用git强制eshell正常工作?
这似乎是您要执行的程序的目录名称中的空格的问题;这个空白似乎没有正确逃脱。例如,如果你想要执行的是“C:\ Program Files \ git \ git.exe commit ...”,那么第一个空格需要被转义,或者整个路径名用引号引起来,否则这一行将被解析为令牌“C:\ Program”,“Files \ git \ git.exe”,“...”,第一个令牌是要执行的命令。
第一个解决办法是通过手工扩展的全名和它们放在引号,如:
"C:\Program Files\git\git.exe" commit ...
我已经通过将git重新安装到c:/ git中解决了问题,所以路径中没有空格 – Andreo 2009-06-17 13:29:09
我有同样的问题,并通过改变路径,使得git的“解决”了。 exe(在c:\Program Files\Git\bin
)之前git.cmd(在c:\program files\git\cmd
,IIRC)。
不知道具体与git和emacs,但与其他应用程序,它已经为我工作替换Program Files
与Progra~1
在你的路径。
错误发生在git或emacs.eshell内部某处,所以我无法管理 – Andreo 2009-06-17 13:36:34
呃,eshell和git?为什么?
只需使用magit从emacs调用git;它比命令行界面要丰富得多。
有类似的问题,这是为magit,(在MacOS上)。在你的emacs启动文件中添加以下内容:
(add-to-list 'exec-path "/usr/local/git/bin")
(setq magit-git-executable "/usr/local/git/bin/git")
我也可以建议Magit? http://zagadka.vm.bytemark.co.uk/magit/magit.html – baudtack 2009-06-17 23:27:18
在MacOS上有同样的错误。我在哪里添加eshell看到的路径? – Schpaencoder 2010-04-03 12:50:07