【问题标题】:Get Git Shell to run command after starting启动后获取 Git Shell 以运行命令
【发布时间】:2017-08-14 15:13:02
【问题描述】:

你可以的

start powershell -command ls

打开 PowerShell 并让它列出文件。我正在尝试用 Git Shell 做类似的事情。目前我有

%LOCALAPPDATA\GitHub\Github.appref-ms --open-shell -command ls

打开 Git Shell,但不执行任何其他操作。这样启动Git Shell后是否可以运行命令?

【问题讨论】:

    标签: windows powershell cmd posh-git


    【解决方案1】:

    由于这个问题尚未得到解答,我将提供一种替代解决方案,即使用 git-bash 代替 MS 应用程序参考文件。

    start /b cmd /c "C:/Program Files/Git/git-bash.exe" /C/path/to/script.sh
    

    看到这个问题:Cant run shell script using Git Bash interface on Windows10

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-05-01
      • 1970-01-01
      • 2015-01-29
      • 2020-05-16
      • 2021-01-13
      • 1970-01-01
      • 2023-03-30
      相关资源
      最近更新 更多