如何将PowerShell设置为SmartGit的“打开Git-Shell”命令?

3
我尝试将PowerShell设置为我的“Open Git-Shell”选项,但没有成功。在命令字段中,我已经设置了以下选项:
**命令:**
powershell.exe

参数:

-noexit -executionpolicy Unrestricted -command "cd '${filePath}'"

这将以非交互模式启动PowerShell(即:该进程正在任务管理器中运行,但UI不可见)。我做错了什么?


当从命令行调用相同的内容时会发生什么? - mstrap
当我直接在命令行(cmd.exe)中运行该命令时,PowerShell会在命令窗口内运行,并将目录更改为指定的目录。 - ryan_milligan
1个回答

3

我尝试使用 cmd.exe 调用 PowerShell 来实现在 SmartGit 中打开 Git-Shell。我通过以下方式获得了期望的结果:

命令:

cmd.exe

参数:

/c start powershell.exe -noexit -executionpolicy Unrestricted -command "cd '${filePath}'"

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接