我可以在shell模式下为Emacs使用PowerShell吗?

Che*_*eso 9 windows emacs powershell

我可以在shell模式下使用powershell作为shell吗?
怎么样?

Joh*_*ook 8

请参阅Jeffrey Snover的博客文章PowerShell在Emacs内部运行

  • 一个更有用的链接是http://blogs.msdn.com/dotnetinterop/archive/2008/04/10/run-powershell-as-a-shell-within-emacs.aspx (8认同)
  • 双方的链接对我来说都是死的:( (2认同)

Ray*_*ega 7

基于博客文章Run PowerShell as a shell in Emacs(2008 年 4 月),以及 Emacs Wiki 文章中关于 PowerShell 的部分称为PowerShell 作为劣质 shell(2010 年 5 月更新):

  • 保存powershell.el.\share\emacs\site-lispEmacs 安装目录下,或load-path. (powershell.el太长,无法包含在此答案中。如博客文章中所述,当重定向标准输入和输出时,无法强制 PowerShell 在交互模式下运行,因此需要大量的胶水代码才能使用它作为劣质外壳。)

  • 将以下内容添加到您的.emacs文件中

    (autoload 'powershell "powershell" "Run powershell as a shell within emacs." t)

完成后,用于M-x powershell打开和交互使用 PS shell 缓冲区。