windows Console2 可以与 Powershell 一起使用吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7803076/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can Console2 be used with Powershell?
提问by user456584
I'm a big Console2 fan, and I've recently been introduced to the power of PowerShell. Is it possible to have the latter (aka the PowerShell interpretive shell) inside the former?
我是 Console2 的忠实粉丝,最近我了解了 PowerShell 的强大功能。是否有可能在前者中包含后者(又名 PowerShell 解释性 shell)?
回答by nathanchere
In Console2 settings, set the shell to:
在 Console2 设置中,将 shell 设置为:
%SystemRoot%\syswow64\WindowsPowerShell\v1.0\powershell.exe
%SystemRoot%\syswow64\WindowsPowerShell\v1.0\powershell.exe
Because for something this simple a blog post is not an answer.
因为对于这么简单的事情,博客文章不是答案。
回答by manojlds
Yeah, that is what I use. ( Update - Nowadays, I use ConEmu)
是的,我就是这么用的。(更新 - 现在,我使用ConEmu)
Refer to this excellent post from Scott Hanselman - http://www.hanselman.com/blog/Console2ABetterWindowsCommandPrompt.aspx
请参阅 Scott Hanselman 的这篇优秀文章 - http://www.hanselman.com/blog/Console2ABetterWindowsCommandPrompt.aspx
回答by Mariusz
Additionally, if you want an even better user experience while working with Console2+PowerShell duo, you can create a link to the Console2 executable, putting the following into the 'Shortcut'>'Target' field:
此外,如果您希望在使用 Console2+PowerShell 组合时获得更好的用户体验,您可以创建一个指向 Console2 可执行文件的链接,将以下内容放入“快捷方式”>“目标”字段中:
"%windir%\system32\cmd.exe /c start c:\dir-with-console2\Console.exe"
Also, set the 'Run' option to 'Minimized' on the same tab.
此外,在同一选项卡上将“运行”选项设置为“最小化”。
Now when you add the directory containing this link to the PATH environment variable ('System Properties'>'Advanced') you'll get yourself a pretty nice "feature", namely no matter where you'll run this link from, it will always set your working directory for Powershell to the "current one" (the one you have run the link from - similarly to how cmd behaves).
现在,当您将包含此链接的目录添加到 PATH 环境变量(“系统属性”>“高级”)时,您将获得一个非常好的“功能”,即无论您从何处运行此链接,它都会始终将 Powershell 的工作目录设置为“当前目录”(您从中运行链接的目录 - 类似于 cmd 的行为方式)。