816*_*055 69 windows command-line git-bash
显然我的 google-fu 很烂...
我从其他 StackExchange 帖子中了解到这些:
--cd-to-home # Change directory to home
--cd=<path> # Change directory to <path>
-i # ?
-c # Run command, but --command doesn't work/exist
Run Code Online (Sandbox Code Playgroud)
在哪里可以找到 git-bash.exe(热模拟器)的完整选项列表?我为 mintty [ 1 ]找到了它们,但它们似乎不是 git-bash.exe 的正确选择...
更新:
所以git-bash.exe
似乎只是一个简单的包装器,首先解析--cd...
选项然后运行
usr\bin\mintty.exe --icon git-bash.exe,0 --exec "/usr/bin/bash" --login -i <other arguments>
Run Code Online (Sandbox Code Playgroud)
或类似。这就是为什么 only--cd..
和 bash 选项被正确解析而不是 mintty 的原因。
如果你想使用 mintty 的其他选项,你应该使用类似的命令,而不是尝试使用git-bash.exe。例如:
usr\bin\mintty.exe --icon git-bash.exe,0 --window full --exec "/usr/bin/bash" --login -i -c "echo 'Hello World!'; read"
Run Code Online (Sandbox Code Playgroud)
Mei*_*hen 23
我发现这个 2015 年的提交引入了新的命令行选项:https : //github.com/git/git/commit/ac6b03cb4197311b055dc5f46ab10bf37c591ae6
这是提交描述中的列表:
--command=<command-line>::
Executes `<command-line>` instead of the embedded string resource
--[no-]minimal-search-path::
Ensures that only `/cmd/` is added to the `PATH` instead of
`/mingw??/bin` and `/usr/bin/`, or not
--[no-]needs-console::
Ensures that there is a Win32 console associated with the spawned
process, or not
--[no-]hide::
Hides the console window, or not
Run Code Online (Sandbox Code Playgroud)
您可以在上面的 URL 中阅读完整信息。
小智 18
正确的是没有 git-bash.exe 的命令行选项帮助列表。我花了一些时间自己寻找它们,但没有任何适当的文档。它似乎是 bin/sh.exe 的包装器。如果您确实需要做更多,那么我建议您查看 sh.exe 的帮助信息。
小智 15
我还想知道如何获取命令行选项,谷歌搜索提出了这个线程。
我发现这些选项记录在 git 中。
称呼:
git help git-bash
Run Code Online (Sandbox Code Playgroud)
它将在浏览器中打开一个 git-bash 手册页,解释所有选项
归档时间: |
|
查看次数: |
57830 次 |
最近记录: |