简体   繁体   English

如何使Git Shell在Windows 7上打开较新版本的PowerShell

[英]How to make Git Shell open newer version of PowerShell on Windows 7

My problem is that you can see in the title of this question: I can't force Git Shell to open the newer version of PowerShell, so I get the old and ugly command line after starting Git Shell. 我的问题是,您可以在该问题的标题中看到:我不能强迫Git Shell打开较新版本的PowerShell,因此启动Git Shell后,我会得到旧的且难看的命令行。 My OS is Windows 7, downloaded and installed GitHub for Windows and I installed the newest version of PowerShell recently (which works perfectly when I open the actual PowerShell). 我的操作系统是Windows 7,已下载并安装了适用于Windows的GitHub,并且最近安装了最新版本的PowerShell(在打开实际的PowerShell时可以完美运行)。

Furthermore, after starting Git Shell, but before entering the directory of any repository, the title of the CMD window says that C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Powershell.exe is running. 此外,在启动Git Shell之后,但是在进入任何存储库的目录之前,CMD窗口的标题显示C:\\ Windows \\ System32 \\ WindowsPowerShell \\ v1.0 \\ Powershell.exe正在运行。 So, maybe the real question could be: how should I make it run another, newer "PowerShell" instead (provide another path for Git Shell) and where is this located at all? 因此,也许真正的问题可能是:我应该如何使其运行另一个更新的“ PowerShell”(为Git Shell提供另一条路径),以及它究竟位于何处?

Anyone any idea, please? 有人知道吗?

There is (usually) only a single version of the PowerShell console installed on your computer, it is at C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Powershell.exe even if it is PowerShell Vs.5 通常,您的计算机上仅安装了一个版本的PowerShell控制台,即使它是PowerShell Vs.5,也位​​于C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Powershell.exe

You can verify in Task Manager that both PowerShell instances are using the same binary. 您可以在任务管理器中验证两个PowerShell实例是否使用相同的二进制文件。

If you see a different background color or a different/smaller font it's because of the console settings, which you can change in the properties of the window. 如果您看到不同的背景颜色或不同/较小的字体,则是由于控制台设置,您可以在窗口的属性中进行更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM