我试图让Github for Windows 的bash shell 被Console2 包装。这并不像我希望的那么容易。使用来自 git-scm.com 的 Windows 版 Git 非常简单。我知道我可以将那个 bash shell 与 Console2 一起使用没有问题,而且我一直很好奇如何使用 Github for Windows bash shell 来做到这一点。由于 Windows 版 Github 和 Windows 版 Git 的名称相似,我在寻找解决方案时遇到了挫折。
从 git-scm.com mysysgit aka Git for Windows 包装 bash shell 非常简单,因为它带有一个 sh.exe。您只需在 Console2 设置中填写 Shell: 字段,如下所示:
"C:\Program Files (x86)\Git\bin\sh.exe" --login -i
我的问题是如何让 Github for Windows bash shell 在 Console2 中打开?
在 Windows 版 Github 中,Shell 字段没有简单的路径和可执行文件。您可以做的是进入 Github for Windows 的选项并设置一个自定义程序并将其指向 Console2,如下所示:
真正的诀窍是什么进入 Console2 设置?什么进入 Shell: 字段以在 Console2 中获取 bash shell?如果你在选择 bash shell 的情况下查看 Github for Windows 的 shell 命令的目标,你会得到一些奇怪的东西:
C:\Users\10136196\AppData\Local\GitHub\GitHub.appref-ms --open-shell
这与 Github for Windows 使用的微软一键安装功能有关,这在我的实验中的 Console2 设置 Shell: 字段中不起作用。