小编She*_*rzo的帖子

如何在Console2中从Github for Windows包装bash shell?

我试图让Windows的Github的bash shell被Console2包装.这并不像我希望的那么容易.从git-scm.com开始,使用Git for Windows非常容易.我知道我可以将这个bash shell与Console2一起使用没有问题,而且,我真的很好奇如何使用Github for Windows bash shell做到这一点.由于Github for Windows和Git for Windows之间的名称相似,我在搜索解决方案时遇到了挫败感. 在此输入图像描述

从git-scm.com mysysgit(即Git for Windows)中包装bash shell非常简单,因为它附带了一个sh.exe.您只需在Console2设置中填写Shell:字段,例如:

"C:\Program Files (x86)\Git\bin\sh.exe" --login -i
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

我的问题是你如何让Github for Windows bash shell在Console2内部打开?

在Github for windows中,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
Run Code Online (Sandbox Code Playgroud)

这与Github for Windows使用的Microsoft一键安装功能有关,这在我的实验中的Console2设置Shell:字段中不起作用.

git console2 git-bash github-for-windows

14
推荐指数
1
解决办法
6615
查看次数

标签 统计

console2 ×1

git ×1

git-bash ×1

github-for-windows ×1